mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-22 02:31:28 +00:00
Better printing of token errors.
This commit is contained in:
parent
4c0a836ca6
commit
319783e873
2 changed files with 2 additions and 2 deletions
2
lexer.c
2
lexer.c
|
@ -1485,6 +1485,6 @@ int lex_do(lex_file *lex)
|
|||
return (lex->tok.ttype = ch);
|
||||
}
|
||||
|
||||
lexerror(lex, "unknown token: %c", lex->tok);
|
||||
lexerror(lex, "unknown token: `%d`", lex->tok.value);
|
||||
return (lex->tok.ttype = TOKEN_ERROR);
|
||||
}
|
||||
|
|
2
parser.c
2
parser.c
|
@ -5554,7 +5554,7 @@ static bool parser_global_statement(parser_t *parser)
|
|||
}
|
||||
else
|
||||
{
|
||||
parseerror(parser, "unexpected token: %s", parser->lex->tok.value);
|
||||
parseerror(parser, "unexpected token: `%s`", parser->lex->tok.value);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue