10#define MODULE_MAX_FILEPATH_SIZE 127
11#define MODULE_INITIAL_ERRORS_LENGTH 5
12#define MODULE_INITIAL_TOKENS_LENGTH 100
13#define MODULE_ERRORS_LENGTH_INCREMENT 10
14#define MODULE_TOKENS_LENGTH_INCREMENT 50
15#define MODULE_MAX_QUEUE_LENGTH 100
16#define MODULE_MIN_QUEUE_LENGTH 20
Struct that represents a error inside a Mya module.
dstring_t message
The error message to print.
unsigned int line
The module's line where the error is.
unsigned int length
The length of the part where has an error in the line.
unsigned int column
The line's column where the error starts.
Struct that represents a Mya module.
ast_node_t ast
AST of the module.
module_error_t * errors
List of errors inside the module.
cqueue_t _queue
Internal queue to read file character by character.
char filepath[MODULE_MAX_FILEPATH_SIZE+1]
Module's filepath.
unsigned int _tokens_length
Internal field with the size of tokens allocated memory.
unsigned int _errors_length
Internal field with the size of errors allocated memory.
unsigned int errors_count
Number of errors on errors list.
token_t * tokens
List of tokens inside the module.
FILE * file
Module's file handler.
unsigned int tokens_count
Number of tokens on tokens list.
struct ast_node ast_node_t
struct dstring dstring_t
A dynamic string (dstring) that automatically reallocate her buffer when needed.
#define MODULE_MAX_FILEPATH_SIZE
struct module module_t
Struct that represents a Mya module.
struct module_error module_error_t
Struct that represents a error inside a Mya module.
struct cqueue cqueue_t
Circular queue of integers.
struct token token_t
Struct for a Mya token.