lang: ast: implement parsing of match statements

This commit is contained in:
2024-12-04 22:22:25 +00:00
parent 0bb4a4284c
commit 7acf80f930
10 changed files with 396 additions and 13 deletions

View File

@@ -95,7 +95,7 @@ extern struct token_parse_result expr_finalise_and_return(
extern void arith_push_operator(
struct expr_parser_state *state, struct ivy_ast_node *node);
extern void arith_push_operand(
extern enum ivy_status arith_push_operand(
struct expr_parser_state *state, struct ivy_token *tok);
extern enum ivy_status arith_add_child(
@@ -117,9 +117,17 @@ extern struct token_parse_result arith_parse_semicolon(
struct ivy_parser *ctx, struct ivy_token *tok);
extern struct token_parse_result arith_parse_dot(
struct ivy_parser *ctx, struct ivy_token *tok);
extern struct token_parse_result arith_parse_comma(
struct ivy_parser *ctx, struct ivy_token *tok);
extern struct token_parse_result arith_parse_equal_right_angle(
struct ivy_parser *ctx, struct ivy_token *tok);
extern struct token_parse_result arith_parse_in(
struct ivy_parser *ctx, struct ivy_token *tok);
/* statement parser callbacks */
extern struct token_parse_result stmt_parse_match(
struct ivy_parser *ctx, struct ivy_token *tok);
extern struct token_parse_result stmt_parse_if(
struct ivy_parser *ctx, struct ivy_token *tok);
extern struct token_parse_result stmt_parse_then(