lang: ast: re-write expression parser to support keyword messages

also adjust some parser state callbackss to better support sub-parsers returning
 results to their parents.
This commit is contained in:
2024-12-02 07:56:27 +00:00
parent 1c73e1d37b
commit 1c5b23d968
11 changed files with 605 additions and 613 deletions

View File

@@ -80,9 +80,9 @@ static struct token_parse_result parse_pipe(
}
static enum ivy_status add_child(
struct ivy_ast_node *parent, struct ivy_ast_node *child)
struct parser_state *parent, struct ivy_ast_node *child)
{
struct ivy_ast_msgh_node *msgh = (struct ivy_ast_msgh_node *)parent;
struct ivy_ast_msgh_node *msgh = (struct ivy_ast_msgh_node *)parent->s_node;
if (child->n_type == IVY_AST_SELECTOR && !msgh->n_sel) {
msgh->n_sel = (struct ivy_ast_selector_node *)child;