yarp 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/ext/yarp/api_node.c CHANGED
@@ -1,6 +1,6 @@
1
1
  /******************************************************************************/
2
- /* This file is generated by the bin/template script and should not be */
3
- /* modified manually. See */
2
+ /* This file is generated by the templates/template.rb script and should not */
3
+ /* be modified manually. See */
4
4
  /* templates/ext/yarp/api_node.c.erb */
5
5
  /* if you are looking to modify the */
6
6
  /* template */
@@ -36,20 +36,23 @@ static VALUE rb_cYARPCallOperatorWriteNode;
36
36
  static VALUE rb_cYARPCapturePatternNode;
37
37
  static VALUE rb_cYARPCaseNode;
38
38
  static VALUE rb_cYARPClassNode;
39
- static VALUE rb_cYARPClassVariableOperatorAndWriteNode;
40
- static VALUE rb_cYARPClassVariableOperatorOrWriteNode;
39
+ static VALUE rb_cYARPClassVariableAndWriteNode;
41
40
  static VALUE rb_cYARPClassVariableOperatorWriteNode;
41
+ static VALUE rb_cYARPClassVariableOrWriteNode;
42
42
  static VALUE rb_cYARPClassVariableReadNode;
43
+ static VALUE rb_cYARPClassVariableTargetNode;
43
44
  static VALUE rb_cYARPClassVariableWriteNode;
44
- static VALUE rb_cYARPConstantOperatorAndWriteNode;
45
- static VALUE rb_cYARPConstantOperatorOrWriteNode;
45
+ static VALUE rb_cYARPConstantAndWriteNode;
46
46
  static VALUE rb_cYARPConstantOperatorWriteNode;
47
+ static VALUE rb_cYARPConstantOrWriteNode;
48
+ static VALUE rb_cYARPConstantPathAndWriteNode;
47
49
  static VALUE rb_cYARPConstantPathNode;
48
- static VALUE rb_cYARPConstantPathOperatorAndWriteNode;
49
- static VALUE rb_cYARPConstantPathOperatorOrWriteNode;
50
50
  static VALUE rb_cYARPConstantPathOperatorWriteNode;
51
+ static VALUE rb_cYARPConstantPathOrWriteNode;
52
+ static VALUE rb_cYARPConstantPathTargetNode;
51
53
  static VALUE rb_cYARPConstantPathWriteNode;
52
54
  static VALUE rb_cYARPConstantReadNode;
55
+ static VALUE rb_cYARPConstantTargetNode;
53
56
  static VALUE rb_cYARPConstantWriteNode;
54
57
  static VALUE rb_cYARPDefNode;
55
58
  static VALUE rb_cYARPDefinedNode;
@@ -65,20 +68,22 @@ static VALUE rb_cYARPForNode;
65
68
  static VALUE rb_cYARPForwardingArgumentsNode;
66
69
  static VALUE rb_cYARPForwardingParameterNode;
67
70
  static VALUE rb_cYARPForwardingSuperNode;
68
- static VALUE rb_cYARPGlobalVariableOperatorAndWriteNode;
69
- static VALUE rb_cYARPGlobalVariableOperatorOrWriteNode;
71
+ static VALUE rb_cYARPGlobalVariableAndWriteNode;
70
72
  static VALUE rb_cYARPGlobalVariableOperatorWriteNode;
73
+ static VALUE rb_cYARPGlobalVariableOrWriteNode;
71
74
  static VALUE rb_cYARPGlobalVariableReadNode;
75
+ static VALUE rb_cYARPGlobalVariableTargetNode;
72
76
  static VALUE rb_cYARPGlobalVariableWriteNode;
73
77
  static VALUE rb_cYARPHashNode;
74
78
  static VALUE rb_cYARPHashPatternNode;
75
79
  static VALUE rb_cYARPIfNode;
76
80
  static VALUE rb_cYARPImaginaryNode;
77
81
  static VALUE rb_cYARPInNode;
78
- static VALUE rb_cYARPInstanceVariableOperatorAndWriteNode;
79
- static VALUE rb_cYARPInstanceVariableOperatorOrWriteNode;
82
+ static VALUE rb_cYARPInstanceVariableAndWriteNode;
80
83
  static VALUE rb_cYARPInstanceVariableOperatorWriteNode;
84
+ static VALUE rb_cYARPInstanceVariableOrWriteNode;
81
85
  static VALUE rb_cYARPInstanceVariableReadNode;
86
+ static VALUE rb_cYARPInstanceVariableTargetNode;
82
87
  static VALUE rb_cYARPInstanceVariableWriteNode;
83
88
  static VALUE rb_cYARPIntegerNode;
84
89
  static VALUE rb_cYARPInterpolatedRegularExpressionNode;
@@ -89,10 +94,11 @@ static VALUE rb_cYARPKeywordHashNode;
89
94
  static VALUE rb_cYARPKeywordParameterNode;
90
95
  static VALUE rb_cYARPKeywordRestParameterNode;
91
96
  static VALUE rb_cYARPLambdaNode;
92
- static VALUE rb_cYARPLocalVariableOperatorAndWriteNode;
93
- static VALUE rb_cYARPLocalVariableOperatorOrWriteNode;
97
+ static VALUE rb_cYARPLocalVariableAndWriteNode;
94
98
  static VALUE rb_cYARPLocalVariableOperatorWriteNode;
99
+ static VALUE rb_cYARPLocalVariableOrWriteNode;
95
100
  static VALUE rb_cYARPLocalVariableReadNode;
101
+ static VALUE rb_cYARPLocalVariableTargetNode;
96
102
  static VALUE rb_cYARPLocalVariableWriteNode;
97
103
  static VALUE rb_cYARPMatchPredicateNode;
98
104
  static VALUE rb_cYARPMatchRequiredNode;
@@ -319,7 +325,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
319
325
  case YP_NODE_BLOCK_NODE: {
320
326
  yp_block_node_t *cast = (yp_block_node_t *) node;
321
327
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->parameters);
322
- yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
328
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->body);
323
329
  break;
324
330
  }
325
331
  #line 111 "api_node.c.erb"
@@ -385,24 +391,24 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
385
391
  yp_class_node_t *cast = (yp_class_node_t *) node;
386
392
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->constant_path);
387
393
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->superclass);
388
- yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
394
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->body);
389
395
  break;
390
396
  }
391
397
  #line 111 "api_node.c.erb"
392
- case YP_NODE_CLASS_VARIABLE_OPERATOR_AND_WRITE_NODE: {
393
- yp_class_variable_operator_and_write_node_t *cast = (yp_class_variable_operator_and_write_node_t *) node;
398
+ case YP_NODE_CLASS_VARIABLE_AND_WRITE_NODE: {
399
+ yp_class_variable_and_write_node_t *cast = (yp_class_variable_and_write_node_t *) node;
394
400
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
395
401
  break;
396
402
  }
397
403
  #line 111 "api_node.c.erb"
398
- case YP_NODE_CLASS_VARIABLE_OPERATOR_OR_WRITE_NODE: {
399
- yp_class_variable_operator_or_write_node_t *cast = (yp_class_variable_operator_or_write_node_t *) node;
404
+ case YP_NODE_CLASS_VARIABLE_OPERATOR_WRITE_NODE: {
405
+ yp_class_variable_operator_write_node_t *cast = (yp_class_variable_operator_write_node_t *) node;
400
406
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
401
407
  break;
402
408
  }
403
409
  #line 111 "api_node.c.erb"
404
- case YP_NODE_CLASS_VARIABLE_OPERATOR_WRITE_NODE: {
405
- yp_class_variable_operator_write_node_t *cast = (yp_class_variable_operator_write_node_t *) node;
410
+ case YP_NODE_CLASS_VARIABLE_OR_WRITE_NODE: {
411
+ yp_class_variable_or_write_node_t *cast = (yp_class_variable_or_write_node_t *) node;
406
412
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
407
413
  break;
408
414
  }
@@ -413,20 +419,27 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
413
419
  break;
414
420
  }
415
421
  #line 111 "api_node.c.erb"
416
- case YP_NODE_CONSTANT_OPERATOR_AND_WRITE_NODE: {
417
- yp_constant_operator_and_write_node_t *cast = (yp_constant_operator_and_write_node_t *) node;
422
+ case YP_NODE_CONSTANT_AND_WRITE_NODE: {
423
+ yp_constant_and_write_node_t *cast = (yp_constant_and_write_node_t *) node;
418
424
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
419
425
  break;
420
426
  }
421
427
  #line 111 "api_node.c.erb"
422
- case YP_NODE_CONSTANT_OPERATOR_OR_WRITE_NODE: {
423
- yp_constant_operator_or_write_node_t *cast = (yp_constant_operator_or_write_node_t *) node;
428
+ case YP_NODE_CONSTANT_OPERATOR_WRITE_NODE: {
429
+ yp_constant_operator_write_node_t *cast = (yp_constant_operator_write_node_t *) node;
424
430
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
425
431
  break;
426
432
  }
427
433
  #line 111 "api_node.c.erb"
428
- case YP_NODE_CONSTANT_OPERATOR_WRITE_NODE: {
429
- yp_constant_operator_write_node_t *cast = (yp_constant_operator_write_node_t *) node;
434
+ case YP_NODE_CONSTANT_OR_WRITE_NODE: {
435
+ yp_constant_or_write_node_t *cast = (yp_constant_or_write_node_t *) node;
436
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
437
+ break;
438
+ }
439
+ #line 111 "api_node.c.erb"
440
+ case YP_NODE_CONSTANT_PATH_AND_WRITE_NODE: {
441
+ yp_constant_path_and_write_node_t *cast = (yp_constant_path_and_write_node_t *) node;
442
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->target);
430
443
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
431
444
  break;
432
445
  }
@@ -438,24 +451,24 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
438
451
  break;
439
452
  }
440
453
  #line 111 "api_node.c.erb"
441
- case YP_NODE_CONSTANT_PATH_OPERATOR_AND_WRITE_NODE: {
442
- yp_constant_path_operator_and_write_node_t *cast = (yp_constant_path_operator_and_write_node_t *) node;
454
+ case YP_NODE_CONSTANT_PATH_OPERATOR_WRITE_NODE: {
455
+ yp_constant_path_operator_write_node_t *cast = (yp_constant_path_operator_write_node_t *) node;
443
456
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->target);
444
457
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
445
458
  break;
446
459
  }
447
460
  #line 111 "api_node.c.erb"
448
- case YP_NODE_CONSTANT_PATH_OPERATOR_OR_WRITE_NODE: {
449
- yp_constant_path_operator_or_write_node_t *cast = (yp_constant_path_operator_or_write_node_t *) node;
461
+ case YP_NODE_CONSTANT_PATH_OR_WRITE_NODE: {
462
+ yp_constant_path_or_write_node_t *cast = (yp_constant_path_or_write_node_t *) node;
450
463
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->target);
451
464
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
452
465
  break;
453
466
  }
454
467
  #line 111 "api_node.c.erb"
455
- case YP_NODE_CONSTANT_PATH_OPERATOR_WRITE_NODE: {
456
- yp_constant_path_operator_write_node_t *cast = (yp_constant_path_operator_write_node_t *) node;
457
- yp_node_stack_push(&node_stack, (yp_node_t *) cast->target);
458
- yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
468
+ case YP_NODE_CONSTANT_PATH_TARGET_NODE: {
469
+ yp_constant_path_target_node_t *cast = (yp_constant_path_target_node_t *) node;
470
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->parent);
471
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->child);
459
472
  break;
460
473
  }
461
474
  #line 111 "api_node.c.erb"
@@ -476,7 +489,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
476
489
  yp_def_node_t *cast = (yp_def_node_t *) node;
477
490
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->receiver);
478
491
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->parameters);
479
- yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
492
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->body);
480
493
  break;
