';' now valid for parameter lists
This commit is contained in:
parent
6074a9c129
commit
b4a9aca2d3
5 changed files with 20 additions and 12 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue