';' now valid for parameter lists

This commit is contained in:
Araq 2012-07-11 18:17:39 +02:00
commit b4a9aca2d3
5 changed files with 20 additions and 12 deletions

View file

@ -629,7 +629,7 @@ proc parseTuple(p: var TParser): PNode =
while (p.tok.tokType == tkSymbol) or (p.tok.tokType == tkAccent):
var a = parseIdentColonEquals(p, {})
addSon(result, a)
if p.tok.tokType != tkComma: break
if p.tok.tokType notin {tkComma, tkSemicolon}: break
getTok(p)
optInd(p, a)
optPar(p)
@ -652,7 +652,7 @@ proc parseParamList(p: var TParser, retColon = true): PNode =
parMessage(p, errTokenExpected, ")")
break
addSon(result, a)
if p.tok.tokType != tkComma: break
if p.tok.tokType notin {tkComma, tkSemicolon}: break
getTok(p)
optInd(p, a)
optPar(p)
@ -1135,7 +1135,7 @@ proc parseGenericParamList(p: var TParser): PNode =
while (p.tok.tokType == tkSymbol) or (p.tok.tokType == tkAccent):
var a = parseGenericParam(p)
addSon(result, a)
if p.tok.tokType != tkComma: break
if p.tok.tokType notin {tkComma, tkSemicolon}: break
getTok(p)
optInd(p, a)
optPar(p)