Remove unused ast_node_free_value
Values are all inside the ast struct and require no cleanup other than freeing the ast struct.
This commit is contained in:
parent
26cb374c1d
commit
1a79bf050e
@ -17,10 +17,6 @@ error_t *ast_node_alloc(ast_node_t **output) {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ast_node_free_value(ast_node_t *node) {
|
|
||||||
// TODO: decide how value ownership will work and clean it up here
|
|
||||||
}
|
|
||||||
|
|
||||||
void ast_node_free(ast_node_t *node) {
|
void ast_node_free(ast_node_t *node) {
|
||||||
if (node == nullptr)
|
if (node == nullptr)
|
||||||
return;
|
return;
|
||||||
@ -30,8 +26,6 @@ void ast_node_free(ast_node_t *node) {
|
|||||||
free(node->children);
|
free(node->children);
|
||||||
}
|
}
|
||||||
|
|
||||||
ast_node_free_value(node);
|
|
||||||
|
|
||||||
memset(node, 0, sizeof(ast_node_t));
|
memset(node, 0, sizeof(ast_node_t));
|
||||||
free(node);
|
free(node);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user