]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
the comma is now in the operator list
authorWolfgang Bumiller <wolfgang.linux@bumiller.com>
Fri, 27 Jul 2012 10:53:15 +0000 (12:53 +0200)
committerWolfgang Bumiller <wolfgang.linux@bumiller.com>
Fri, 27 Jul 2012 10:53:15 +0000 (12:53 +0200)
lexer.h
parser.c

diff --git a/lexer.h b/lexer.h
index c23f944baf5fee23cf7da5ecdd5dee964956441d..ae8812b261c5be6e68252a78704e2e32438b59c7 100644 (file)
--- a/lexer.h
+++ b/lexer.h
@@ -183,6 +183,8 @@ static const oper_info operators[] = {
     { "&=",  2, opid2('&','='),     ASSOC_RIGHT, 2,  0 },
     { "^=",  2, opid2('^','='),     ASSOC_RIGHT, 2,  0 },
     { "|=",  2, opid2('|','='),     ASSOC_RIGHT, 2,  0 },
+
+    { ",",   2, opid1(','),         ASSOC_LEFT,  1,  0 }
 };
 static const size_t operator_count = (sizeof(operators) / sizeof(operators[0]));
 
index 56f20f271957c73d056dd173a57bfc727d4d2039..75c69111e3f19655e6825aa91d1586dbb4d8b775 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -458,12 +458,6 @@ static ast_expression* parser_expression(parser_t *parser)
                     goto onerr;
                 }
             }
-            else if (parser->tok == ',') {
-                if (!shunt_ops_add(&sy, syparen(parser_ctx(parser), ','))) {
-                    parseerror(parser, "out of memory");
-                    goto onerr;
-                }
-            }
             else if (parser->tok == ')') {
                 /* we do expect an operator next */
                 /* closing an opening paren */