18 "Unexpected token where is expected a bitfield specification expression."
31 "Unexpected token where is expected a bitfield specification's field list or expression."
void dstring_copy(dstring_t *string, const char *source)
Copies the content of source to the dstring.
void eval_bitfield_spec(mir_bitfield_spec_t *spec, module_t *module, ast_node_t *ast, hashtable_t *variables)
Evaluates a bitfield specification expression.
mir_bitfield_spec_type_t _spec_type(ast_node_t *spec)
int64_t eval_expression(hashtable_t *variables, module_t *module, ast_node_t *ast)
Evaluates a mathetical expression.
mir_bitfield_spec_t * mir_bitfield_spec_set_spec(mir_bitfield_spec_t *spec, const char *name, mir_bitfield_spec_type_t type)
Set the bitfield spec's sub bitfield spec.
mir_bitfield_spec_t * mir_bitfield_spec_add_field(mir_bitfield_spec_t *spec, const char *name, mir_bitfield_spec_type_t type)
Add a new bitfield spec's field to the given bitfield spec.
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).
mir_bitfield_spec_type_t type
Specify the type of this bitfield specification.
dstring_t identifier
Bitfield's value identifier.
struct mir_bitfield_spec * spec
Bitfield's list of field specifications.
dstring_t name
Name of the bitfield.
int64_t value
Bitfield's literal value.
Struct that represents a Mya module.
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.
@ FT_LITERAL
Bitfield spec value is a literal value.
@ FT_FIELDS
Bitfied spec value has a body with a list of fields.
@ FT_SPEC
Bitfield spec value is a bitfield spec.
@ FT_IDENTIFIER
Bitfield spec value is a identifier.
enum mir_bitfield_spec_type mir_bitfield_spec_type_t
A bitfield spec type.
struct mir_bitfield_spec mir_bitfield_spec_t
A bitfield or bitfield's field declaration.
struct module module_t
Struct that represents a Mya module.