fix bug with unexpected tkInvalid,tkEof,tkComment
This commit is contained in:
parent
7e60cf2a34
commit
90dc35c109
1 changed files with 2 additions and 0 deletions
|
|
@ -303,6 +303,8 @@ proc parseSymbol(p: var TParser, allowNil = false): PNode =
|
||||||
if accm == "":
|
if accm == "":
|
||||||
parMessage(p, errIdentifierExpected, p.tok)
|
parMessage(p, errIdentifierExpected, p.tok)
|
||||||
break
|
break
|
||||||
|
of tkEof, tkInvalid, tkComment:
|
||||||
|
parMessage(p, errIdentifierExpected, p.tok)
|
||||||
else:
|
else:
|
||||||
accm.add(tokToStr(p.tok))
|
accm.add(tokToStr(p.tok))
|
||||||
getTok(p)
|
getTok(p)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue