Always print the char the lexer fails on for a token.

This commit is contained in:
Dale Weiler 2013-08-31 16:52:46 -04:00
parent b2c8f3ebc5
commit 6800d15872

View file

@ -1519,6 +1519,6 @@ int lex_do(lex_file *lex)
return (lex->tok.ttype = ch); return (lex->tok.ttype = ch);
} }
lexerror(lex, "unknown token: `%s`", lex->tok.value); lexerror(lex, "unknown token: `%c`", ch);
return (lex->tok.ttype = TOKEN_ERROR); return (lex->tok.ttype = TOKEN_ERROR);
} }