mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-07 15:01:10 +00:00
the comma is now in the operator list
This commit is contained in:
parent
f03bffc3ee
commit
623046dda8
2 changed files with 2 additions and 6 deletions
2
lexer.h
2
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, 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]));
|
static const size_t operator_count = (sizeof(operators) / sizeof(operators[0]));
|
||||||
|
|
||||||
|
|
6
parser.c
6
parser.c
|
@ -458,12 +458,6 @@ static ast_expression* parser_expression(parser_t *parser)
|
||||||
goto onerr;
|
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 == ')') {
|
else if (parser->tok == ')') {
|
||||||
/* we do expect an operator next */
|
/* we do expect an operator next */
|
||||||
/* closing an opening paren */
|
/* closing an opening paren */
|
||||||
|
|
Loading…
Reference in a new issue