fix(parser + lexer): interaction -- WIP
This commit is contained in:
parent
04529f858c
commit
10ce140e37
5 changed files with 99 additions and 48 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue