]> git.corax.cc Git - ccc/commitdiff
grammar: Add syntax_node_set_property() and syntax_node_set_child() methods
authorMatthias Kruk <m@m10k.eu>
Tue, 21 Jul 2020 15:55:55 +0000 (00:55 +0900)
committerMatthias Kruk <m@m10k.eu>
Tue, 21 Jul 2020 15:55:55 +0000 (00:55 +0900)
src/grammar.c

index f4d1cd57892c13ad3004bd5f32154da271f4e034..e753a45e9b38fade452cf395027e83cab727f3b2 100644 (file)
@@ -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));
+}