Skip to content

Commit c9373f9

Browse files
committed
vendor/lua: fix lexer error reporting for hash tokens
1 parent 8e874a2 commit c9373f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/vendor/lua/src/llex.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static const char *const luaX_tokens [] = {
4444
"return", "then", "true", "until", "while",
4545
"//", "..", "...", "==", ">=", "<=", "~=",
4646
"<<", ">>", "::", "<eof>",
47-
"<number>", "<integer>", "<name>", "<string>"
47+
"<number>", "<integer>", "<name>", "<string>", "<hash>"
4848
};
4949

5050

@@ -95,7 +95,7 @@ const char *luaX_token2str (LexState *ls, int token) {
9595

9696
static const char *txtToken (LexState *ls, int token) {
9797
switch (token) {
98-
case TK_NAME: case TK_STRING:
98+
case TK_NAME: case TK_STRING: case TK_HASH:
9999
case TK_FLT: case TK_INT:
100100
save(ls, '\0');
101101
return luaO_pushfstring(ls->L, "'%s'", luaZ_buffer(ls->buff));

0 commit comments

Comments
 (0)