Skip to content

Commit 3899971

Browse files
committed
Fix setting of arguemnt hash and locationIdx
1 parent e18a64e commit 3899971

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

parser/metac_expr_parser.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,15 +1434,16 @@ expr_argument_list_t MetaCParser_ParseArgumentList(metac_parser_t* self, parse_e
14341434
{
14351435
nArguments++;
14361436
assert((*nextArgument) == _emptyPointer);
1437-
(*nextArgument) = (expr_argument_t*)AllocNewExpr(expr_argument);
1437+
(*nextArgument) = cast(expr_argument_t*)AllocNewExpr(expr_argument);
14381438
#ifndef OLD_PARSER
14391439
metac_expr_t* exp = MetaCParser_ParseExpr2(self, expr_flags_call);
14401440
#else
14411441
metac_expr_t* exp = MetaCParser_ParseExpr(self, expr_flags_call, 0);
14421442
#endif
14431443
((*nextArgument)->Expr) = exp;
1444-
assert(exp->Hash);
14451444
hash = CRC32C_VALUE(hash, exp->Hash);
1445+
(*nextArgument)->Hash = exp->Hash ^ CRC32C_PARENPAREN;
1446+
(*nextArgument)->LocationIdx = exp->LocationIdx;
14461447
nextArgument = &((*nextArgument)->Next);
14471448
(*nextArgument) = (expr_argument_t*) _emptyPointer;
14481449

0 commit comments

Comments
 (0)