481
494
  }
482
495
  #line 111 "api_node.c.erb"
@@ -542,20 +555,20 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
542
555
  break;
543
556
  }
544
557
  #line 111 "api_node.c.erb"
545
- case YP_NODE_GLOBAL_VARIABLE_OPERATOR_AND_WRITE_NODE: {
546
- yp_global_variable_operator_and_write_node_t *cast = (yp_global_variable_operator_and_write_node_t *) node;
558
+ case YP_NODE_GLOBAL_VARIABLE_AND_WRITE_NODE: {
559
+ yp_global_variable_and_write_node_t *cast = (yp_global_variable_and_write_node_t *) node;
547
560
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
548
561
  break;
549
562
  }
550
563
  #line 111 "api_node.c.erb"
551
- case YP_NODE_GLOBAL_VARIABLE_OPERATOR_OR_WRITE_NODE: {
552
- yp_global_variable_operator_or_write_node_t *cast = (yp_global_variable_operator_or_write_node_t *) node;
564
+ case YP_NODE_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: {
565
+ yp_global_variable_operator_write_node_t *cast = (yp_global_variable_operator_write_node_t *) node;
553
566
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
554
567
  break;
555
568
  }
556
569
  #line 111 "api_node.c.erb"
557
- case YP_NODE_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: {
558
- yp_global_variable_operator_write_node_t *cast = (yp_global_variable_operator_write_node_t *) node;
570
+ case YP_NODE_GLOBAL_VARIABLE_OR_WRITE_NODE: {
571
+ yp_global_variable_or_write_node_t *cast = (yp_global_variable_or_write_node_t *) node;
559
572
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
560
573
  break;
561
574
  }
@@ -605,20 +618,20 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
605
618
  break;
606
619
  }
607
620
  #line 111 "api_node.c.erb"
608
- case YP_NODE_INSTANCE_VARIABLE_OPERATOR_AND_WRITE_NODE: {
609
- yp_instance_variable_operator_and_write_node_t *cast = (yp_instance_variable_operator_and_write_node_t *) node;
621
+ case YP_NODE_INSTANCE_VARIABLE_AND_WRITE_NODE: {
622
+ yp_instance_variable_and_write_node_t *cast = (yp_instance_variable_and_write_node_t *) node;
610
623
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
611
624
  break;
612
625
  }
613
626
  #line 111 "api_node.c.erb"
614
- case YP_NODE_INSTANCE_VARIABLE_OPERATOR_OR_WRITE_NODE: {
615
- yp_instance_variable_operator_or_write_node_t *cast = (yp_instance_variable_operator_or_write_node_t *) node;
627
+ case YP_NODE_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: {
628
+ yp_instance_variable_operator_write_node_t *cast = (yp_instance_variable_operator_write_node_t *) node;
616
629
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
617
630
  break;
618
631
  }
619
632
  #line 111 "api_node.c.erb"
620
- case YP_NODE_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: {
621
- yp_instance_variable_operator_write_node_t *cast = (yp_instance_variable_operator_write_node_t *) node;
633
+ case YP_NODE_INSTANCE_VARIABLE_OR_WRITE_NODE: {
634
+ yp_instance_variable_or_write_node_t *cast = (yp_instance_variable_or_write_node_t *) node;
622
635
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
623
636
  break;
624
637
  }
@@ -678,24 +691,24 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
678
691
  case YP_NODE_LAMBDA_NODE: {
679
692
  yp_lambda_node_t *cast = (yp_lambda_node_t *) node;
680
693
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->parameters);
681
- yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
694
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->body);
682
695
  break;
683
696
  }
684
697
  #line 111 "api_node.c.erb"
685
- case YP_NODE_LOCAL_VARIABLE_OPERATOR_AND_WRITE_NODE: {
686
- yp_local_variable_operator_and_write_node_t *cast = (yp_local_variable_operator_and_write_node_t *) node;
698
+ case YP_NODE_LOCAL_VARIABLE_AND_WRITE_NODE: {
699
+ yp_local_variable_and_write_node_t *cast = (yp_local_variable_and_write_node_t *) node;
687
700
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
688
701
  break;
689
702
  }
690
703
  #line 111 "api_node.c.erb"
691
- case YP_NODE_LOCAL_VARIABLE_OPERATOR_OR_WRITE_NODE: {
692
- yp_local_variable_operator_or_write_node_t *cast = (yp_local_variable_operator_or_write_node_t *) node;
704
+ case YP_NODE_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: {
705
+ yp_local_variable_operator_write_node_t *cast = (yp_local_variable_operator_write_node_t *) node;
693
706
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
694
707
  break;
695
708
  }
696
709
  #line 111 "api_node.c.erb"
697
- case YP_NODE_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: {
698
- yp_local_variable_operator_write_node_t *cast = (yp_local_variable_operator_write_node_t *) node;
710
+ case YP_NODE_LOCAL_VARIABLE_OR_WRITE_NODE: {
711
+ yp_local_variable_or_write_node_t *cast = (yp_local_variable_or_write_node_t *) node;
699
712
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
700
713
  break;
701
714
  }
@@ -723,7 +736,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
723
736
  case YP_NODE_MODULE_NODE: {
724
737
  yp_module_node_t *cast = (yp_module_node_t *) node;
725
738
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->constant_path);
726
- yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
739
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->body);
727
740
  break;
728
741
  }
729
742
  #line 111 "api_node.c.erb"
@@ -777,7 +790,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
777
790
  #line 111 "api_node.c.erb"
778
791
  case YP_NODE_PARENTHESES_NODE: {
779
792
  yp_parentheses_node_t *cast = (yp_parentheses_node_t *) node;
780
- yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
793
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->body);
781
794
  break;
782
795
  }
783
796
  #line 111 "api_node.c.erb"
@@ -859,7 +872,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
859
872
  case YP_NODE_SINGLETON_CLASS_NODE: {
860
873
  yp_singleton_class_node_t *cast = (yp_singleton_class_node_t *) node;
861
874
  yp_node_stack_push(&node_stack, (yp_node_t *) cast->expression);
862
- yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
875
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->body);
863
876
  break;
864
877
  }
865
878
  #line 111 "api_node.c.erb"
@@ -1009,7 +1022,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1009
1022
  VALUE argv[2];
1010
1023
 
1011
1024
  // arguments
1012
- argv[0] = rb_ary_new();
1025
+ argv[0] = rb_ary_new_capa(cast->arguments.size);
1013
1026
  for (size_t index = 0; index < cast->arguments.size; index++) {
1014
1027
  rb_ary_push(argv[0], rb_ary_pop(value_stack));
1015
1028
  }
@@ -1026,7 +1039,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1026
1039
  VALUE argv[4];
1027
1040
 
1028
1041
  // elements
1029
- argv[0] = rb_ary_new();
1042
+ argv[0] = rb_ary_new_capa(cast->elements.size);
1030
1043
  for (size_t index = 0; index < cast->elements.size; index++) {
1031
1044
  rb_ary_push(argv[0], rb_ary_pop(value_stack));
1032
1045
  }
@@ -1052,7 +1065,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1052
1065
  argv[0] = rb_ary_pop(value_stack);
1053
1066
 
1054
1067
  // requireds
1055
- argv[1] = rb_ary_new();
1068
+ argv[1] = rb_ary_new_capa(cast->requireds.size);
1056
1069
  for (size_t index = 0; index < cast->requireds.size; index++) {
1057
1070
  rb_ary_push(argv[1], rb_ary_pop(value_stack));
1058
1071
  }
@@ -1061,7 +1074,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1061
1074
  argv[2] = rb_ary_pop(value_stack);
1062
1075
 
1063
1076
  // posts
1064
- argv[3] = rb_ary_new();
1077
+ argv[3] = rb_ary_new_capa(cast->posts.size);
1065
1078
  for (size_t index = 0; index < cast->posts.size; index++) {
1066
1079
  rb_ary_push(argv[3], rb_ary_pop(value_stack));
1067
1080
  }
@@ -1177,7 +1190,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1177
1190
  VALUE argv[6];
1178
1191
 
1179
1192
  // locals
1180
- argv[0] = rb_ary_new();
1193
+ argv[0] = rb_ary_new_capa(cast->locals.size);
1181
1194
  for (size_t index = 0; index < cast->locals.size; index++) {
1182
1195
  rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
1183
1196
  }
@@ -1185,7 +1198,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1185
1198
  // parameters
1186
1199
  argv[1] = rb_ary_pop(value_stack);
1187
1200
 
1188
- // statements
1201
+ // body
1189
1202
  argv[2] = rb_ary_pop(value_stack);
1190
1203
 
1191
1204
  // opening_loc
@@ -1226,7 +1239,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1226
1239
  argv[0] = rb_ary_pop(value_stack);
1227
1240
 
1228
1241
  // locals
1229
- argv[1] = rb_ary_new();
1242
+ argv[1] = rb_ary_new_capa(cast->locals.size);
1230
1243
  for (size_t index = 0; index < cast->locals.size; index++) {
1231
1244
  yp_location_t location = cast->locals.locations[index];
1232
1245
  rb_ary_push(argv[1], yp_location_new(parser, location.start, location.end, source));
@@ -1391,7 +1404,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1391
1404
  argv[0] = rb_ary_pop(value_stack);
1392
1405
 
1393
1406
  // conditions
1394
- argv[1] = rb_ary_new();
1407
+ argv[1] = rb_ary_new_capa(cast->conditions.size);
1395
1408
  for (size_t index = 0; index < cast->conditions.size; index++) {
1396
1409
  rb_ary_push(argv[1], rb_ary_pop(value_stack));
1397
1410
  }
@@ -1414,10 +1427,10 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1414
1427
  #line 137 "api_node.c.erb"
1415
1428
  case YP_NODE_CLASS_NODE: {
1416
1429
  yp_class_node_t *cast = (yp_class_node_t *) node;
1417
- VALUE argv[8];
1430
+ VALUE argv[9];
1418
1431
 
1419
1432
  // locals
1420
- argv[0] = rb_ary_new();
1433
+ argv[0] = rb_ary_new_capa(cast->locals.size);
1421
1434
  for (size_t index = 0; index < cast->locals.size; index++) {
1422
1435
  rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
1423
1436
  }
@@ -1434,21 +1447,24 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1434
1447
  // superclass
1435
1448
  argv[4] = rb_ary_pop(value_stack);
1436
1449
 
1437
- // statements
1450
+ // body
1438
1451
  argv[5] = rb_ary_pop(value_stack);
1439
1452
 
1440
1453
  // end_keyword_loc
1441
1454
  argv[6] = yp_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
1442
1455
 
1456
+ // name
1457
+ argv[7] = yp_string_new(&cast->name, encoding);
1458
+
1443
1459
  // location
1444
- argv[7] = yp_location_new(parser, node->location.start, node->location.end, source);
1460
+ argv[8] = yp_location_new(parser, node->location.start, node->location.end, source);
1445
1461
 
1446
- rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cYARPClassNode));
1462
+ rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cYARPClassNode));
1447
1463
  break;
