refactor(ast): one file per ast_type -- UNSTABLE (3)

This commit is contained in:
Matteo Flebus 2026-01-15 15:53:56 +01:00
parent 68d8a1fd13
commit e3ec484621
9 changed files with 76 additions and 9 deletions

View file

@ -27,4 +27,15 @@ struct ast
void *data;
};
/* @brief: returns an ast* with corresponding data and type.
*
* @note: this function should only be called by ast_create_[TYPE] functions.
*/
struct ast *ast_create(enum ast_type type, void *data);
/* @brief: frees the given ast. If ast is NULL, does nothing.
*
*/
void ast_free(struct ast *node)
#endif /* ! AST_H */