25 "Unexpected token inside an expression."
int64_t _op_unary_eval(operator_t op, int64_t a)
int64_t _op_binary_eval(int64_t a, operator_t op, int64_t b)
int64_t eval_expression(hashtable_t *variables, module_t *module, ast_node_t *ast)
Evaluates a mathetical expression.
error_code_t hashtable_get(hashtable_t *hashtable, const char *key, int64_t *value)
Get the value of the specified key inside the hashtable.
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
struct ast_node * children
unsigned int length
The length of the string.
char * data
Pointer for the raw string content (a normal C string).
Struct that represents a Mya module.
long long int value
Integer value of the token.
token_type_t type
Token type.
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
struct hashtable hashtable_t
A hashtable.
struct module module_t
Struct that represents a Mya module.