42sh/src/utils/ast/ast.h

31 lines
492 B
C
Raw Normal View History

#ifndef AST_H
#define AST_H
#include "utils/ast/ast_command.h"
#include "utils/ast/ast_if.h"
#include "utils/ast/ast_list.h"
#include "utils/ast/ast_void.h"
enum ast_type
{
AST_END,
AST_LIST,
2026-01-08 18:36:07 +01:00
AST_IF,
AST_CMD
};
struct ast
2026-01-08 18:17:02 +01:00
{
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_H */