lang: ast: use fancy index manipulation to reduce the size of ast_node_type
This commit is contained in:
@@ -100,11 +100,11 @@ struct ast_node_type unit_package_node_ops = {
|
||||
.n_state_size = sizeof(struct unit_package_parser_state),
|
||||
.n_node_size = sizeof(struct ivy_ast_unit_package_node),
|
||||
.n_symbol_parsers = {
|
||||
[IVY_SYM_DOT] = parse_dot,
|
||||
SYM_PARSER(DOT, parse_dot),
|
||||
},
|
||||
.n_token_parsers = {
|
||||
[IVY_TOK_IDENT] = parse_ident,
|
||||
[IVY_TOK_LINEFEED] = parse_linefeed,
|
||||
TOK_PARSER(IDENT, parse_ident),
|
||||
TOK_PARSER(LINEFEED, parse_linefeed),
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user