1448
1464
  }
1449
1465
  #line 137 "api_node.c.erb"
1450
- case YP_NODE_CLASS_VARIABLE_OPERATOR_AND_WRITE_NODE: {
1451
- yp_class_variable_operator_and_write_node_t *cast = (yp_class_variable_operator_and_write_node_t *) node;
1466
+ case YP_NODE_CLASS_VARIABLE_AND_WRITE_NODE: {
1467
+ yp_class_variable_and_write_node_t *cast = (yp_class_variable_and_write_node_t *) node;
1452
1468
  VALUE argv[4];
1453
1469
 
1454
1470
  // name_loc
@@ -1463,13 +1479,13 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1463
1479
  // location
1464
1480
  argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1465
1481
 
1466
- rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPClassVariableOperatorAndWriteNode));
1482
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPClassVariableAndWriteNode));
1467
1483
  break;
1468
1484
  }
1469
1485
  #line 137 "api_node.c.erb"
1470
- case YP_NODE_CLASS_VARIABLE_OPERATOR_OR_WRITE_NODE: {
1471
- yp_class_variable_operator_or_write_node_t *cast = (yp_class_variable_operator_or_write_node_t *) node;
1472
- VALUE argv[4];
1486
+ case YP_NODE_CLASS_VARIABLE_OPERATOR_WRITE_NODE: {
1487
+ yp_class_variable_operator_write_node_t *cast = (yp_class_variable_operator_write_node_t *) node;
1488
+ VALUE argv[5];
1473
1489
 
1474
1490
  // name_loc
1475
1491
  argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
@@ -1480,16 +1496,19 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1480
1496
  // value
1481
1497
  argv[2] = rb_ary_pop(value_stack);
1482
1498
 
1499
+ // operator
1500
+ argv[3] = rb_id2sym(constants[cast->operator - 1]);
1501
+
1483
1502
  // location
1484
- argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1503
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
1485
1504
 
1486
- rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPClassVariableOperatorOrWriteNode));
1505
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPClassVariableOperatorWriteNode));
1487
1506
  break;
1488
1507
  }
1489
1508
  #line 137 "api_node.c.erb"
1490
- case YP_NODE_CLASS_VARIABLE_OPERATOR_WRITE_NODE: {
1491
- yp_class_variable_operator_write_node_t *cast = (yp_class_variable_operator_write_node_t *) node;
1492
- VALUE argv[5];
1509
+ case YP_NODE_CLASS_VARIABLE_OR_WRITE_NODE: {
1510
+ yp_class_variable_or_write_node_t *cast = (yp_class_variable_or_write_node_t *) node;
1511
+ VALUE argv[4];
1493
1512
 
1494
1513
  // name_loc
1495
1514
  argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
@@ -1500,13 +1519,10 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1500
1519
  // value
1501
1520
  argv[2] = rb_ary_pop(value_stack);
1502
1521
 
1503
- // operator
1504
- argv[3] = rb_id2sym(constants[cast->operator - 1]);
1505
-
1506
1522
  // location
1507
- argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
1523
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1508
1524
 
1509
- rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPClassVariableOperatorWriteNode));
1525
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPClassVariableOrWriteNode));
1510
1526
  break;
1511
1527
  }
1512
1528
  #line 137 "api_node.c.erb"
@@ -1519,6 +1535,16 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1519
1535
  rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPClassVariableReadNode));
1520
1536
  break;
1521
1537
  }
1538
+ #line 137 "api_node.c.erb"
1539
+ case YP_NODE_CLASS_VARIABLE_TARGET_NODE: {
1540
+ VALUE argv[1];
1541
+
1542
+ // location
1543
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
1544
+
1545
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPClassVariableTargetNode));
1546
+ break;
1547
+ }
1522
1548
  #line 137 "api_node.c.erb"
1523
1549
  case YP_NODE_CLASS_VARIABLE_WRITE_NODE: {
1524
1550
  yp_class_variable_write_node_t *cast = (yp_class_variable_write_node_t *) node;
@@ -1540,8 +1566,8 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1540
1566
  break;
1541
1567
  }
1542
1568
  #line 137 "api_node.c.erb"
1543
- case YP_NODE_CONSTANT_OPERATOR_AND_WRITE_NODE: {
1544
- yp_constant_operator_and_write_node_t *cast = (yp_constant_operator_and_write_node_t *) node;
1569
+ case YP_NODE_CONSTANT_AND_WRITE_NODE: {
1570
+ yp_constant_and_write_node_t *cast = (yp_constant_and_write_node_t *) node;
1545
1571
  VALUE argv[4];
1546
1572
 
1547
1573
  // name_loc
@@ -1556,13 +1582,13 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1556
1582
  // location
1557
1583
  argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1558
1584
 
1559
- rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPConstantOperatorAndWriteNode));
1585
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPConstantAndWriteNode));
1560
1586
  break;
1561
1587
  }
1562
1588
  #line 137 "api_node.c.erb"
1563
- case YP_NODE_CONSTANT_OPERATOR_OR_WRITE_NODE: {
1564
- yp_constant_operator_or_write_node_t *cast = (yp_constant_operator_or_write_node_t *) node;
1565
- VALUE argv[4];
1589
+ case YP_NODE_CONSTANT_OPERATOR_WRITE_NODE: {
1590
+ yp_constant_operator_write_node_t *cast = (yp_constant_operator_write_node_t *) node;
1591
+ VALUE argv[5];
1566
1592
 
1567
1593
  // name_loc
1568
1594
  argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
@@ -1573,16 +1599,19 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1573
1599
  // value
1574
1600
  argv[2] = rb_ary_pop(value_stack);
1575
1601
 
1602
+ // operator
1603
+ argv[3] = rb_id2sym(constants[cast->operator - 1]);
1604
+
1576
1605
  // location
1577
- argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1606
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
1578
1607
 
1579
- rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPConstantOperatorOrWriteNode));
1608
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPConstantOperatorWriteNode));
1580
1609
  break;
