Remove ast_new field from struct rb_parser_config_struct

`ast_new` can be embedded into `rb_ast_new`.
This commit is contained in:
yui-knk 2024-04-28 12:45:30 +09:00 committed by Yuichiro Kaneko
parent 5c3d5c7cdd
commit 29aaf4abe6
3 changed files with 2 additions and 13 deletions

3
node.c
View file

@ -301,8 +301,9 @@ rb_ast_t *
rb_ast_new(const rb_parser_config_t *config)
{
node_buffer_t *nb = rb_node_buffer_new(config);
rb_ast_t *ast = config->ast_new(nb);
rb_ast_t *ast = (rb_ast_t *)config->calloc(1, sizeof(rb_ast_t));
ast->config = config;
ast->node_buffer = nb;
return ast;
}
#else