feat: materialize tagged-union and fallible constants

This commit is contained in:
2026-10-27 01:22:09 +01:00
parent e5215c4092
commit bf65f3c2c3
10 changed files with 312 additions and 38 deletions
+1 -1
View File
@@ -303,7 +303,7 @@ parse_statement proc(state @mut State, allow_else bool) ast.NodeId ! ParseError
.defer, .errdefer: return try parse_cleanup(state, allow_else)
.open_curly: return try ast.add_block_stmt(state.builder, try parse_block(state))
.ident, .int, .float, .string, .true, .false, .minus, .bang, .open_paren, .open_bracket, .struct,
.enum, .union, .distinct, .alias, .dot, .match, .ampersand, .at, .star, .question, .null, .try: {
.enum, .union, .distinct, .alias, .dot, .match, .ampersand, .at, .star, .question, .null, .try, .dollar: {
expression :: try parse_expr(state)
if next_is(state, .equal) return try parse_assignment(state, expression, allow_else)
return try ast.add_expression_stmt(state.builder, expression)