Make the semantic analysis on the given module and evaluates the statements, constructing the in-memory intermediate representation.
7{
9
11 current = &module->ast.children[i];
12
16 break;
19 break;
22 break;
25 break;
27 break;
28 default:
34 "It's an invalid statement keyword. Are you sure it's a valid command or declaration?"
35 );
36
38 }
39 }
41}
void eval_bitfield(mir_t *mir, module_t *module, ast_node_t *ast)
Evaluates a bitfield statement.
void eval_include(mir_t *mir, module_t *module, ast_node_t *ast)
Evaluates an include statement.
void eval_register(mir_t *mir, module_t *module, ast_node_t *ast)
Evaluates a register statement.
void eval_set(mir_t *mir, module_t *module, ast_node_t *ast)
Evaluates a set statement.
void module_add_error(module_t *module, unsigned int line, unsigned int column, unsigned int length, const char *message)
Add error for the given module.
unsigned int children_count
unsigned int length
The length of the string.
Mya in-memory intermediate representation.
Struct that represents a Mya module.
ast_node_t ast
AST of the module.
long long int value
Integer value of the token.
dstring_t lexeme
Lexeme of the token.
unsigned int line
Token line inside the module.
unsigned int column
Column of the token position on the line.
struct ast_node ast_node_t