1581
1610
  }
1582
1611
  #line 137 "api_node.c.erb"
1583
- case YP_NODE_CONSTANT_OPERATOR_WRITE_NODE: {
1584
- yp_constant_operator_write_node_t *cast = (yp_constant_operator_write_node_t *) node;
1585
- VALUE argv[5];
1612
+ case YP_NODE_CONSTANT_OR_WRITE_NODE: {
1613
+ yp_constant_or_write_node_t *cast = (yp_constant_or_write_node_t *) node;
1614
+ VALUE argv[4];
1586
1615
 
1587
1616
  // name_loc
1588
1617
  argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
@@ -1593,13 +1622,30 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1593
1622
  // value
1594
1623
  argv[2] = rb_ary_pop(value_stack);
1595
1624
 
1596
- // operator
1597
- argv[3] = rb_id2sym(constants[cast->operator - 1]);
1625
+ // location
1626
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1627
+
1628
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPConstantOrWriteNode));
1629
+ break;
1630
+ }
1631
+ #line 137 "api_node.c.erb"
1632
+ case YP_NODE_CONSTANT_PATH_AND_WRITE_NODE: {
1633
+ yp_constant_path_and_write_node_t *cast = (yp_constant_path_and_write_node_t *) node;
1634
+ VALUE argv[4];
1635
+
1636
+ // target
1637
+ argv[0] = rb_ary_pop(value_stack);
1638
+
1639
+ // operator_loc
1640
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1641
+
1642
+ // value
1643
+ argv[2] = rb_ary_pop(value_stack);
1598
1644
 
1599
1645
  // location
1600
- argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
1646
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1601
1647
 
1602
- rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPConstantOperatorWriteNode));
1648
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPConstantPathAndWriteNode));
1603
1649
  break;
1604
1650
  }
1605
1651
  #line 137 "api_node.c.erb"
@@ -1623,9 +1669,9 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1623
1669
  break;
1624
1670
  }
1625
1671
  #line 137 "api_node.c.erb"
1626
- case YP_NODE_CONSTANT_PATH_OPERATOR_AND_WRITE_NODE: {
1627
- yp_constant_path_operator_and_write_node_t *cast = (yp_constant_path_operator_and_write_node_t *) node;
1628
- VALUE argv[4];
1672
+ case YP_NODE_CONSTANT_PATH_OPERATOR_WRITE_NODE: {
1673
+ yp_constant_path_operator_write_node_t *cast = (yp_constant_path_operator_write_node_t *) node;
1674
+ VALUE argv[5];
1629
1675
 
1630
1676
  // target
1631
1677
  argv[0] = rb_ary_pop(value_stack);
@@ -1636,15 +1682,18 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1636
1682
  // value
1637
1683
  argv[2] = rb_ary_pop(value_stack);
1638
1684
 
1685
+ // operator
1686
+ argv[3] = rb_id2sym(constants[cast->operator - 1]);
1687
+
1639
1688
  // location
1640
- argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1689
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
1641
1690
 
1642
- rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPConstantPathOperatorAndWriteNode));
1691
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPConstantPathOperatorWriteNode));
1643
1692
  break;
1644
1693
  }
1645
1694
  #line 137 "api_node.c.erb"
1646
- case YP_NODE_CONSTANT_PATH_OPERATOR_OR_WRITE_NODE: {
1647
- yp_constant_path_operator_or_write_node_t *cast = (yp_constant_path_operator_or_write_node_t *) node;
1695
+ case YP_NODE_CONSTANT_PATH_OR_WRITE_NODE: {
1696
+ yp_constant_path_or_write_node_t *cast = (yp_constant_path_or_write_node_t *) node;
1648
1697
  VALUE argv[4];
1649
1698
 
1650
1699
  // target
@@ -1659,30 +1708,27 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1659
1708
  // location
1660
1709
  argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1661
1710
 
1662
- rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPConstantPathOperatorOrWriteNode));
1711
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPConstantPathOrWriteNode));
1663
1712
  break;
1664
1713
  }
1665
1714
  #line 137 "api_node.c.erb"
1666
- case YP_NODE_CONSTANT_PATH_OPERATOR_WRITE_NODE: {
1667
- yp_constant_path_operator_write_node_t *cast = (yp_constant_path_operator_write_node_t *) node;
1668
- VALUE argv[5];
1715
+ case YP_NODE_CONSTANT_PATH_TARGET_NODE: {
1716
+ yp_constant_path_target_node_t *cast = (yp_constant_path_target_node_t *) node;
1717
+ VALUE argv[4];
1669
1718
 
1670
- // target
1719
+ // parent
1671
1720
  argv[0] = rb_ary_pop(value_stack);
1672
1721
 
1673
- // operator_loc
1674
- argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1675
-
1676
- // value
1677
- argv[2] = rb_ary_pop(value_stack);
1722
+ // child
1723
+ argv[1] = rb_ary_pop(value_stack);
1678
1724
 
1679
- // operator
1680
- argv[3] = rb_id2sym(constants[cast->operator - 1]);
1725
+ // delimiter_loc
1726
+ argv[2] = yp_location_new(parser, cast->delimiter_loc.start, cast->delimiter_loc.end, source);
1681
1727
 
1682
1728
  // location
1683
- argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
1729
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1684
1730
 
1685
- rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPConstantPathOperatorWriteNode));
1731
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPConstantPathTargetNode));
1686
1732
  break;
1687
1733
  }
1688
1734
  #line 137 "api_node.c.erb"
@@ -1694,7 +1740,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1694
1740
  argv[0] = rb_ary_pop(value_stack);
1695
1741
 
1696
1742
  // operator_loc
1697
- argv[1] = cast->operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1743
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1698
1744
 
1699
1745
  // value
1700
1746
  argv[2] = rb_ary_pop(value_stack);
@@ -1715,6 +1761,16 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1715
1761
  rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPConstantReadNode));
1716
1762
  break;
1717
1763
  }
1764
+ #line 137 "api_node.c.erb"
1765
+ case YP_NODE_CONSTANT_TARGET_NODE: {
1766
+ VALUE argv[1];
1767
+
1768
+ // location
1769
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
1770
+
1771
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPConstantTargetNode));
1772
+ break;
1773
+ }
1718
1774
  #line 137 "api_node.c.erb"
1719
1775
  case YP_NODE_CONSTANT_WRITE_NODE: {
1720
1776
  yp_constant_write_node_t *cast = (yp_constant_write_node_t *) node;
@@ -1727,7 +1783,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1727
1783
  argv[1] = rb_ary_pop(value_stack);
1728
1784
 
1729
1785
  // operator_loc
1730
- argv[2] = cast->operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1786
+ argv[2] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1731
1787
 
1732
1788
  // location
1733
1789
  argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
@@ -1749,11 +1805,11 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1749
1805
  // parameters
1750
1806
  argv[2] = rb_ary_pop(value_stack);
1751
1807
 
1752
- // statements
1808
+ // body
1753
1809
  argv[3] = rb_ary_pop(value_stack);
1754
1810
 
1755
1811
  // locals
1756
- argv[4] = rb_ary_new();
1812
+ argv[4] = rb_ary_new_capa(cast->locals.size);
1757
1813
  for (size_t index = 0; index < cast->locals.size; index++) {
1758
1814
  rb_ary_push(argv[4], rb_id2sym(constants[cast->locals.ids[index] - 1]));
1759
1815
  }
@@ -1904,7 +1960,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
1904
1960
  argv[1] = rb_ary_pop(value_stack);
1905
1961
 
1906
1962
  // requireds
1907
- argv[2] = rb_ary_new();
1963
+ argv[2] = rb_ary_new_capa(cast->requireds.size);
1908
1964
  for (size_t index = 0; index < cast->requireds.size; index++) {
1909
1965
  rb_ary_push(argv[2], rb_ary_pop(value_stack));
1910
1966
  }
@@ -2023,8 +2079,8 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2023
2079
  break;
2024
2080
  }
2025
2081
  #line 137 "api_node.c.erb"
2026
- case YP_NODE_GLOBAL_VARIABLE_OPERATOR_AND_WRITE_NODE: {
2027
- yp_global_variable_operator_and_write_node_t *cast = (yp_global_variable_operator_and_write_node_t *) node;
2082
+ case YP_NODE_GLOBAL_VARIABLE_AND_WRITE_NODE: {
2083
+ yp_global_variable_and_write_node_t *cast = (yp_global_variable_and_write_node_t *) node;
2028
2084
  VALUE argv[4];
2029
2085
 
2030
2086
  // name_loc
@@ -2039,13 +2095,13 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2039
2095
  // location
2040
2096
  argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2041
2097
 
2042
- rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPGlobalVariableOperatorAndWriteNode));
2098
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPGlobalVariableAndWriteNode));
2043
2099
  break;
2044
2100
  }
2045
2101
  #line 137 "api_node.c.erb"
2046
- case YP_NODE_GLOBAL_VARIABLE_OPERATOR_OR_WRITE_NODE: {
2047
- yp_global_variable_operator_or_write_node_t *cast = (yp_global_variable_operator_or_write_node_t *) node;
2048
- VALUE argv[4];
2102
+ case YP_NODE_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: {
2103
+ yp_global_variable_operator_write_node_t *cast = (yp_global_variable_operator_write_node_t *) node;
2104
+ VALUE argv[5];
2049
2105
 
2050
2106
  // name_loc
2051
2107
  argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
@@ -2056,16 +2112,19 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2056
2112
  // value
2057
2113
  argv[2] = rb_ary_pop(value_stack);
2058
2114
 
2115
+ // operator
2116
+ argv[3] = rb_id2sym(constants[cast->operator - 1]);
2117
+
2059
2118
  // location
2060
- argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2119
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2061
2120
 
2062
- rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPGlobalVariableOperatorOrWriteNode));
2121
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPGlobalVariableOperatorWriteNode));
2063
2122
  break;
