42sh/src/parser/parser.h

25 lines
711 B
C

#ifndef PARSER_H
#define PARSER_H
#include "../lexer/lexer.h"
#include "../utils/ast/ast.h"
/* @brief Builds the AST representation of the next command to execute.
*
* @return Returns the AST representation of the next command to execute.
* If there is no command left to execute, retuns an AST_END node.
*
* @warning NOT IMPLEMENTED
*/
struct ast *get_ast(struct lexer_context *ctx);
/* @brief Builds the AST representation of the given command string.
*
* @return Returns the AST representation of the given command string.
* Returns an AST_END node if the given command is empty.
*
* @warning NOT IMPLEMENTED
*/
struct ast *get_ast_str(char *command);
#endif /* ! PARSER_H */