mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-compiler: remove traditional node generation from new_nth_ref
Remove if (!p->var_nodes_enabled) branch from new_nth_ref function to use variable-sized nodes exclusively for numbered regex references. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2475,10 +2475,6 @@ new_back_ref(parser_state *p, int n)
|
||||
static node*
|
||||
new_nth_ref(parser_state *p, int n)
|
||||
{
|
||||
if (!p->var_nodes_enabled) {
|
||||
return cons_head((node*)NODE_NTH_REF, int_to_node(n));
|
||||
}
|
||||
|
||||
size_t total_size = sizeof(struct mrb_ast_nth_ref_node);
|
||||
enum mrb_ast_size_class class = size_to_class(total_size);
|
||||
struct mrb_ast_nth_ref_node *nthref_node = (struct mrb_ast_nth_ref_node*)
|
||||
|
||||
+1072
-1076
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user