ptok = pptoken_make(ftepp);
vec_push(mp.tokens, ptok);
if (ftepp_next(ftepp) >= TOKEN_EOF) {
- ftepp_error(ftepp, "unexpected EOF in macro call");
+ ftepp_error(ftepp, "unexpected end of file in macro call");
goto on_error;
}
}
goto on_error;
}
if (ftepp_next(ftepp) >= TOKEN_EOF) {
- ftepp_error(ftepp, "unexpected EOF in macro call");
+ ftepp_error(ftepp, "unexpected end of file in macro call");
goto on_error;
}
}
- /* need to leave that up
- if (ftepp_next(ftepp) >= TOKEN_EOF) {
- ftepp_error(ftepp, "unexpected EOF in macro call");
- goto on_error;
- }
- */
*out_params = params;
return true;
* it in the predef table. And diagnose it better :)
*/
if (!OPTS_FLAG(FTEPP_PREDEFS) && ftepp_predef_exists(parser_tokval(parser))) {
- parseerror(parser, "unexpected ident: %s (use -fftepp-predef to enable pre-defined macros)", parser_tokval(parser));
+ parseerror(parser, "unexpected identifier: %s (use -fftepp-predef to enable pre-defined macros)", parser_tokval(parser));
return false;
}
correct_free(&corr);
if (correct) {
- parseerror(parser, "unexpected ident: %s (did you mean %s?)", parser_tokval(parser), correct);
+ parseerror(parser, "unexpected identifier: %s (did you mean %s?)", parser_tokval(parser), correct);
mem_d(correct);
return false;
}
}
- parseerror(parser, "unexpected ident: %s", parser_tokval(parser));
+ parseerror(parser, "unexpected identifier: %s", parser_tokval(parser));
return false;
}
}
while (true)
{
if (parser->tok == TOKEN_TYPENAME) {
- parseerror(parser, "unexpected typename");
+ parseerror(parser, "unexpected typename `%s`", parser_tokval(parser));
goto onerr;
}
{
if (!parser_global_statement(parser)) {
if (parser->tok == TOKEN_EOF)
- parseerror(parser, "unexpected eof");
+ parseerror(parser, "unexpected end of file");
else if (compile_errors)
parseerror(parser, "there have been errors, bailing out");
lex_close(parser->lex);