lexer: increment column count in multibyte tokens

This commit is contained in:
tocariimaa 2025-01-13 14:17:14 -03:00
parent 628d656207
commit 842322bedc

View file

@ -464,6 +464,7 @@ lex_scan(LexState *ls)
if (peek(ls) == '=') { if (peek(ls) == '=') {
token.id = T_NOTEQUAL; token.id = T_NOTEQUAL;
++ls->fwd; ++ls->fwd;
++ls->cur_loc.column;
} else { } else {
token.id = T_EXCLAMATION; token.id = T_EXCLAMATION;
} }
@ -488,6 +489,7 @@ lex_scan(LexState *ls)
if (peek(ls) == '=') { if (peek(ls) == '=') {
token.id = T_LOGICEQUAL; token.id = T_LOGICEQUAL;
++ls->fwd; ++ls->fwd;
++ls->cur_loc.column;
} else { } else {
token.id = T_EQUAL; token.id = T_EQUAL;
} }