lang: ast: implement control flags returned by parser functions
This commit is contained in:
@@ -9,7 +9,19 @@
|
||||
|
||||
struct parser_state;
|
||||
|
||||
typedef enum ivy_status (*token_parse_function)(
|
||||
#define PARSE_RESULT(status, flags) \
|
||||
((struct token_parse_result) {.r_status = (status), .r_flags = (flags) })
|
||||
|
||||
enum token_parse_flags {
|
||||
PARSE_REPEAT_TOKEN = 0x01u,
|
||||
};
|
||||
|
||||
struct token_parse_result {
|
||||
enum ivy_status r_status;
|
||||
enum token_parse_flags r_flags;
|
||||
};
|
||||
|
||||
typedef struct token_parse_result (*token_parse_function)(
|
||||
struct ivy_parser *, struct ivy_token *);
|
||||
|
||||
struct ast_node_type {
|
||||
|
||||
Reference in New Issue
Block a user