lang: ast: fix lambdas starting with var declaration not being parsed correctly

IVY_KW_VAR is not treated as an expression start token (as variable declarations are not
strictly expressions). so the lambda parser did not create a block parser context
when it encountered this keyword.
This commit is contained in:
2025-04-23 10:56:15 +01:00
parent 0cdefbeec3
commit c7aa3b422d

View File

@@ -173,6 +173,9 @@ struct ast_node_type lambda_node_ops = {
SYM_PARSER(PIPE, parse_pipe),
SYM_PARSER(COLON, parse_colon),
},
.n_keyword_parsers = {
KW_PARSER(VAR, parse_expr_begin),
},
.n_expr_parser = {
.expr_begin = parse_expr_begin,
},