From: Dale Weiler Date: Sat, 15 Jun 2013 08:56:34 +0000 (+0000) Subject: Less terse, it confuses people. X-Git-Tag: v0.3.0~129 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=04406b191f7b10c6afd9b93c80c6c706e7590109;p=xonotic%2Fgmqcc.git Less terse, it confuses people. --- diff --git a/ftepp.c b/ftepp.c index 7bfd28c..d68eed4 100644 --- a/ftepp.c +++ b/ftepp.c @@ -624,7 +624,7 @@ static bool ftepp_macro_call_params(ftepp_t *ftepp, macroparam **out_params) 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; } } @@ -637,16 +637,10 @@ static bool ftepp_macro_call_params(ftepp_t *ftepp, macroparam **out_params) 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; diff --git a/parser.c b/parser.c index 5f27112..62c21df 100644 --- a/parser.c +++ b/parser.c @@ -1918,7 +1918,7 @@ static bool parse_sya_operand(parser_t *parser, shunt *sy, bool with_labels) * 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; } @@ -1945,12 +1945,12 @@ static bool parse_sya_operand(parser_t *parser, shunt *sy, bool with_labels) 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; } } @@ -1997,7 +1997,7 @@ static ast_expression* parse_expression_leave(parser_t *parser, bool stopatcomma while (true) { if (parser->tok == TOKEN_TYPENAME) { - parseerror(parser, "unexpected typename"); + parseerror(parser, "unexpected typename `%s`", parser_tokval(parser)); goto onerr; } @@ -6219,7 +6219,7 @@ static bool parser_compile(parser_t *parser) { 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);