2064
2123
  }
2065
2124
  #line 137 "api_node.c.erb"
2066
- case YP_NODE_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: {
2067
- yp_global_variable_operator_write_node_t *cast = (yp_global_variable_operator_write_node_t *) node;
2068
- VALUE argv[5];
2125
+ case YP_NODE_GLOBAL_VARIABLE_OR_WRITE_NODE: {
2126
+ yp_global_variable_or_write_node_t *cast = (yp_global_variable_or_write_node_t *) node;
2127
+ VALUE argv[4];
2069
2128
 
2070
2129
  // name_loc
2071
2130
  argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
@@ -2076,13 +2135,10 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2076
2135
  // value
2077
2136
  argv[2] = rb_ary_pop(value_stack);
2078
2137
 
2079
- // operator
2080
- argv[3] = rb_id2sym(constants[cast->operator - 1]);
2081
-
2082
2138
  // location
2083
- argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2139
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2084
2140
 
2085
- rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPGlobalVariableOperatorWriteNode));
2141
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPGlobalVariableOrWriteNode));
2086
2142
  break;
2087
2143
  }
2088
2144
  #line 137 "api_node.c.erb"
@@ -2095,6 +2151,16 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2095
2151
  rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPGlobalVariableReadNode));
2096
2152
  break;
2097
2153
  }
2154
+ #line 137 "api_node.c.erb"
2155
+ case YP_NODE_GLOBAL_VARIABLE_TARGET_NODE: {
2156
+ VALUE argv[1];
2157
+
2158
+ // location
2159
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
2160
+
2161
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPGlobalVariableTargetNode));
2162
+ break;
2163
+ }
2098
2164
  #line 137 "api_node.c.erb"
2099
2165
  case YP_NODE_GLOBAL_VARIABLE_WRITE_NODE: {
2100
2166
  yp_global_variable_write_node_t *cast = (yp_global_variable_write_node_t *) node;
@@ -2104,7 +2170,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2104
2170
  argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2105
2171
 
2106
2172
  // operator_loc
2107
- argv[1] = cast->operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2173
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2108
2174
 
2109
2175
  // value
2110
2176
  argv[2] = rb_ary_pop(value_stack);
@@ -2124,7 +2190,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2124
2190
  argv[0] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2125
2191
 
2126
2192
  // elements
2127
- argv[1] = rb_ary_new();
2193
+ argv[1] = rb_ary_new_capa(cast->elements.size);
2128
2194
  for (size_t index = 0; index < cast->elements.size; index++) {
2129
2195
  rb_ary_push(argv[1], rb_ary_pop(value_stack));
2130
2196
  }
@@ -2147,7 +2213,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2147
2213
  argv[0] = rb_ary_pop(value_stack);
2148
2214
 
2149
2215
  // assocs
2150
- argv[1] = rb_ary_new();
2216
+ argv[1] = rb_ary_new_capa(cast->assocs.size);
2151
2217
  for (size_t index = 0; index < cast->assocs.size; index++) {
2152
2218
  rb_ary_push(argv[1], rb_ary_pop(value_stack));
2153
2219
  }
@@ -2230,8 +2296,8 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2230
2296
  break;
2231
2297
  }
2232
2298
  #line 137 "api_node.c.erb"
2233
- case YP_NODE_INSTANCE_VARIABLE_OPERATOR_AND_WRITE_NODE: {
2234
- yp_instance_variable_operator_and_write_node_t *cast = (yp_instance_variable_operator_and_write_node_t *) node;
2299
+ case YP_NODE_INSTANCE_VARIABLE_AND_WRITE_NODE: {
2300
+ yp_instance_variable_and_write_node_t *cast = (yp_instance_variable_and_write_node_t *) node;
2235
2301
  VALUE argv[4];
2236
2302
 
2237
2303
  // name_loc
@@ -2246,13 +2312,13 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2246
2312
  // location
2247
2313
  argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2248
2314
 
2249
- rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPInstanceVariableOperatorAndWriteNode));
2315
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPInstanceVariableAndWriteNode));
2250
2316
  break;
2251
2317
  }
2252
2318
  #line 137 "api_node.c.erb"
2253
- case YP_NODE_INSTANCE_VARIABLE_OPERATOR_OR_WRITE_NODE: {
2254
- yp_instance_variable_operator_or_write_node_t *cast = (yp_instance_variable_operator_or_write_node_t *) node;
2255
- VALUE argv[4];
2319
+ case YP_NODE_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: {
2320
+ yp_instance_variable_operator_write_node_t *cast = (yp_instance_variable_operator_write_node_t *) node;
2321
+ VALUE argv[5];
2256
2322
 
2257
2323
  // name_loc
2258
2324
  argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
@@ -2263,16 +2329,19 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2263
2329
  // value
2264
2330
  argv[2] = rb_ary_pop(value_stack);
2265
2331
 
2332
+ // operator
2333
+ argv[3] = rb_id2sym(constants[cast->operator - 1]);
2334
+
2266
2335
  // location
2267
- argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2336
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2268
2337
 
2269
- rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPInstanceVariableOperatorOrWriteNode));
2338
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPInstanceVariableOperatorWriteNode));
2270
2339
  break;
2271
2340
  }
2272
2341
  #line 137 "api_node.c.erb"
2273
- case YP_NODE_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: {
2274
- yp_instance_variable_operator_write_node_t *cast = (yp_instance_variable_operator_write_node_t *) node;
2275
- VALUE argv[5];
2342
+ case YP_NODE_INSTANCE_VARIABLE_OR_WRITE_NODE: {
2343
+ yp_instance_variable_or_write_node_t *cast = (yp_instance_variable_or_write_node_t *) node;
2344
+ VALUE argv[4];
2276
2345
 
2277
2346
  // name_loc
2278
2347
  argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
@@ -2283,13 +2352,10 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2283
2352
  // value
2284
2353
  argv[2] = rb_ary_pop(value_stack);
2285
2354
 
2286
- // operator
2287
- argv[3] = rb_id2sym(constants[cast->operator - 1]);
2288
-
2289
2355
  // location
2290
- argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2356
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2291
2357
 
2292
- rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPInstanceVariableOperatorWriteNode));
2358
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPInstanceVariableOrWriteNode));
2293
2359
  break;
2294
2360
  }
2295
2361
  #line 137 "api_node.c.erb"
@@ -2302,6 +2368,16 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2302
2368
  rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPInstanceVariableReadNode));
2303
2369
  break;
2304
2370
  }
2371
+ #line 137 "api_node.c.erb"
2372
+ case YP_NODE_INSTANCE_VARIABLE_TARGET_NODE: {
2373
+ VALUE argv[1];
2374
+
2375
+ // location
2376
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
2377
+
2378
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPInstanceVariableTargetNode));
2379
+ break;
2380
+ }
2305
2381
  #line 137 "api_node.c.erb"
2306
2382
  case YP_NODE_INSTANCE_VARIABLE_WRITE_NODE: {
2307
2383
  yp_instance_variable_write_node_t *cast = (yp_instance_variable_write_node_t *) node;
@@ -2314,7 +2390,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2314
2390
  argv[1] = rb_ary_pop(value_stack);
2315
2391
 
2316
2392
  // operator_loc
2317
- argv[2] = cast->operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2393
+ argv[2] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2318
2394
 
2319
2395
  // location
2320
2396
  argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
@@ -2341,7 +2417,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2341
2417
  argv[0] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2342
2418
 
2343
2419
  // parts
2344
- argv[1] = rb_ary_new();
2420
+ argv[1] = rb_ary_new_capa(cast->parts.size);
2345
2421
  for (size_t index = 0; index < cast->parts.size; index++) {
2346
2422
  rb_ary_push(argv[1], rb_ary_pop(value_stack));
2347
2423
  }
@@ -2367,7 +2443,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2367
2443
  argv[0] = cast->opening_loc.start == NULL ? Qnil : yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2368
2444
 
2369
2445
  // parts
2370
- argv[1] = rb_ary_new();
2446
+ argv[1] = rb_ary_new_capa(cast->parts.size);
2371
2447
  for (size_t index = 0; index < cast->parts.size; index++) {
2372
2448
  rb_ary_push(argv[1], rb_ary_pop(value_stack));
2373
2449
  }
@@ -2390,7 +2466,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2390
2466
  argv[0] = cast->opening_loc.start == NULL ? Qnil : yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2391
2467
 
2392
2468
  // parts
2393
- argv[1] = rb_ary_new();
2469
+ argv[1] = rb_ary_new_capa(cast->parts.size);
2394
2470
  for (size_t index = 0; index < cast->parts.size; index++) {
2395
2471
  rb_ary_push(argv[1], rb_ary_pop(value_stack));
2396
2472
  }
@@ -2413,7 +2489,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2413
2489
  argv[0] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2414
2490
 
2415
2491
  // parts
2416
- argv[1] = rb_ary_new();
2492
+ argv[1] = rb_ary_new_capa(cast->parts.size);
2417
2493
  for (size_t index = 0; index < cast->parts.size; index++) {
2418
2494
  rb_ary_push(argv[1], rb_ary_pop(value_stack));
2419
2495
  }
@@ -2433,7 +2509,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2433
2509
  VALUE argv[2];
2434
2510
 
2435
2511
  // elements
2436
- argv[0] = rb_ary_new();
2512
+ argv[0] = rb_ary_new_capa(cast->elements.size);
2437
2513
  for (size_t index = 0; index < cast->elements.size; index++) {
2438
2514
  rb_ary_push(argv[0], rb_ary_pop(value_stack));
2439
2515
  }
@@ -2481,33 +2557,39 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2481
2557
  #line 137 "api_node.c.erb"
2482
2558
  case YP_NODE_LAMBDA_NODE: {
2483
2559
  yp_lambda_node_t *cast = (yp_lambda_node_t *) node;
2484
- VALUE argv[5];
2560
+ VALUE argv[7];
2485
2561
 
2486
2562
  // locals
2487
- argv[0] = rb_ary_new();
2563
+ argv[0] = rb_ary_new_capa(cast->locals.size);
2488
2564
  for (size_t index = 0; index < cast->locals.size; index++) {
2489
2565
  rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
2490
2566
  }
2491
2567
 
2568
+ // operator_loc
2569
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2570
+
2492
2571
  // opening_loc
2493
- argv[1] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2572
+ argv[2] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2573
+
2574
+ // closing_loc
2575
+ argv[3] = yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
2494
2576
 
2495
2577
  // parameters
2496
- argv[2] = rb_ary_pop(value_stack);
2578
+ argv[4] = rb_ary_pop(value_stack);
2497
2579
 
2498
- // statements
2499
- argv[3] = rb_ary_pop(value_stack);
2580
+ // body
2581
+ argv[5] = rb_ary_pop(value_stack);
2500
2582
 
2501
2583
  // location
2502
- argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2584
+ argv[6] = yp_location_new(parser, node->location.start, node->location.end, source);
2503
2585
 
2504
- rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPLambdaNode));
2586
+ rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cYARPLambdaNode));
2505
2587
  break;
