From: Matthias Kruk Date: Tue, 21 Jul 2020 15:55:55 +0000 (+0900) Subject: grammar: Add syntax_node_set_property() and syntax_node_set_child() methods X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=733ed4a733e3cc502bef7fdd2ae8f0a56ab4360a;p=ccc grammar: Add syntax_node_set_property() and syntax_node_set_child() methods --- diff --git a/src/grammar.c b/src/grammar.c index f4d1cd5..e753a45 100644 --- a/src/grammar.c +++ b/src/grammar.c @@ -6040,3 +6040,13 @@ void syntax_node_free(struct syntax_node *node) free(node); return; } + +int syntax_node_set_property(struct syntax_node *node, const char *name, void *value) +{ + return(assoc_array_set(node->properties, name, value)); +} + +int syntax_node_set_child(struct syntax_node *node, const char *name, struct syntax_node *value) +{ + return(assoc_array_set(node->children, name, value)); +}