mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-22 02:31:28 +00:00
Less terse, it confuses people.
This commit is contained in:
parent
290d065a79
commit
04406b191f
2 changed files with 7 additions and 13 deletions
10
ftepp.c
10
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;
|
||||
|
||||
|
|
10
parser.c
10
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);
|
||||
|
|
Loading…
Reference in a new issue