lexer: increment column count in multibyte tokens
This commit is contained in:
parent
628d656207
commit
842322bedc
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue