]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
replacing an error message in the enum parsing
authorWolfgang Bumiller <blub@speed.at>
Thu, 10 Jan 2013 21:08:49 +0000 (22:08 +0100)
committerWolfgang Bumiller <blub@speed.at>
Thu, 10 Jan 2013 21:08:49 +0000 (22:08 +0100)
parser.c

index c457d1b12a1ac728863d53063c3c8f2ffb75f53c..e38cedae42fe4624d009ab404a42c2bc13d77cb2 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -3487,7 +3487,7 @@ static bool parse_enum(parser_t *parser)
         old = parse_expression_leave(parser, true, false, false);
         asvalue = (ast_value*)old;
         if (!ast_istype(old, ast_value) || asvalue->cvq != CV_CONST || !asvalue->hasvalue) {
-            parseerror(parser, "enumeration value for must be a constant");
+            compile_error(ast_ctx(var), "constant value or expression expected");
             goto onerror;
         }
         num = (var->constval.vfloat = asvalue->constval.vfloat) + 1;