2506
2588
  }
2507
2589
  #line 137 "api_node.c.erb"
2508
- case YP_NODE_LOCAL_VARIABLE_OPERATOR_AND_WRITE_NODE: {
2509
- yp_local_variable_operator_and_write_node_t *cast = (yp_local_variable_operator_and_write_node_t *) node;
2510
- VALUE argv[5];
2590
+ case YP_NODE_LOCAL_VARIABLE_AND_WRITE_NODE: {
2591
+ yp_local_variable_and_write_node_t *cast = (yp_local_variable_and_write_node_t *) node;
2592
+ VALUE argv[6];
2511
2593
 
2512
2594
  // name_loc
2513
2595
  argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
@@ -2521,16 +2603,19 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2521
2603
  // constant_id
2522
2604
  argv[3] = rb_id2sym(constants[cast->constant_id - 1]);
2523
2605
 
2606
+ // depth
2607
+ argv[4] = ULONG2NUM(cast->depth);
2608
+
2524
2609
  // location
2525
- argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2610
+ argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
2526
2611
 
2527
- rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPLocalVariableOperatorAndWriteNode));
2612
+ rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPLocalVariableAndWriteNode));
2528
2613
  break;
2529
2614
  }
2530
2615
  #line 137 "api_node.c.erb"
2531
- case YP_NODE_LOCAL_VARIABLE_OPERATOR_OR_WRITE_NODE: {
2532
- yp_local_variable_operator_or_write_node_t *cast = (yp_local_variable_operator_or_write_node_t *) node;
2533
- VALUE argv[5];
2616
+ case YP_NODE_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: {
2617
+ yp_local_variable_operator_write_node_t *cast = (yp_local_variable_operator_write_node_t *) node;
2618
+ VALUE argv[7];
2534
2619
 
2535
2620
  // name_loc
2536
2621
  argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
@@ -2544,15 +2629,21 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2544
2629
  // constant_id
2545
2630
  argv[3] = rb_id2sym(constants[cast->constant_id - 1]);
2546
2631
 
2632
+ // operator_id
2633
+ argv[4] = rb_id2sym(constants[cast->operator_id - 1]);
2634
+
2635
+ // depth
2636
+ argv[5] = ULONG2NUM(cast->depth);
2637
+
2547
2638
  // location
2548
- argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2639
+ argv[6] = yp_location_new(parser, node->location.start, node->location.end, source);
2549
2640
 
2550
- rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPLocalVariableOperatorOrWriteNode));
2641
+ rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cYARPLocalVariableOperatorWriteNode));
2551
2642
  break;
2552
2643
  }
2553
2644
  #line 137 "api_node.c.erb"
2554
- case YP_NODE_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: {
2555
- yp_local_variable_operator_write_node_t *cast = (yp_local_variable_operator_write_node_t *) node;
2645
+ case YP_NODE_LOCAL_VARIABLE_OR_WRITE_NODE: {
2646
+ yp_local_variable_or_write_node_t *cast = (yp_local_variable_or_write_node_t *) node;
2556
2647
  VALUE argv[6];
2557
2648
 
2558
2649
  // name_loc
@@ -2567,13 +2658,13 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2567
2658
  // constant_id
2568
2659
  argv[3] = rb_id2sym(constants[cast->constant_id - 1]);
2569
2660
 
2570
- // operator_id
2571
- argv[4] = rb_id2sym(constants[cast->operator_id - 1]);
2661
+ // depth
2662
+ argv[4] = ULONG2NUM(cast->depth);
2572
2663
 
2573
2664
  // location
2574
2665
  argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
2575
2666
 
2576
- rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPLocalVariableOperatorWriteNode));
2667
+ rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPLocalVariableOrWriteNode));
2577
2668
  break;
2578
2669
  }
2579
2670
  #line 137 "api_node.c.erb"
@@ -2593,6 +2684,23 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2593
2684
  rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPLocalVariableReadNode));
2594
2685
  break;
2595
2686
  }
2687
+ #line 137 "api_node.c.erb"
2688
+ case YP_NODE_LOCAL_VARIABLE_TARGET_NODE: {
2689
+ yp_local_variable_target_node_t *cast = (yp_local_variable_target_node_t *) node;
2690
+ VALUE argv[3];
2691
+
2692
+ // constant_id
2693
+ argv[0] = rb_id2sym(constants[cast->constant_id - 1]);
2694
+
2695
+ // depth
2696
+ argv[1] = ULONG2NUM(cast->depth);
2697
+
2698
+ // location
2699
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
2700
+
2701
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPLocalVariableTargetNode));
2702
+ break;
2703
+ }
2596
2704
  #line 137 "api_node.c.erb"
2597
2705
  case YP_NODE_LOCAL_VARIABLE_WRITE_NODE: {
2598
2706
  yp_local_variable_write_node_t *cast = (yp_local_variable_write_node_t *) node;
@@ -2611,7 +2719,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2611
2719
  argv[3] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2612
2720
 
2613
2721
  // operator_loc
2614
- argv[4] = cast->operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2722
+ argv[4] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2615
2723
 
2616
2724
  // location
2617
2725
  argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
@@ -2672,10 +2780,10 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2672
2780
  #line 137 "api_node.c.erb"
2673
2781
  case YP_NODE_MODULE_NODE: {
2674
2782
  yp_module_node_t *cast = (yp_module_node_t *) node;
2675
- VALUE argv[6];
2783
+ VALUE argv[7];
2676
2784
 
2677
2785
  // locals
2678
- argv[0] = rb_ary_new();
2786
+ argv[0] = rb_ary_new_capa(cast->locals.size);
2679
2787
  for (size_t index = 0; index < cast->locals.size; index++) {
2680
2788
  rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
2681
2789
  }
@@ -2686,16 +2794,19 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2686
2794
  // constant_path
2687
2795
  argv[2] = rb_ary_pop(value_stack);
2688
2796
 
2689
- // statements
2797
+ // body
2690
2798
  argv[3] = rb_ary_pop(value_stack);
2691
2799
 
2692
2800
  // end_keyword_loc
2693
2801
  argv[4] = yp_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
2694
2802
 
2803
+ // name
2804
+ argv[5] = yp_string_new(&cast->name, encoding);
2805
+
2695
2806
  // location
2696
- argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
2807
+ argv[6] = yp_location_new(parser, node->location.start, node->location.end, source);
2697
2808
 
2698
- rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPModuleNode));
2809
+ rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cYARPModuleNode));
2699
2810
  break;
2700
2811
  }
2701
2812
  #line 137 "api_node.c.erb"
@@ -2704,7 +2815,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2704
2815
  VALUE argv[6];
2705
2816
 
2706
2817
  // targets
2707
- argv[0] = rb_ary_new();
2818
+ argv[0] = rb_ary_new_capa(cast->targets.size);
2708
2819
  for (size_t index = 0; index < cast->targets.size; index++) {
2709
2820
  rb_ary_push(argv[0], rb_ary_pop(value_stack));
2710
2821
  }
@@ -2830,19 +2941,19 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2830
2941
  VALUE argv[8];
2831
2942
 
2832
2943
  // requireds
2833
- argv[0] = rb_ary_new();
2944
+ argv[0] = rb_ary_new_capa(cast->requireds.size);
2834
2945
  for (size_t index = 0; index < cast->requireds.size; index++) {
2835
2946
  rb_ary_push(argv[0], rb_ary_pop(value_stack));
2836
2947
  }
2837
2948
 
2838
2949
  // optionals
2839
- argv[1] = rb_ary_new();
2950
+ argv[1] = rb_ary_new_capa(cast->optionals.size);
2840
2951
  for (size_t index = 0; index < cast->optionals.size; index++) {
2841
2952
  rb_ary_push(argv[1], rb_ary_pop(value_stack));
2842
2953
  }
2843
2954
 
2844
2955
  // posts
