lang: ast: implement caret (return) parsing
This commit is contained in:
@@ -47,6 +47,9 @@ struct expr_parser_state {
|
||||
enum expr_type s_type;
|
||||
enum expr_subtype s_sub_type;
|
||||
|
||||
/* this is a return statement (prefixed with a caret) */
|
||||
bool s_return;
|
||||
|
||||
/* for arithmetic expressions, this records whether the previous
|
||||
* component (either a token or parenthesised group of tokens) is an
|
||||
* operator, operand, or message */
|
||||
@@ -117,6 +120,8 @@ 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_caret(
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user