From 842322bedcfa1fec6d26f7bdd5551f3f55064d99 Mon Sep 17 00:00:00 2001 From: tocariimaa Date: Mon, 13 Jan 2025 14:17:14 -0300 Subject: [PATCH] lexer: increment column count in multibyte tokens --- compiler/lex.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/lex.c b/compiler/lex.c index fe7e669..ec7aebc 100644 --- a/compiler/lex.c +++ b/compiler/lex.c @@ -464,6 +464,7 @@ lex_scan(LexState *ls) if (peek(ls) == '=') { token.id = T_NOTEQUAL; ++ls->fwd; + ++ls->cur_loc.column; } else { token.id = T_EXCLAMATION; } @@ -488,6 +489,7 @@ lex_scan(LexState *ls) if (peek(ls) == '=') { token.id = T_LOGICEQUAL; ++ls->fwd; + ++ls->cur_loc.column; } else { token.id = T_EQUAL; }