2845
- argv[2] = rb_ary_new();
2956
+ argv[2] = rb_ary_new_capa(cast->posts.size);
2846
2957
  for (size_t index = 0; index < cast->posts.size; index++) {
2847
2958
  rb_ary_push(argv[2], rb_ary_pop(value_stack));
2848
2959
  }
@@ -2851,7 +2962,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2851
2962
  argv[3] = rb_ary_pop(value_stack);
2852
2963
 
2853
2964
  // keywords
2854
- argv[4] = rb_ary_new();
2965
+ argv[4] = rb_ary_new_capa(cast->keywords.size);
2855
2966
  for (size_t index = 0; index < cast->keywords.size; index++) {
2856
2967
  rb_ary_push(argv[4], rb_ary_pop(value_stack));
2857
2968
  }
@@ -2873,7 +2984,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2873
2984
  yp_parentheses_node_t *cast = (yp_parentheses_node_t *) node;
2874
2985
  VALUE argv[4];
2875
2986
 
2876
- // statements
2987
+ // body
2877
2988
  argv[0] = rb_ary_pop(value_stack);
2878
2989
 
2879
2990
  // opening_loc
@@ -2980,7 +3091,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
2980
3091
  VALUE argv[3];
2981
3092
 
2982
3093
  // locals
2983
- argv[0] = rb_ary_new();
3094
+ argv[0] = rb_ary_new_capa(cast->locals.size);
2984
3095
  for (size_t index = 0; index < cast->locals.size; index++) {
2985
3096
  rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
2986
3097
  }
@@ -3072,7 +3183,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
3072
3183
  VALUE argv[4];
3073
3184
 
3074
3185
  // parameters
3075
- argv[0] = rb_ary_new();
3186
+ argv[0] = rb_ary_new_capa(cast->parameters.size);
3076
3187
  for (size_t index = 0; index < cast->parameters.size; index++) {
3077
3188
  rb_ary_push(argv[0], rb_ary_pop(value_stack));
3078
3189
  }
@@ -3132,7 +3243,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
3132
3243
  argv[0] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
3133
3244
 
3134
3245
  // exceptions
3135
- argv[1] = rb_ary_new();
3246
+ argv[1] = rb_ary_new_capa(cast->exceptions.size);
3136
3247
  for (size_t index = 0; index < cast->exceptions.size; index++) {
3137
3248
  rb_ary_push(argv[1], rb_ary_pop(value_stack));
3138
3249
  }
@@ -3215,7 +3326,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
3215
3326
  VALUE argv[7];
3216
3327
 
3217
3328
  // locals
3218
- argv[0] = rb_ary_new();
3329
+ argv[0] = rb_ary_new_capa(cast->locals.size);
3219
3330
  for (size_t index = 0; index < cast->locals.size; index++) {
3220
3331
  rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
3221
3332
  }
@@ -3229,7 +3340,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
3229
3340
  // expression
3230
3341
  argv[3] = rb_ary_pop(value_stack);
3231
3342
 
3232
- // statements
3343
+ // body
3233
3344
  argv[4] = rb_ary_pop(value_stack);
3234
3345
 
3235
3346
  // end_keyword_loc
@@ -3298,7 +3409,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
3298
3409
  VALUE argv[2];
3299
3410
 
3300
3411
  // body
3301
- argv[0] = rb_ary_new();
3412
+ argv[0] = rb_ary_new_capa(cast->body.size);
3302
3413
  for (size_t index = 0; index < cast->body.size; index++) {
3303
3414
  rb_ary_push(argv[0], rb_ary_pop(value_stack));
3304
3415
  }
@@ -3383,7 +3494,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
3383
3494
  argv[0] = cast->opening_loc.start == NULL ? Qnil : yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
3384
3495
 
3385
3496
  // value_loc
3386
- argv[1] = yp_location_new(parser, cast->value_loc.start, cast->value_loc.end, source);
3497
+ argv[1] = cast->value_loc.start == NULL ? Qnil : yp_location_new(parser, cast->value_loc.start, cast->value_loc.end, source);
3387
3498
 
3388
3499
  // closing_loc
3389
3500
  argv[2] = cast->closing_loc.start == NULL ? Qnil : yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
@@ -3413,7 +3524,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
3413
3524
  VALUE argv[3];
3414
3525
 
3415
3526
  // names
3416
- argv[0] = rb_ary_new();
3527
+ argv[0] = rb_ary_new_capa(cast->names.size);
3417
3528
  for (size_t index = 0; index < cast->names.size; index++) {
3418
3529
  rb_ary_push(argv[0], rb_ary_pop(value_stack));
3419
3530
  }
@@ -3456,24 +3567,27 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
3456
3567
  #line 137 "api_node.c.erb"
3457
3568
  case YP_NODE_UNTIL_NODE: {
3458
3569
  yp_until_node_t *cast = (yp_until_node_t *) node;
3459
- VALUE argv[5];
3570
+ VALUE argv[6];
3460
3571
 
3461
3572
  // keyword_loc
3462
3573
  argv[0] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
3463
3574
 
3575
+ // closing_loc
3576
+ argv[1] = cast->closing_loc.start == NULL ? Qnil : yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3577
+
3464
3578
  // predicate
3465
- argv[1] = rb_ary_pop(value_stack);
3579
+ argv[2] = rb_ary_pop(value_stack);
3466
3580
 
3467
3581
  // statements
3468
- argv[2] = rb_ary_pop(value_stack);
3582
+ argv[3] = rb_ary_pop(value_stack);
3469
3583
 
3470
3584
  // flags
3471
- argv[3] = ULONG2NUM(node->flags >> 1);
3585
+ argv[4] = ULONG2NUM(node->flags >> 1);
3472
3586
 
3473
3587
  // location
3474
- argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
3588
+ argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
3475
3589
 
3476
- rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPUntilNode));
3590
+ rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPUntilNode));
3477
3591
  break;
3478
3592
  }
3479
3593
  #line 137 "api_node.c.erb"
@@ -3485,7 +3599,7 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
3485
3599
  argv[0] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
3486
3600
 
3487
3601
  // conditions
3488
- argv[1] = rb_ary_new();
3602
+ argv[1] = rb_ary_new_capa(cast->conditions.size);
3489
3603
  for (size_t index = 0; index < cast->conditions.size; index++) {
3490
3604
  rb_ary_push(argv[1], rb_ary_pop(value_stack));
3491
3605
  }
@@ -3502,24 +3616,27 @@ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
3502
3616
  #line 137 "api_node.c.erb"
3503
3617
  case YP_NODE_WHILE_NODE: {
3504
3618
  yp_while_node_t *cast = (yp_while_node_t *) node;
3505
- VALUE argv[5];
3619
+ VALUE argv[6];
3506
3620
 
3507
3621
  // keyword_loc
3508
3622
  argv[0] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
3509
3623
 
3624
+ // closing_loc
3625
+ argv[1] = cast->closing_loc.start == NULL ? Qnil : yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3626
+
3510
3627
  // predicate
3511
- argv[1] = rb_ary_pop(value_stack);
3628
+ argv[2] = rb_ary_pop(value_stack);
3512
3629
 
3513
3630
  // statements
3514
- argv[2] = rb_ary_pop(value_stack);
3631
+ argv[3] = rb_ary_pop(value_stack);
3515
3632
 
3516
3633
  // flags
3517
- argv[3] = ULONG2NUM(node->flags >> 1);
3634
+ argv[4] = ULONG2NUM(node->flags >> 1);
3518
3635
 
3519
3636
  // location
3520
- argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
3637
+ argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
3521
3638
 
3522
- rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPWhileNode));
3639
+ rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPWhileNode));
3523
3640
  break;
3524
3641
  }
3525
3642
  #line 137 "api_node.c.erb"
