diff --git a/data/functions.qc b/data/functions.qc index 241be83..7e479c1 100644 --- a/data/functions.qc +++ b/data/functions.qc @@ -22,7 +22,7 @@ void() main = { pawn2 = spawn(); pawn.other = pawn2; - (pawn.other).vis = 0; + pawn.other.vis = 0; if (!visible(pawn.other)) print("Yes\n"); diff --git a/parser.c b/parser.c index 5fb8765..3608171 100644 --- a/parser.c +++ b/parser.c @@ -1167,6 +1167,21 @@ static ast_expression* parser_expression_leave(parser_t *parser, bool stopatcomm if (op->id == opid1(',') && !parens && stopatcomma) break; + if (sy.ops_count && !sy.ops[sy.ops_count-1].paren) + olast = &operators[sy.ops[sy.ops_count-1].etype-1]; + + while (olast && ( + (op->prec < olast->prec) || + (op->assoc == ASSOC_LEFT && op->prec <= olast->prec) ) ) + { + if (!parser_sy_pop(parser, &sy)) + goto onerr; + if (sy.ops_count && !sy.ops[sy.ops_count-1].paren) + olast = &operators[sy.ops[sy.ops_count-1].etype-1]; + else + olast = NULL; + } + if (op->id == opid1('.')) { /* for gmqcc standard: open up the namespace of the previous type */ ast_expression *prevex = sy.out[sy.out_count-1].out; @@ -1185,21 +1200,6 @@ static ast_expression* parser_expression_leave(parser_t *parser, bool stopatcomm gotmemberof = true; } - if (sy.ops_count && !sy.ops[sy.ops_count-1].paren) - olast = &operators[sy.ops[sy.ops_count-1].etype-1]; - - while (olast && ( - (op->prec < olast->prec) || - (op->assoc == ASSOC_LEFT && op->prec <= olast->prec) ) ) - { - if (!parser_sy_pop(parser, &sy)) - goto onerr; - if (sy.ops_count && !sy.ops[sy.ops_count-1].paren) - olast = &operators[sy.ops[sy.ops_count-1].etype-1]; - else - olast = NULL; - } - if (op->id == opid1('(')) { if (wantop) { DEBUGSHUNTDO(printf("push (\n"));