lang: ast: use fancy index manipulation to reduce the size of ast_node_type
This commit is contained in:
@@ -51,8 +51,8 @@ struct ast_node_type unit_node_ops = {
|
||||
.n_state_size = sizeof(struct parser_state),
|
||||
.n_node_size = sizeof(struct ivy_ast_unit_node),
|
||||
.n_keyword_parsers = {
|
||||
[IVY_KW_PACKAGE] = parse_package_keyword,
|
||||
[IVY_KW_CLASS] = parse_class_keyword,
|
||||
[IVY_KW_USE] = parse_use_keyword,
|
||||
KW_PARSER(PACKAGE, parse_package_keyword),
|
||||
KW_PARSER(CLASS, parse_class_keyword),
|
||||
KW_PARSER(USE, parse_use_keyword),
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user