@@ -3603,20 +3720,23 @@ Init_yarp_api_node(void) {
3603
3720
  rb_cYARPCapturePatternNode = rb_define_class_under(rb_cYARP, "CapturePatternNode", rb_cYARPNode);
3604
3721
  rb_cYARPCaseNode = rb_define_class_under(rb_cYARP, "CaseNode", rb_cYARPNode);
3605
3722
  rb_cYARPClassNode = rb_define_class_under(rb_cYARP, "ClassNode", rb_cYARPNode);
3606
- rb_cYARPClassVariableOperatorAndWriteNode = rb_define_class_under(rb_cYARP, "ClassVariableOperatorAndWriteNode", rb_cYARPNode);
3607
- rb_cYARPClassVariableOperatorOrWriteNode = rb_define_class_under(rb_cYARP, "ClassVariableOperatorOrWriteNode", rb_cYARPNode);
3723
+ rb_cYARPClassVariableAndWriteNode = rb_define_class_under(rb_cYARP, "ClassVariableAndWriteNode", rb_cYARPNode);
3608
3724
  rb_cYARPClassVariableOperatorWriteNode = rb_define_class_under(rb_cYARP, "ClassVariableOperatorWriteNode", rb_cYARPNode);
3725
+ rb_cYARPClassVariableOrWriteNode = rb_define_class_under(rb_cYARP, "ClassVariableOrWriteNode", rb_cYARPNode);
3609
3726
  rb_cYARPClassVariableReadNode = rb_define_class_under(rb_cYARP, "ClassVariableReadNode", rb_cYARPNode);
3727
+ rb_cYARPClassVariableTargetNode = rb_define_class_under(rb_cYARP, "ClassVariableTargetNode", rb_cYARPNode);
3610
3728
  rb_cYARPClassVariableWriteNode = rb_define_class_under(rb_cYARP, "ClassVariableWriteNode", rb_cYARPNode);
3611
- rb_cYARPConstantOperatorAndWriteNode = rb_define_class_under(rb_cYARP, "ConstantOperatorAndWriteNode", rb_cYARPNode);
3612
- rb_cYARPConstantOperatorOrWriteNode = rb_define_class_under(rb_cYARP, "ConstantOperatorOrWriteNode", rb_cYARPNode);
3729
+ rb_cYARPConstantAndWriteNode = rb_define_class_under(rb_cYARP, "ConstantAndWriteNode", rb_cYARPNode);
3613
3730
  rb_cYARPConstantOperatorWriteNode = rb_define_class_under(rb_cYARP, "ConstantOperatorWriteNode", rb_cYARPNode);
3731
+ rb_cYARPConstantOrWriteNode = rb_define_class_under(rb_cYARP, "ConstantOrWriteNode", rb_cYARPNode);
3732
+ rb_cYARPConstantPathAndWriteNode = rb_define_class_under(rb_cYARP, "ConstantPathAndWriteNode", rb_cYARPNode);
3614
3733
  rb_cYARPConstantPathNode = rb_define_class_under(rb_cYARP, "ConstantPathNode", rb_cYARPNode);
3615
- rb_cYARPConstantPathOperatorAndWriteNode = rb_define_class_under(rb_cYARP, "ConstantPathOperatorAndWriteNode", rb_cYARPNode);
3616
- rb_cYARPConstantPathOperatorOrWriteNode = rb_define_class_under(rb_cYARP, "ConstantPathOperatorOrWriteNode", rb_cYARPNode);
3617
3734
  rb_cYARPConstantPathOperatorWriteNode = rb_define_class_under(rb_cYARP, "ConstantPathOperatorWriteNode", rb_cYARPNode);
3735
+ rb_cYARPConstantPathOrWriteNode = rb_define_class_under(rb_cYARP, "ConstantPathOrWriteNode", rb_cYARPNode);
3736
+ rb_cYARPConstantPathTargetNode = rb_define_class_under(rb_cYARP, "ConstantPathTargetNode", rb_cYARPNode);
3618
3737
  rb_cYARPConstantPathWriteNode = rb_define_class_under(rb_cYARP, "ConstantPathWriteNode", rb_cYARPNode);
3619
3738
  rb_cYARPConstantReadNode = rb_define_class_under(rb_cYARP, "ConstantReadNode", rb_cYARPNode);
3739
+ rb_cYARPConstantTargetNode = rb_define_class_under(rb_cYARP, "ConstantTargetNode", rb_cYARPNode);
3620
3740
  rb_cYARPConstantWriteNode = rb_define_class_under(rb_cYARP, "ConstantWriteNode", rb_cYARPNode);
3621
3741
  rb_cYARPDefNode = rb_define_class_under(rb_cYARP, "DefNode", rb_cYARPNode);
3622
3742
  rb_cYARPDefinedNode = rb_define_class_under(rb_cYARP, "DefinedNode", rb_cYARPNode);
@@ -3632,20 +3752,22 @@ Init_yarp_api_node(void) {
3632
3752
  rb_cYARPForwardingArgumentsNode = rb_define_class_under(rb_cYARP, "ForwardingArgumentsNode", rb_cYARPNode);
3633
3753
  rb_cYARPForwardingParameterNode = rb_define_class_under(rb_cYARP, "ForwardingParameterNode", rb_cYARPNode);
3634
3754
  rb_cYARPForwardingSuperNode = rb_define_class_under(rb_cYARP, "ForwardingSuperNode", rb_cYARPNode);
3635
- rb_cYARPGlobalVariableOperatorAndWriteNode = rb_define_class_under(rb_cYARP, "GlobalVariableOperatorAndWriteNode", rb_cYARPNode);
3636
- rb_cYARPGlobalVariableOperatorOrWriteNode = rb_define_class_under(rb_cYARP, "GlobalVariableOperatorOrWriteNode", rb_cYARPNode);
3755
+ rb_cYARPGlobalVariableAndWriteNode = rb_define_class_under(rb_cYARP, "GlobalVariableAndWriteNode", rb_cYARPNode);
3637
3756
  rb_cYARPGlobalVariableOperatorWriteNode = rb_define_class_under(rb_cYARP, "GlobalVariableOperatorWriteNode", rb_cYARPNode);
3757
+ rb_cYARPGlobalVariableOrWriteNode = rb_define_class_under(rb_cYARP, "GlobalVariableOrWriteNode", rb_cYARPNode);
3638
3758
  rb_cYARPGlobalVariableReadNode = rb_define_class_under(rb_cYARP, "GlobalVariableReadNode", rb_cYARPNode);
3759
+ rb_cYARPGlobalVariableTargetNode = rb_define_class_under(rb_cYARP, "GlobalVariableTargetNode", rb_cYARPNode);
3639
3760
  rb_cYARPGlobalVariableWriteNode = rb_define_class_under(rb_cYARP, "GlobalVariableWriteNode", rb_cYARPNode);
3640
3761
  rb_cYARPHashNode = rb_define_class_under(rb_cYARP, "HashNode", rb_cYARPNode);
3641
3762
  rb_cYARPHashPatternNode = rb_define_class_under(rb_cYARP, "HashPatternNode", rb_cYARPNode);
3642
3763
  rb_cYARPIfNode = rb_define_class_under(rb_cYARP, "IfNode", rb_cYARPNode);
3643
3764
  rb_cYARPImaginaryNode = rb_define_class_under(rb_cYARP, "ImaginaryNode", rb_cYARPNode);
3644
3765
  rb_cYARPInNode = rb_define_class_under(rb_cYARP, "InNode", rb_cYARPNode);
3645
- rb_cYARPInstanceVariableOperatorAndWriteNode = rb_define_class_under(rb_cYARP, "InstanceVariableOperatorAndWriteNode", rb_cYARPNode);
3646
- rb_cYARPInstanceVariableOperatorOrWriteNode = rb_define_class_under(rb_cYARP, "InstanceVariableOperatorOrWriteNode", rb_cYARPNode);
3766
+ rb_cYARPInstanceVariableAndWriteNode = rb_define_class_under(rb_cYARP, "InstanceVariableAndWriteNode", rb_cYARPNode);
3647
3767
  rb_cYARPInstanceVariableOperatorWriteNode = rb_define_class_under(rb_cYARP, "InstanceVariableOperatorWriteNode", rb_cYARPNode);
3768
+ rb_cYARPInstanceVariableOrWriteNode = rb_define_class_under(rb_cYARP, "InstanceVariableOrWriteNode", rb_cYARPNode);
3648
3769
  rb_cYARPInstanceVariableReadNode = rb_define_class_under(rb_cYARP, "InstanceVariableReadNode", rb_cYARPNode);
3770
+ rb_cYARPInstanceVariableTargetNode = rb_define_class_under(rb_cYARP, "InstanceVariableTargetNode", rb_cYARPNode);
3649
3771
  rb_cYARPInstanceVariableWriteNode = rb_define_class_under(rb_cYARP, "InstanceVariableWriteNode", rb_cYARPNode);
3650
3772
  rb_cYARPIntegerNode = rb_define_class_under(rb_cYARP, "IntegerNode", rb_cYARPNode);
3651
3773
  rb_cYARPInterpolatedRegularExpressionNode = rb_define_class_under(rb_cYARP, "InterpolatedRegularExpressionNode", rb_cYARPNode);
@@ -3656,10 +3778,11 @@ Init_yarp_api_node(void) {
3656
3778
  rb_cYARPKeywordParameterNode = rb_define_class_under(rb_cYARP, "KeywordParameterNode", rb_cYARPNode);
3657
3779
  rb_cYARPKeywordRestParameterNode = rb_define_class_under(rb_cYARP, "KeywordRestParameterNode", rb_cYARPNode);
3658
3780
  rb_cYARPLambdaNode = rb_define_class_under(rb_cYARP, "LambdaNode", rb_cYARPNode);
3659
- rb_cYARPLocalVariableOperatorAndWriteNode = rb_define_class_under(rb_cYARP, "LocalVariableOperatorAndWriteNode", rb_cYARPNode);
3660
- rb_cYARPLocalVariableOperatorOrWriteNode = rb_define_class_under(rb_cYARP, "LocalVariableOperatorOrWriteNode", rb_cYARPNode);
3781
+ rb_cYARPLocalVariableAndWriteNode = rb_define_class_under(rb_cYARP, "LocalVariableAndWriteNode", rb_cYARPNode);
3661
3782
  rb_cYARPLocalVariableOperatorWriteNode = rb_define_class_under(rb_cYARP, "LocalVariableOperatorWriteNode", rb_cYARPNode);
3783
+ rb_cYARPLocalVariableOrWriteNode = rb_define_class_under(rb_cYARP, "LocalVariableOrWriteNode", rb_cYARPNode);
3662
3784
  rb_cYARPLocalVariableReadNode = rb_define_class_under(rb_cYARP, "LocalVariableReadNode", rb_cYARPNode);
3785
+ rb_cYARPLocalVariableTargetNode = rb_define_class_under(rb_cYARP, "LocalVariableTargetNode", rb_cYARPNode);
3663
3786
  rb_cYARPLocalVariableWriteNode = rb_define_class_under(rb_cYARP, "LocalVariableWriteNode", rb_cYARPNode);
3664
3787
  rb_cYARPMatchPredicateNode = rb_define_class_under(rb_cYARP, "MatchPredicateNode", rb_cYARPNode);
3665
3788
  rb_cYARPMatchRequiredNode = rb_define_class_under(rb_cYARP, "MatchRequiredNode", rb_cYARPNode);