From 733ed4a733e3cc502bef7fdd2ae8f0a56ab4360a Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Wed, 22 Jul 2020 00:55:55 +0900 Subject: [PATCH] grammar: Add syntax_node_set_property() and syntax_node_set_child() methods --- src/grammar.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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)); +} -- 2.47.3