diff options
-rw-r--r-- | compiler/parser.nim | 4 | ||||
-rw-r--r-- | tests/manyloc/keineschweine/keineschweine.nimrod.cfg | 1 | ||||
-rw-r--r-- | tests/reject/temptycaseobj.nim | 2 | ||||
-rw-r--r-- | tests/reject/tind1.nim | 2 | ||||
-rw-r--r-- | tests/reject/tmissingnl.nim | 2 |
5 files changed, 8 insertions, 3 deletions
diff --git a/compiler/parser.nim b/compiler/parser.nim index 175664a84..45eb6de9f 100644 --- a/compiler/parser.nim +++ b/compiler/parser.nim @@ -1687,6 +1687,10 @@ proc parseStmt(p: var TParser): PNode = if p.tok.indent > p.currInd: parMessage(p, errInvalidIndentation) break + if p.tok.toktype in {tkCurlyRi, tkParRi, tkCurlyDotRi, tkBracketRi}: + # XXX this ensures tnamedparamanonproc still compiles; + # deprecate this syntax later + break var a = complexOrSimpleStmt(p) if a.kind != nkEmpty: addSon(result, a) diff --git a/tests/manyloc/keineschweine/keineschweine.nimrod.cfg b/tests/manyloc/keineschweine/keineschweine.nimrod.cfg index 048285ad9..ca6c75f6e 100644 --- a/tests/manyloc/keineschweine/keineschweine.nimrod.cfg +++ b/tests/manyloc/keineschweine/keineschweine.nimrod.cfg @@ -6,3 +6,4 @@ path = "dependencies/enet" path = "dependencies/genpacket" path = "enet_server" debugger = off +warning[SmallLshouldNotBeUsed] = off diff --git a/tests/reject/temptycaseobj.nim b/tests/reject/temptycaseobj.nim index 5977cb92b..5c012746e 100644 --- a/tests/reject/temptycaseobj.nim +++ b/tests/reject/temptycaseobj.nim @@ -1,6 +1,6 @@ discard """ line: 11 - errormsg: "identifier expected, but found '[same indentation]'" + errormsg: "identifier expected, but found 'keyword of'" """ type diff --git a/tests/reject/tind1.nim b/tests/reject/tind1.nim index f3f3cacf7..f3fd952cc 100644 --- a/tests/reject/tind1.nim +++ b/tests/reject/tind1.nim @@ -1,6 +1,6 @@ discard """ line: 24 - errormsg: "invalid indentation" + errormsg: "expression expected, but found 'keyword else'" """ import macros diff --git a/tests/reject/tmissingnl.nim b/tests/reject/tmissingnl.nim index c2f97a807..33b7debf1 100644 --- a/tests/reject/tmissingnl.nim +++ b/tests/reject/tmissingnl.nim @@ -1,7 +1,7 @@ discard """ file: "tmissingnl.nim" line: 7 - errormsg: "newline expected, but found 'keyword var'" + errormsg: "invalid indentation" """ import strutils var s: seq[int] = @[0, 1, 2, 3, 4, 5, 6] |