fix(parser + lexer): interaction -- WIP

This commit is contained in:
Matteo Flebus 2026-01-16 19:31:58 +01:00
parent 04529f858c
commit 10ce140e37
5 changed files with 99 additions and 48 deletions

View file

@ -3,6 +3,24 @@
#include "utils/ast/ast.h"
// === Macros
#define PEEK_TOKEN() \
peek_token(); \
if (token == NULL) \
{ \
puts("Internal error: cannot get the following token"); \
return NULL; \
}
#define POP_TOKEN() \
pop_token(); \
if (token == NULL) \
{ \
puts("Internal error: cannot get the following token"); \
return NULL; \
}
/* @brief Builds the AST representation of the next command to execute.
*
* @return Returns the AST representation of the next command to execute.