#ifndef AST_EVAL_H #define AST_EVAL_H #include "ast/ast.h" /** * @brief Shell true value, this is not the builtin true. */ #define SHELL_TRUE 0 /** * @brief Shell false value, this is not the builtin false. */ #define SHELL_FALSE 1 /** * @brief Returns the exit code of the given AST. * @param ast The AST to evaluate. It is given as a `struct ast*` * and uses an inheritance-like principle. * An AST can be of any type from the `enum ast_node`. */ int eval_ast(struct ast *ast); #endif /* ! AST_EVAL_H */