Skip to content

Commit

Permalink
use lexReady
Browse files Browse the repository at this point in the history
Signed-off-by: George Lemon <[email protected]>
  • Loading branch information
georgelemon committed Jul 31, 2023
1 parent 5a05234 commit 3bd0291
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/toktok/lexer.nim
Original file line number Diff line number Diff line change
Expand Up @@ -806,8 +806,7 @@ macro registerTokens*(settings: static Settings, tokens: untyped) =
result.add quote do:
proc handleIdent(lex: var `LexerName`) =
## Handle string-based identifiers
lex.startPos = lex.getColNumber(lex.bufpos)
setLen(lex.token, 0)
lexReady lex
while true:
if lex.hasLetters(lex.bufpos):
add lex.token, lex.buf[lex.bufpos]
Expand Down

0 comments on commit 3bd0291

Please sign in to comment.