#ifndef PARSER_H #define PARSER_H #include "ast/ast.h" #include "lexer/lexer.h" #include "parser/parser_utils.h" /** * @brief The main function to be called in the main loop. It will parse the * current expression given by the lexer. Return NULL and set the state variable * to `ERROR` if an error occured, else return the AST for this expression. * @param lexer The lexer used to create the AST. * @param state A pointger used to store the current state of the pointer. */ struct ast *parse(struct lexer *lexer, enum parser_state *state); #endif /* ! PARSER_H */