Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
vendor/lua: fix lexer error reporting for hash tokens
  • Loading branch information
blattersturm committed Sep 14, 2019
1 parent 8e874a2 commit c9373f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/vendor/lua/src/llex.c
Expand Up @@ -44,7 +44,7 @@ static const char *const luaX_tokens [] = {
"return", "then", "true", "until", "while",
"//", "..", "...", "==", ">=", "<=", "~=",
"<<", ">>", "::", "<eof>",
"<number>", "<integer>", "<name>", "<string>"
"<number>", "<integer>", "<name>", "<string>", "<hash>"
};


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

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

0 comments on commit c9373f9

Please sign in to comment.