9{
16 "This token is unexpected here. It's expected to be a valid statement keyword."
17 );
18
19 return 1;
20 }
21
33 default:
39 "It's an invalid statement keyword. Are you sure it's a valid command or declaration?"
40 );
41
42 return 1;
43 }
44}
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 parse_statement_inst(module_t *module, ast_node_t *parent, token_t *token)
Parse a inst statement adding it as a children on parent AST node.
unsigned int parse_statement_include(module_t *module, ast_node_t *parent, token_t *token)
Parse a include statement adding it as a children on parent AST node.
unsigned int parse_statement_register(module_t *module, ast_node_t *parent, token_t *token)
Parse a register statement adding it as a children on parent AST node.
unsigned int parse_statement_set(module_t *module, ast_node_t *parent, token_t *token)
Parse a set statement adding it as a children on parent AST node.
unsigned int parse_statement_bitfield(module_t *module, ast_node_t *parent, token_t *token)
Parse a bitfield statement adding it as a children on parent AST node.
unsigned int length
The length of the 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.