improve the parser's error message
This commit is contained in:
parent
522bc8dda1
commit
45bc6954c5
1 changed files with 1 additions and 1 deletions
|
|
@ -2285,7 +2285,7 @@ proc parseStmt(p: var TParser): PNode =
|
||||||
case p.tok.tokType
|
case p.tok.tokType
|
||||||
of tkIf, tkWhile, tkCase, tkTry, tkFor, tkBlock, tkAsm, tkProc, tkFunc,
|
of tkIf, tkWhile, tkCase, tkTry, tkFor, tkBlock, tkAsm, tkProc, tkFunc,
|
||||||
tkIterator, tkMacro, tkType, tkConst, tkWhen, tkVar:
|
tkIterator, tkMacro, tkType, tkConst, tkWhen, tkVar:
|
||||||
parMessage(p, "complex statement requires indentation")
|
parMessage(p, "nestable statement requires indentation")
|
||||||
result = p.emptyNode
|
result = p.emptyNode
|
||||||
else:
|
else:
|
||||||
if p.inSemiStmtList > 0:
|
if p.inSemiStmtList > 0:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue