the comma is now in the operator list

This commit is contained in:
Wolfgang Bumiller 2012-07-27 12:53:15 +02:00
parent f03bffc3ee
commit 623046dda8
2 changed files with 2 additions and 6 deletions

View file

@ -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]));

View file

@ -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 */