]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Less terse, it confuses people.
authorDale Weiler <killfieldengine@gmail.com>
Sat, 15 Jun 2013 08:56:34 +0000 (08:56 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sat, 15 Jun 2013 08:56:34 +0000 (08:56 +0000)
ftepp.c
parser.c

diff --git a/ftepp.c b/ftepp.c
index 7bfd28cec9696ee4296db37563be21bafa3afefb..d68eed45285baa72e2fed256faa9314596a0311a 100644 (file)
--- 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;
 
index 5f27112097d925c0907e71fcc0fba6bf27144851..62c21dfb2b4e3e2d49a048c02738fa0fca271553 100644 (file)
--- 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);