refactor(ast): one file per ast_type -- UNSTABLE (3)
This commit is contained in:
parent
68d8a1fd13
commit
e3ec484621
9 changed files with 76 additions and 9 deletions
|
|
@ -30,3 +30,15 @@ bool ast_is_if(struct ast *node)
|
|||
assert(node != NULL);
|
||||
return node->type == AST_IF;
|
||||
}
|
||||
|
||||
void ast_free_if(struct ast_if *if_data)
|
||||
{
|
||||
if (if_data == NULL)
|
||||
return;
|
||||
|
||||
ast_free(if_data->condition);
|
||||
ast_free(if_data->then_clause);
|
||||
ast_free(if_data->else_clause);
|
||||
|
||||
free(if_data);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue