Skip to content

Commit

Permalink
fix parseBool fails when next token is tkEOF
Browse files Browse the repository at this point in the history
Signed-off-by: George Lemon <[email protected]>
  • Loading branch information
georgelemon committed May 10, 2024
1 parent f88af45 commit 7ab8e79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nyml/parser.nim
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ proc parseString(p: var Parser): Node =
walk p

template checkInlineString {.dirty.} =
if p.next.line == p.curr.line:
if p.next.kind != tkEOF and p.next.line == p.curr.line:
let this = p.curr
return p.parseUnquotedStrings(this)

Expand Down Expand Up @@ -450,7 +450,7 @@ proc parseInlineArray(p: var Parser, this: TokenTuple): Node =
elif p.curr.kind == tkVariable:
result.items.add p.parseVariable(this, true)
else:
result.items.add p.parseUnquotedStrings(this, {tkRB, tkComma})
result.items.add p.parseUnquotedStrings(this, {tkRB, tkComma}) # todo fails to find tkRB
if p.curr.kind == tkComma: walk p
walk p # ]

Expand Down

0 comments on commit 7ab8e79

Please sign in to comment.