lang: ast: implement parsing of while-loops

This commit is contained in:
2024-12-05 19:29:21 +00:00
parent e23cd801c9
commit 1a4d6089a1
6 changed files with 261 additions and 4 deletions

View File

@@ -39,10 +39,12 @@ struct ast_node_type expr_node_ops = {
},
.n_keyword_parsers = {
/* statement keywords */
KW_PARSER(WHILE, stmt_parse_while),
KW_PARSER(MATCH, stmt_parse_match),
KW_PARSER(IF, stmt_parse_if),
KW_PARSER(THEN, stmt_parse_then),
KW_PARSER(ELSE, stmt_parse_else),
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 */