fix: merging all the code

This commit is contained in:
Matteo Flebus 2026-01-15 18:49:42 +01:00
parent 2e9e98d343
commit 1eecb1bd42
12 changed files with 86 additions and 61 deletions

View file

@ -8,6 +8,7 @@ enum ast_type
AST_END,
AST_LIST,
AST_IF,
AST_VOID,
AST_CMD
};
@ -24,4 +25,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_BASE_H */