From d36b5c9fc8bb80a53a9b753736cc5918565fbd24 Mon Sep 17 00:00:00 2001 From: "Gu://em_" Date: Fri, 9 Jan 2026 16:32:15 +0100 Subject: [PATCH] docs: Signature and doc of the parser functions --- src/parser/parser.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/parser/parser.h b/src/parser/parser.h index ef5a449..759d4fd 100644 --- a/src/parser/parser.h +++ b/src/parser/parser.h @@ -1,4 +1,20 @@ #ifndef PARSER_H #define PARSER_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. + */ +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. + */ +struct ast* get_ast_str(char* command); + #endif /* ! PARSER_H */