disambiguate enum blocks and complete distinct type operations

This commit is contained in:
2026-08-01 23:57:35 +02:00
parent 91aa601464
commit b9526b5f06
34 changed files with 1128 additions and 1963359 deletions
+2 -1
View File
@@ -1035,7 +1035,8 @@ parse_primary :: proc(parser: ^Parser, nesting: int) -> ast.Expr_Id {
}
payload := ast.INVALID_EXPR
end := member.span
if left_brace, ok := allow(parser, .Left_Brace); ok {
if !(parser.no_struct_literal && parser.delimiter_depth == 0) && current(parser).kind == .Left_Brace {
left_brace := advance(parser)
parser.delimiter_depth += 1
skip_newlines(parser)
if current(parser).kind == .Identifier && peek(parser).kind == .Equal {