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:
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user