10#define MODULE_MAX_FILEPATH_SIZE 255
11#define MODULE_INITIAL_ERRORS_LENGTH 5
12#define MODULE_INITIAL_TOKENS_LENGTH 100
13#define MODULE_INITIAL_SUBMODULES_LENGTH 5
14#define MODULE_ERRORS_LENGTH_INCREMENT 10
15#define MODULE_TOKENS_LENGTH_INCREMENT 50
16#define MODULE_SUBMODULES_LENGTH_INCREMENT 10
17#define MODULE_MAX_QUEUE_LENGTH 100
18#define MODULE_MIN_QUEUE_LENGTH 20
Struct that represents an 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 submodules_count
Number of submodules on submodules list.
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.
struct module * submodules
List of submodules included by include statement.
unsigned int _submodules_length
Internal field with the size of submodules allocated memory.
unsigned int tokens_count
Number of tokens on tokens list.
struct ast_node ast_node_t
struct cqueue cqueue_t
Circular queue of integers.
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 an error inside a Mya module.
struct token token_t
Struct for a Mya token.