2026-01-15 17:12:06 +01:00
|
|
|
#ifndef AST_BASE_H
|
|
|
|
|
#define AST_BASE_H
|
|
|
|
|
|
2026-01-15 17:41:15 +01:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
2026-01-15 17:12:06 +01:00
|
|
|
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 */
|