make record fields resolve type-factory calls before runtime validation
This commit is contained in:
@@ -2176,7 +2176,11 @@ parse_if :: proc(parser: ^Parser) -> ast.Stmt_Id {
|
||||
else_body: []ast.Stmt_Id = nil
|
||||
saved_cursor := parser.cursor
|
||||
skip_newlines(parser)
|
||||
if current(parser).kind == .Keyword_Else {
|
||||
// `else:` (and the reserved `else |...|:` shape) starts the next match arm;
|
||||
// it is not the else-branch of a brace-less if used as the previous arm body.
|
||||
match_arm_else := current(parser).kind == .Keyword_Else &&
|
||||
(peek(parser).kind == .Colon || peek(parser).kind == .Pipe)
|
||||
if current(parser).kind == .Keyword_Else && !match_arm_else {
|
||||
advance(parser)
|
||||
skip_newlines(parser)
|
||||
if current(parser).kind == .Keyword_If {
|
||||
|
||||
Reference in New Issue
Block a user