lang: ast: implement for-loop parsing

This commit is contained in:
2024-12-06 10:02:31 +00:00
parent f3cd89c72a
commit d88d58be70
7 changed files with 347 additions and 5 deletions

View File

@@ -40,15 +40,16 @@ struct ast_node_type expr_node_ops = {
},
.n_keyword_parsers = {
/* statement keywords */
KW_PARSER(FOR, stmt_parse_for),
KW_PARSER(WHILE, stmt_parse_while),
KW_PARSER(MATCH, stmt_parse_match),
KW_PARSER(IF, stmt_parse_if),
KW_PARSER(THEN, stmt_parse_end),
KW_PARSER(ELSE, stmt_parse_end),
KW_PARSER(DO, stmt_parse_end),
KW_PARSER(END, stmt_parse_end),
/* operator keywords */
/* operator/block keywords */
KW_PARSER(IN, arith_parse_in),
KW_PARSER(DO, arith_parse_do),
}
};