Evaluates a bitfield specification expression.
11{
18 "Unexpected token where is expected a bitfield specification expression."
19 );
20
21 return;
22 }
23
31 "Unexpected token where is expected a bitfield specification's field list or expression."
32 );
33
34 return;
35 }
36
39
44 break;
47 break;
50 break;
56 }
57 break;
58 }
59}
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 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.
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 mir_bitfield_spec mir_bitfield_spec_t
A bitfield or bitfield's field declaration.