* Fix #15305

* Fix test
This commit is contained in:
Clyybber 2020-09-12 13:39:46 +02:00 • committed by GitHub
commit 1881fc5812
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View file

@ -2242,8 +2242,7 @@ proc parseStmt(p: var Parser): PNode =
break
p.hasProgress = false
if p.tok.tokType in {tkElse, tkElif}:
parMessage(p, errInvalidIndentation)
getTok(p)
break # Allow this too, see tests/parser/tifexprs
result.add complexOrSimpleStmt(p)
if not p.hasProgress and p.tok.tokType == tkEof: break