2026-01-07 20:18:11 +01:00
|
|
|
#ifndef PARSER_H
|
|
|
|
|
#define PARSER_H
|
|
|
|
|
|
2026-01-09 16:32:15 +01:00
|
|
|
#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.
|
2026-01-10 19:16:36 +01:00
|
|
|
*
|
|
|
|
|
* @warning NOT IMPLEMENTED
|
2026-01-09 16:32:15 +01:00
|
|
|
*/
|
|
|
|
|
struct ast* get_ast();
|
|
|
|
|
|
|
|
|
|
/* @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.
|
2026-01-10 19:16:36 +01:00
|
|
|
*
|
|
|
|
|
* @warning NOT IMPLEMENTED
|
2026-01-09 16:32:15 +01:00
|
|
|
*/
|
|
|
|
|
struct ast* get_ast_str(char* command);
|
|
|
|
|
|
2026-01-07 20:18:11 +01:00
|
|
|
#endif /* ! PARSER_H */
|