Skip to content

Commit b38b2e0

Browse files
committed
Various fixes and starting on handling eject expressions
1 parent c9cf84b commit b38b2e0

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

parser/metac_expr_parser.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,9 +1187,11 @@ metac_expr_t* MetaCParser_ParseUnaryExpr(metac_parser_t* self)
11871187
{
11881188
result->EjectedStmt = MetaCParser_ParseStmt(self, 0, 0);
11891189
}
1190-
1191-
result->E1 = MetaCParser_ParseExpr(self, expr_flags_none, 0);
1192-
result->Hash = CRC32C_VALUE(eject_key, result->E1->Hash);
1190+
else
1191+
{
1192+
result->E1 = MetaCParser_ParseExpr(self, expr_flags_none, 0);
1193+
result->Hash = CRC32C_VALUE(eject_key, result->E1->Hash);
1194+
}
11931195
//PushOperand(result);
11941196
//PopOperator(expr_eject);
11951197
}

parser/metac_parser.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1756,7 +1756,10 @@ bool NextIsStmt(metac_parser_t* self, int32_t offset)
17561756
tok == tok_kw_case ||
17571757
tok == tok_kw_default ||
17581758
tok == tok_kw_return ||
1759-
tok == tok_kw__yield);
1759+
tok == tok_kw__yield ||
1760+
//TODO we cannot just use lBrace here as we could have a tuple expression
1761+
// or maybe we just don't eject tuple expressions ????
1762+
tok == tok_lBrace);
17601763
}
17611764

17621765

0 commit comments

Comments
 (0)