made some tests green

This commit is contained in:
Araq 2013-04-22 21:18:48 +02:00
commit 61e9bd0c48
5 changed files with 8 additions and 3 deletions

View file

@ -1687,6 +1687,10 @@ proc parseStmt(p: var TParser): PNode =
if p.tok.indent > p.currInd: if p.tok.indent > p.currInd:
parMessage(p, errInvalidIndentation) parMessage(p, errInvalidIndentation)
break 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) var a = complexOrSimpleStmt(p)
if a.kind != nkEmpty: if a.kind != nkEmpty:
addSon(result, a) addSon(result, a)

View file

@ -6,3 +6,4 @@ path = "dependencies/enet"
path = "dependencies/genpacket" path = "dependencies/genpacket"
path = "enet_server" path = "enet_server"
debugger = off debugger = off
warning[SmallLshouldNotBeUsed] = off

View file

@ -1,6 +1,6 @@
discard """ discard """
line: 11 line: 11
errormsg: "identifier expected, but found '[same indentation]'" errormsg: "identifier expected, but found 'keyword of'"
""" """
type type

View file

@ -1,6 +1,6 @@
discard """ discard """
line: 24 line: 24
errormsg: "invalid indentation" errormsg: "expression expected, but found 'keyword else'"
""" """
import macros import macros

View file

@ -1,7 +1,7 @@
discard """ discard """
file: "tmissingnl.nim" file: "tmissingnl.nim"
line: 7 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] import strutils var s: seq[int] = @[0, 1, 2, 3, 4, 5, 6]