From 3bd02918d2165718cb11334ed81b8c88af38f496 Mon Sep 17 00:00:00 2001 From: George Lemon Date: Mon, 31 Jul 2023 04:48:17 +0300 Subject: [PATCH] use `lexReady` Signed-off-by: George Lemon --- src/toktok/lexer.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/toktok/lexer.nim b/src/toktok/lexer.nim index 566d7cf..32d46c7 100644 --- a/src/toktok/lexer.nim +++ b/src/toktok/lexer.nim @@ -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]