mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-13 14:53:46 +00:00
improve the parser's error message
This commit is contained in:
@@ -2285,7 +2285,7 @@ proc parseStmt(p: var TParser): PNode =
|
||||
case p.tok.tokType
|
||||
of tkIf, tkWhile, tkCase, tkTry, tkFor, tkBlock, tkAsm, tkProc, tkFunc,
|
||||
tkIterator, tkMacro, tkType, tkConst, tkWhen, tkVar:
|
||||
parMessage(p, "complex statement requires indentation")
|
||||
parMessage(p, "nestable statement requires indentation")
|
||||
result = p.emptyNode
|
||||
else:
|
||||
if p.inSemiStmtList > 0:
|
||||
|
||||
Reference in New Issue
Block a user