refactor(ast): one file per ast_type -- FINISHED
This commit is contained in:
parent
38f5a35885
commit
30df2993ee
10 changed files with 85 additions and 51 deletions
25
src/utils/ast/ast_base.h
Normal file
25
src/utils/ast/ast_base.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef AST_BASE_H
|
||||
#define AST_BASE_H
|
||||
|
||||
enum ast_type
|
||||
{
|
||||
AST_END,
|
||||
AST_LIST,
|
||||
AST_IF,
|
||||
AST_CMD
|
||||
};
|
||||
|
||||
struct ast
|
||||
{
|
||||
enum ast_type type;
|
||||
|
||||
/**
|
||||
* Data associated with this AST node. It can be one of the following:
|
||||
* - NULL (AST_END)
|
||||
* - struct ast_if* (AST_IF)
|
||||
* - struct ast_cmd* (AST_CMD)
|
||||
*/
|
||||
void *data;
|
||||
};
|
||||
|
||||
#endif /* ! AST_BASE_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue