yarp 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -1
  3. data/Makefile +5 -1
  4. data/config.yml +156 -125
  5. data/docs/encoding.md +5 -5
  6. data/docs/serialization.md +2 -2
  7. data/ext/yarp/api_node.c +142 -98
  8. data/ext/yarp/extension.c +21 -7
  9. data/ext/yarp/extension.h +1 -1
  10. data/include/yarp/ast.h +327 -18
  11. data/include/yarp/defines.h +2 -1
  12. data/include/yarp/diagnostic.h +3 -3
  13. data/include/yarp/enc/yp_encoding.h +10 -10
  14. data/include/yarp/parser.h +19 -19
  15. data/include/yarp/regexp.h +1 -1
  16. data/include/yarp/unescape.h +4 -4
  17. data/include/yarp/util/yp_buffer.h +3 -0
  18. data/include/yarp/util/yp_char.h +16 -16
  19. data/include/yarp/util/yp_constant_pool.h +2 -2
  20. data/include/yarp/util/yp_newline_list.h +5 -5
  21. data/include/yarp/util/yp_string.h +4 -4
  22. data/include/yarp/util/yp_string_list.h +0 -3
  23. data/include/yarp/util/yp_strpbrk.h +1 -1
  24. data/include/yarp/version.h +2 -2
  25. data/include/yarp.h +5 -4
  26. data/lib/yarp/desugar_visitor.rb +59 -122
  27. data/lib/yarp/node.rb +230 -240
  28. data/lib/yarp/serialize.rb +16 -16
  29. data/lib/yarp.rb +5 -5
  30. data/src/diagnostic.c +1 -1
  31. data/src/enc/yp_big5.c +15 -42
  32. data/src/enc/yp_euc_jp.c +16 -43
  33. data/src/enc/yp_gbk.c +19 -46
  34. data/src/enc/yp_shift_jis.c +16 -43
  35. data/src/enc/yp_tables.c +36 -38
  36. data/src/enc/yp_unicode.c +20 -25
  37. data/src/enc/yp_windows_31j.c +16 -43
  38. data/src/node.c +1271 -899
  39. data/src/prettyprint.c +87 -48
  40. data/src/regexp.c +21 -21
  41. data/src/serialize.c +28 -15
  42. data/src/unescape.c +151 -121
  43. data/src/util/yp_buffer.c +7 -2
  44. data/src/util/yp_char.c +34 -34
  45. data/src/util/yp_constant_pool.c +4 -4
  46. data/src/util/yp_memchr.c +1 -1
  47. data/src/util/yp_newline_list.c +5 -4
  48. data/src/util/yp_string.c +22 -20
  49. data/src/util/yp_string_list.c +0 -6
  50. data/src/util/yp_strncasecmp.c +3 -6
  51. data/src/util/yp_strpbrk.c +8 -8
  52. data/src/yarp.c +355 -216
  53. data/yarp.gemspec +1 -1
  54. metadata +2 -2
data/include/yarp/ast.h CHANGED
@@ -188,15 +188,15 @@ typedef enum yp_token_type {
188
188
  // type and location information.
189
189
  typedef struct {
190
190
  yp_token_type_t type;
191
- const char *start;
192
- const char *end;
191
+ const uint8_t *start;
192
+ const uint8_t *end;
193
193
  } yp_token_t;
194
194
 
195
195
  // This represents a range of bytes in the source string to which a node or
196
196
  // token corresponds.
197
197
  typedef struct {
198
- const char *start;
199
- const char *end;
198
+ const uint8_t *start;
199
+ const uint8_t *end;
200
200
  } yp_location_t;
201
201
 
202
202
  typedef struct {
@@ -368,8 +368,7 @@ typedef struct yp_node {
368
368
  // existed in the original grammar and ripper, but it's not a 1:1 mapping.
369
369
  yp_node_type_t type;
370
370
 
371
- // This represents any flags on the node. Currently, this is only a newline
372
- // flag
371
+ // This represents any flags on the node
373
372
  yp_node_flags_t flags;
374
373
 
375
374
  // This is the location of the node in the source. It's a range of bytes
@@ -378,6 +377,8 @@ typedef struct yp_node {
378
377
  } yp_node_t;
379
378
 
380
379
  // AliasNode
380
+ //
381
+ // Type: YP_NODE_ALIAS_NODE
381
382
  typedef struct yp_alias_node {
382
383
  yp_node_t base;
383
384
  struct yp_node *new_name;
@@ -386,6 +387,8 @@ typedef struct yp_alias_node {
386
387
  } yp_alias_node_t;
387
388
 
388
389
  // AlternationPatternNode
390
+ //
391
+ // Type: YP_NODE_ALTERNATION_PATTERN_NODE
389
392
  typedef struct yp_alternation_pattern_node {
390
393
  yp_node_t base;
391
394
  struct yp_node *left;
@@ -394,6 +397,8 @@ typedef struct yp_alternation_pattern_node {
394
397
  } yp_alternation_pattern_node_t;
395
398
 
396
399
  // AndNode
400
+ //
401
+ // Type: YP_NODE_AND_NODE
397
402
  typedef struct yp_and_node {
398
403
  yp_node_t base;
399
404
  struct yp_node *left;
@@ -402,12 +407,16 @@ typedef struct yp_and_node {
402
407
  } yp_and_node_t;
403
408
 
404
409
  // ArgumentsNode
410
+ //
411
+ // Type: YP_NODE_ARGUMENTS_NODE
405
412
  typedef struct yp_arguments_node {
406
413
  yp_node_t base;
407
414
  struct yp_node_list arguments;
408
415
  } yp_arguments_node_t;
409
416
 
410
417
  // ArrayNode
418
+ //
419
+ // Type: YP_NODE_ARRAY_NODE
411
420
  typedef struct yp_array_node {
412
421
  yp_node_t base;
413
422
  struct yp_node_list elements;
@@ -416,6 +425,8 @@ typedef struct yp_array_node {
416
425
  } yp_array_node_t;
417
426
 
418
427
  // ArrayPatternNode
428
+ //
429
+ // Type: YP_NODE_ARRAY_PATTERN_NODE
419
430
  typedef struct yp_array_pattern_node {
420
431
  yp_node_t base;
421
432
  struct yp_node *constant;
@@ -427,6 +438,8 @@ typedef struct yp_array_pattern_node {
427
438
  } yp_array_pattern_node_t;
428
439
 
429
440
  // AssocNode
441
+ //
442
+ // Type: YP_NODE_ASSOC_NODE
430
443
  typedef struct yp_assoc_node {
431
444
  yp_node_t base;
432
445
  struct yp_node *key;
@@ -435,6 +448,8 @@ typedef struct yp_assoc_node {
435
448
  } yp_assoc_node_t;
436
449
 
437
450
  // AssocSplatNode
451
+ //
452
+ // Type: YP_NODE_ASSOC_SPLAT_NODE
438
453
  typedef struct yp_assoc_splat_node {
439
454
  yp_node_t base;
440
455
  struct yp_node *value;
@@ -442,11 +457,15 @@ typedef struct yp_assoc_splat_node {
442
457
  } yp_assoc_splat_node_t;
443
458
 
444
459
  // BackReferenceReadNode
460
+ //
461
+ // Type: YP_NODE_BACK_REFERENCE_READ_NODE
445
462
  typedef struct yp_back_reference_read_node {
446
463
  yp_node_t base;
447
464
  } yp_back_reference_read_node_t;
448
465
 
449
466
  // BeginNode
467
+ //
468
+ // Type: YP_NODE_BEGIN_NODE
450
469
  typedef struct yp_begin_node {
451
470
  yp_node_t base;
452
471
  yp_location_t begin_keyword_loc;
@@ -458,6 +477,8 @@ typedef struct yp_begin_node {
458
477
  } yp_begin_node_t;
459
478
 
460
479
  // BlockArgumentNode
480
+ //
481
+ // Type: YP_NODE_BLOCK_ARGUMENT_NODE
461
482
  typedef struct yp_block_argument_node {
462
483
  yp_node_t base;
463
484
  struct yp_node *expression;
@@ -465,6 +486,8 @@ typedef struct yp_block_argument_node {
465
486
  } yp_block_argument_node_t;
466
487
 
467
488
  // BlockNode
489
+ //
490
+ // Type: YP_NODE_BLOCK_NODE
468
491
  typedef struct yp_block_node {
469
492
  yp_node_t base;
470
493
  yp_constant_id_list_t locals;
@@ -475,6 +498,8 @@ typedef struct yp_block_node {
475
498
  } yp_block_node_t;
476
499
 
477
500
  // BlockParameterNode
501
+ //
502
+ // Type: YP_NODE_BLOCK_PARAMETER_NODE
478
503
  typedef struct yp_block_parameter_node {
479
504
  yp_node_t base;
480
505
  yp_location_t name_loc;
@@ -482,6 +507,8 @@ typedef struct yp_block_parameter_node {
482
507
  } yp_block_parameter_node_t;
483
508
 
484
509
  // BlockParametersNode
510
+ //
511
+ // Type: YP_NODE_BLOCK_PARAMETERS_NODE
485
512
  typedef struct yp_block_parameters_node {
486
513
  yp_node_t base;
487
514
  struct yp_parameters_node *parameters;
@@ -491,6 +518,8 @@ typedef struct yp_block_parameters_node {
491
518
  } yp_block_parameters_node_t;
492
519
 
493
520
  // BreakNode
521
+ //
522
+ // Type: YP_NODE_BREAK_NODE
494
523
  typedef struct yp_break_node {
495
524
  yp_node_t base;
496
525
  struct yp_arguments_node *arguments;
@@ -498,6 +527,11 @@ typedef struct yp_break_node {
498
527
  } yp_break_node_t;
499
528
 
500
529
  // CallNode
530
+ //
531
+ // Type: YP_NODE_CALL_NODE
532
+ // Flags:
533
+ // YP_CALL_NODE_FLAGS_SAFE_NAVIGATION
534
+ // YP_CALL_NODE_FLAGS_VARIABLE_CALL
501
535
  typedef struct yp_call_node {
502
536
  yp_node_t base;
503
537
  struct yp_node *receiver;
@@ -511,6 +545,8 @@ typedef struct yp_call_node {
511
545
  } yp_call_node_t;
512
546
 
513
547
  // CallOperatorAndWriteNode
548
+ //
549
+ // Type: YP_NODE_CALL_OPERATOR_AND_WRITE_NODE
514
550
  typedef struct yp_call_operator_and_write_node {
515
551
  yp_node_t base;
516
552
  struct yp_call_node *target;
@@ -519,6 +555,8 @@ typedef struct yp_call_operator_and_write_node {
519
555
  } yp_call_operator_and_write_node_t;
520
556
 
521
557
  // CallOperatorOrWriteNode
558
+ //
559
+ // Type: YP_NODE_CALL_OPERATOR_OR_WRITE_NODE
522
560
  typedef struct yp_call_operator_or_write_node {
523
561
  yp_node_t base;
524
562
  struct yp_call_node *target;
@@ -527,15 +565,19 @@ typedef struct yp_call_operator_or_write_node {
527
565
  } yp_call_operator_or_write_node_t;
528
566
 
529
567
  // CallOperatorWriteNode
568
+ //
569
+ // Type: YP_NODE_CALL_OPERATOR_WRITE_NODE
530
570
  typedef struct yp_call_operator_write_node {
531
571
  yp_node_t base;
532
572
  struct yp_call_node *target;
533
573
  yp_location_t operator_loc;
534
574
  struct yp_node *value;
535
- yp_constant_id_t operator_id;
575
+ yp_constant_id_t operator;
536
576
  } yp_call_operator_write_node_t;
537
577
 
538
578
  // CapturePatternNode
579
+ //
580
+ // Type: YP_NODE_CAPTURE_PATTERN_NODE
539
581
  typedef struct yp_capture_pattern_node {
540
582
  yp_node_t base;
541
583
  struct yp_node *value;
@@ -544,6 +586,8 @@ typedef struct yp_capture_pattern_node {
544
586
  } yp_capture_pattern_node_t;
545
587
 
546
588
  // CaseNode
589
+ //
590
+ // Type: YP_NODE_CASE_NODE
547
591
  typedef struct yp_case_node {
548
592
  yp_node_t base;
549
593
  struct yp_node *predicate;
@@ -554,6 +598,8 @@ typedef struct yp_case_node {
554
598
  } yp_case_node_t;
555
599
 
556
600
  // ClassNode
601
+ //
602
+ // Type: YP_NODE_CLASS_NODE
557
603
  typedef struct yp_class_node {
558
604
  yp_node_t base;
559
605
  yp_constant_id_list_t locals;
@@ -567,16 +613,22 @@ typedef struct yp_class_node {
567
613
  } yp_class_node_t;
568
614
 
569
615
  // ClassVariableAndWriteNode
616
+ //
617
+ // Type: YP_NODE_CLASS_VARIABLE_AND_WRITE_NODE
570
618
  typedef struct yp_class_variable_and_write_node {
571
619
  yp_node_t base;
620
+ yp_constant_id_t name;
572
621
  yp_location_t name_loc;
573
622
  yp_location_t operator_loc;
574
623
  struct yp_node *value;
575
624
  } yp_class_variable_and_write_node_t;
576
625
 
577
626
  // ClassVariableOperatorWriteNode
627
+ //
628
+ // Type: YP_NODE_CLASS_VARIABLE_OPERATOR_WRITE_NODE
578
629
  typedef struct yp_class_variable_operator_write_node {
579
630
  yp_node_t base;
631
+ yp_constant_id_t name;
580
632
  yp_location_t name_loc;
581
633
  yp_location_t operator_loc;
582
634
  struct yp_node *value;
@@ -584,32 +636,46 @@ typedef struct yp_class_variable_operator_write_node {
584
636
  } yp_class_variable_operator_write_node_t;
585
637
 
586
638
  // ClassVariableOrWriteNode
639
+ //
640
+ // Type: YP_NODE_CLASS_VARIABLE_OR_WRITE_NODE
587
641
  typedef struct yp_class_variable_or_write_node {
588
642
  yp_node_t base;
643
+ yp_constant_id_t name;
589
644
  yp_location_t name_loc;
590
645
  yp_location_t operator_loc;
591
646
  struct yp_node *value;
592
647
  } yp_class_variable_or_write_node_t;
593
648
 
594
649
  // ClassVariableReadNode
650
+ //
651
+ // Type: YP_NODE_CLASS_VARIABLE_READ_NODE
595
652
  typedef struct yp_class_variable_read_node {
596
653
  yp_node_t base;
654
+ yp_constant_id_t name;
597
655
  } yp_class_variable_read_node_t;
598
656
 
599
657
  // ClassVariableTargetNode
658
+ //
659
+ // Type: YP_NODE_CLASS_VARIABLE_TARGET_NODE
600
660
  typedef struct yp_class_variable_target_node {
601
661
  yp_node_t base;
662
+ yp_constant_id_t name;
602
663
  } yp_class_variable_target_node_t;
603
664
 
604
665
  // ClassVariableWriteNode
666
+ //
667
+ // Type: YP_NODE_CLASS_VARIABLE_WRITE_NODE
605
668
  typedef struct yp_class_variable_write_node {
606
669
  yp_node_t base;
670
+ yp_constant_id_t name;
607
671
  yp_location_t name_loc;
608
672
  struct yp_node *value;
609
673
  yp_location_t operator_loc;
610
674
  } yp_class_variable_write_node_t;
611
675
 
612
676
  // ConstantAndWriteNode
677
+ //
678
+ // Type: YP_NODE_CONSTANT_AND_WRITE_NODE
613
679
  typedef struct yp_constant_and_write_node {
614
680
  yp_node_t base;
615
681
  yp_location_t name_loc;
@@ -618,6 +684,8 @@ typedef struct yp_constant_and_write_node {
618
684
  } yp_constant_and_write_node_t;
619
685
 
620
686
  // ConstantOperatorWriteNode
687
+ //
688
+ // Type: YP_NODE_CONSTANT_OPERATOR_WRITE_NODE
621
689
  typedef struct yp_constant_operator_write_node {
622
690
  yp_node_t base;
623
691
  yp_location_t name_loc;
@@ -627,6 +695,8 @@ typedef struct yp_constant_operator_write_node {
627
695
  } yp_constant_operator_write_node_t;
628
696
 
629
697
  // ConstantOrWriteNode
698
+ //
699
+ // Type: YP_NODE_CONSTANT_OR_WRITE_NODE
630
700
  typedef struct yp_constant_or_write_node {
631
701
  yp_node_t base;
632
702
  yp_location_t name_loc;
@@ -635,6 +705,8 @@ typedef struct yp_constant_or_write_node {
635
705
  } yp_constant_or_write_node_t;
636
706
 
637
707
  // ConstantPathAndWriteNode
708
+ //
709
+ // Type: YP_NODE_CONSTANT_PATH_AND_WRITE_NODE
638
710
  typedef struct yp_constant_path_and_write_node {
639
711
  yp_node_t base;
640
712
  struct yp_constant_path_node *target;
@@ -643,6 +715,8 @@ typedef struct yp_constant_path_and_write_node {
643
715
  } yp_constant_path_and_write_node_t;
644
716
 
645
717
  // ConstantPathNode
718
+ //
719
+ // Type: YP_NODE_CONSTANT_PATH_NODE
646
720
  typedef struct yp_constant_path_node {
647
721
  yp_node_t base;
648
722
  struct yp_node *parent;
@@ -651,6 +725,8 @@ typedef struct yp_constant_path_node {
651
725
  } yp_constant_path_node_t;
652
726
 
653
727
  // ConstantPathOperatorWriteNode
728
+ //
729
+ // Type: YP_NODE_CONSTANT_PATH_OPERATOR_WRITE_NODE
654
730
  typedef struct yp_constant_path_operator_write_node {
655
731
  yp_node_t base;
656
732
  struct yp_constant_path_node *target;
@@ -660,6 +736,8 @@ typedef struct yp_constant_path_operator_write_node {
660
736
  } yp_constant_path_operator_write_node_t;
661
737
 
662
738
  // ConstantPathOrWriteNode
739
+ //
740
+ // Type: YP_NODE_CONSTANT_PATH_OR_WRITE_NODE
663
741
  typedef struct yp_constant_path_or_write_node {
664
742
  yp_node_t base;
665
743
  struct yp_constant_path_node *target;
@@ -668,6 +746,8 @@ typedef struct yp_constant_path_or_write_node {
668
746
  } yp_constant_path_or_write_node_t;
669
747
 
670
748
  // ConstantPathTargetNode
749
+ //
750
+ // Type: YP_NODE_CONSTANT_PATH_TARGET_NODE
671
751
  typedef struct yp_constant_path_target_node {
672
752
  yp_node_t base;
673
753
  struct yp_node *parent;
@@ -676,6 +756,8 @@ typedef struct yp_constant_path_target_node {
676
756
  } yp_constant_path_target_node_t;
677
757
 
678
758
  // ConstantPathWriteNode
759
+ //
760
+ // Type: YP_NODE_CONSTANT_PATH_WRITE_NODE
679
761
  typedef struct yp_constant_path_write_node {
680
762
  yp_node_t base;
681
763
  struct yp_constant_path_node *target;
@@ -684,16 +766,22 @@ typedef struct yp_constant_path_write_node {
684
766
  } yp_constant_path_write_node_t;
685
767
 
686
768
  // ConstantReadNode
769
+ //
770
+ // Type: YP_NODE_CONSTANT_READ_NODE
687
771
  typedef struct yp_constant_read_node {
688
772
  yp_node_t base;
689
773
  } yp_constant_read_node_t;
690
774
 
691
775
  // ConstantTargetNode
776
+ //
777
+ // Type: YP_NODE_CONSTANT_TARGET_NODE
692
778
  typedef struct yp_constant_target_node {
693
779
  yp_node_t base;
694
780
  } yp_constant_target_node_t;
695
781
 
696
782
  // ConstantWriteNode
783
+ //
784
+ // Type: YP_NODE_CONSTANT_WRITE_NODE
697
785
  typedef struct yp_constant_write_node {
698
786
  yp_node_t base;
699
787
  yp_location_t name_loc;
@@ -702,6 +790,8 @@ typedef struct yp_constant_write_node {
702
790
  } yp_constant_write_node_t;
703
791
 
704
792
  // DefNode
793
+ //
794
+ // Type: YP_NODE_DEF_NODE
705
795
  typedef struct yp_def_node {
706
796
  yp_node_t base;
707
797
  yp_location_t name_loc;
@@ -718,6 +808,8 @@ typedef struct yp_def_node {
718
808
  } yp_def_node_t;
719
809
 
720
810
  // DefinedNode
811
+ //
812
+ // Type: YP_NODE_DEFINED_NODE
721
813
  typedef struct yp_defined_node {
722
814
  yp_node_t base;
723
815
  yp_location_t lparen_loc;
@@ -727,6 +819,8 @@ typedef struct yp_defined_node {
727
819
  } yp_defined_node_t;
728
820
 
729
821
  // ElseNode
822
+ //
823
+ // Type: YP_NODE_ELSE_NODE
730
824
  typedef struct yp_else_node {
731
825
  yp_node_t base;
732
826
  yp_location_t else_keyword_loc;
@@ -735,6 +829,8 @@ typedef struct yp_else_node {
735
829
  } yp_else_node_t;
736
830
 
737
831
  // EmbeddedStatementsNode
832
+ //
833
+ // Type: YP_NODE_EMBEDDED_STATEMENTS_NODE
738
834
  typedef struct yp_embedded_statements_node {
739
835
  yp_node_t base;
740
836
  yp_location_t opening_loc;
@@ -743,6 +839,8 @@ typedef struct yp_embedded_statements_node {
743
839
  } yp_embedded_statements_node_t;
744
840
 
745
841
  // EmbeddedVariableNode
842
+ //
843
+ // Type: YP_NODE_EMBEDDED_VARIABLE_NODE
746
844
  typedef struct yp_embedded_variable_node {
747
845
  yp_node_t base;
748
846
  yp_location_t operator_loc;
@@ -750,6 +848,8 @@ typedef struct yp_embedded_variable_node {
750
848
  } yp_embedded_variable_node_t;
751
849
 
752
850
  // EnsureNode
851
+ //
852
+ // Type: YP_NODE_ENSURE_NODE
753
853
  typedef struct yp_ensure_node {
754
854
  yp_node_t base;
755
855
  yp_location_t ensure_keyword_loc;
@@ -758,11 +858,15 @@ typedef struct yp_ensure_node {
758
858
  } yp_ensure_node_t;
759
859
 
760
860
  // FalseNode
861
+ //
862
+ // Type: YP_NODE_FALSE_NODE
761
863
  typedef struct yp_false_node {
762
864
  yp_node_t base;
763
865
  } yp_false_node_t;
764
866
 
765
867
  // FindPatternNode
868
+ //
869
+ // Type: YP_NODE_FIND_PATTERN_NODE
766
870
  typedef struct yp_find_pattern_node {
767
871
  yp_node_t base;
768
872
  struct yp_node *constant;
@@ -774,6 +878,10 @@ typedef struct yp_find_pattern_node {
774
878
  } yp_find_pattern_node_t;
775
879
 
776
880
  // FlipFlopNode
881
+ //
882
+ // Type: YP_NODE_FLIP_FLOP_NODE
883
+ // Flags:
884
+ // YP_RANGE_FLAGS_EXCLUDE_END
777
885
  typedef struct yp_flip_flop_node {
778
886
  yp_node_t base;
779
887
  struct yp_node *left;
@@ -782,11 +890,15 @@ typedef struct yp_flip_flop_node {
782
890
  } yp_flip_flop_node_t;
783
891
 
784
892
  // FloatNode
893
+ //
894
+ // Type: YP_NODE_FLOAT_NODE
785
895
  typedef struct yp_float_node {
786
896
  yp_node_t base;
787
897
  } yp_float_node_t;
788
898
 
789
899
  // ForNode
900
+ //
901
+ // Type: YP_NODE_FOR_NODE
790
902
  typedef struct yp_for_node {
791
903
  yp_node_t base;
792
904
  struct yp_node *index;
@@ -799,22 +911,30 @@ typedef struct yp_for_node {
799
911
  } yp_for_node_t;
800
912
 
801
913
  // ForwardingArgumentsNode
914
+ //
915
+ // Type: YP_NODE_FORWARDING_ARGUMENTS_NODE
802
916
  typedef struct yp_forwarding_arguments_node {
803
917
  yp_node_t base;
804
918
  } yp_forwarding_arguments_node_t;
805
919
 
806
920
  // ForwardingParameterNode
921
+ //
922
+ // Type: YP_NODE_FORWARDING_PARAMETER_NODE
807
923
  typedef struct yp_forwarding_parameter_node {
808
924
  yp_node_t base;
809
925
  } yp_forwarding_parameter_node_t;
810
926
 
811
927
  // ForwardingSuperNode
928
+ //
929
+ // Type: YP_NODE_FORWARDING_SUPER_NODE
812
930
  typedef struct yp_forwarding_super_node {
813
931
  yp_node_t base;
814
932
  struct yp_block_node *block;
815
933
  } yp_forwarding_super_node_t;
816
934
 
817
935
  // GlobalVariableAndWriteNode
936
+ //
937
+ // Type: YP_NODE_GLOBAL_VARIABLE_AND_WRITE_NODE
818
938
  typedef struct yp_global_variable_and_write_node {
819
939
  yp_node_t base;
820
940
  yp_location_t name_loc;
@@ -823,6 +943,8 @@ typedef struct yp_global_variable_and_write_node {
823
943
  } yp_global_variable_and_write_node_t;
824
944
 
825
945
  // GlobalVariableOperatorWriteNode
946
+ //
947
+ // Type: YP_NODE_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE
826
948
  typedef struct yp_global_variable_operator_write_node {
827
949
  yp_node_t base;
828
950
  yp_location_t name_loc;
@@ -832,6 +954,8 @@ typedef struct yp_global_variable_operator_write_node {
832
954
  } yp_global_variable_operator_write_node_t;
833
955
 
834
956
  // GlobalVariableOrWriteNode
957
+ //
958
+ // Type: YP_NODE_GLOBAL_VARIABLE_OR_WRITE_NODE
835
959
  typedef struct yp_global_variable_or_write_node {
836
960
  yp_node_t base;
837
961
  yp_location_t name_loc;
@@ -840,24 +964,32 @@ typedef struct yp_global_variable_or_write_node {
840
964
  } yp_global_variable_or_write_node_t;
841
965
 
842
966
  // GlobalVariableReadNode
967
+ //
968
+ // Type: YP_NODE_GLOBAL_VARIABLE_READ_NODE
843
969
  typedef struct yp_global_variable_read_node {
844
970
  yp_node_t base;
845
971
  } yp_global_variable_read_node_t;
846
972
 
847
973
  // GlobalVariableTargetNode
974
+ //
975
+ // Type: YP_NODE_GLOBAL_VARIABLE_TARGET_NODE
848
976
  typedef struct yp_global_variable_target_node {
849
977
  yp_node_t base;
850
978
  } yp_global_variable_target_node_t;
851
979
 
852
980
  // GlobalVariableWriteNode
981
+ //
982
+ // Type: YP_NODE_GLOBAL_VARIABLE_WRITE_NODE
853
983
  typedef struct yp_global_variable_write_node {
854
984
  yp_node_t base;
855
985
  yp_location_t name_loc;
856
- yp_location_t operator_loc;
857
986
  struct yp_node *value;
987
+ yp_location_t operator_loc;
858
988
  } yp_global_variable_write_node_t;
859
989
 
860
990
  // HashNode
991
+ //
992
+ // Type: YP_NODE_HASH_NODE
861
993
  typedef struct yp_hash_node {
862
994
  yp_node_t base;
863
995
  yp_location_t opening_loc;
@@ -866,6 +998,8 @@ typedef struct yp_hash_node {
866
998
  } yp_hash_node_t;
867
999
 
868
1000
  // HashPatternNode
1001
+ //
1002
+ // Type: YP_NODE_HASH_PATTERN_NODE
869
1003
  typedef struct yp_hash_pattern_node {
870
1004
  yp_node_t base;
871
1005
  struct yp_node *constant;
@@ -876,6 +1010,8 @@ typedef struct yp_hash_pattern_node {
876
1010
  } yp_hash_pattern_node_t;
877
1011
 
878
1012
  // IfNode
1013
+ //
1014
+ // Type: YP_NODE_IF_NODE
879
1015
  typedef struct yp_if_node {
880
1016
  yp_node_t base;
881
1017
  yp_location_t if_keyword_loc;
@@ -886,12 +1022,16 @@ typedef struct yp_if_node {
886
1022
  } yp_if_node_t;
887
1023
 
888
1024
  // ImaginaryNode
1025
+ //
1026
+ // Type: YP_NODE_IMAGINARY_NODE
889
1027
  typedef struct yp_imaginary_node {
890
1028
  yp_node_t base;
891
1029
  struct yp_node *numeric;
892
1030
  } yp_imaginary_node_t;
893
1031
 
894
1032
  // InNode
1033
+ //
1034
+ // Type: YP_NODE_IN_NODE
895
1035
  typedef struct yp_in_node {
896
1036
  yp_node_t base;
897
1037
  struct yp_node *pattern;
@@ -901,16 +1041,22 @@ typedef struct yp_in_node {
901
1041
  } yp_in_node_t;
902
1042
 
903
1043
  // InstanceVariableAndWriteNode
1044
+ //
1045
+ // Type: YP_NODE_INSTANCE_VARIABLE_AND_WRITE_NODE
904
1046
  typedef struct yp_instance_variable_and_write_node {
905
1047
  yp_node_t base;
1048
+ yp_constant_id_t name;
906
1049
  yp_location_t name_loc;
907
1050
  yp_location_t operator_loc;
908
1051
  struct yp_node *value;
909
1052
  } yp_instance_variable_and_write_node_t;
910
1053
 
911
1054
  // InstanceVariableOperatorWriteNode
1055
+ //
1056
+ // Type: YP_NODE_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE
912
1057
  typedef struct yp_instance_variable_operator_write_node {
913
1058
  yp_node_t base;
1059
+ yp_constant_id_t name;
914
1060
  yp_location_t name_loc;
915
1061
  yp_location_t operator_loc;
916
1062
  struct yp_node *value;
@@ -918,37 +1064,62 @@ typedef struct yp_instance_variable_operator_write_node {
918
1064
  } yp_instance_variable_operator_write_node_t;
919
1065
 
920
1066
  // InstanceVariableOrWriteNode
1067
+ //
1068
+ // Type: YP_NODE_INSTANCE_VARIABLE_OR_WRITE_NODE
921
1069
  typedef struct yp_instance_variable_or_write_node {
922
1070
  yp_node_t base;
1071
+ yp_constant_id_t name;
923
1072
  yp_location_t name_loc;
924
1073
  yp_location_t operator_loc;
925
1074
  struct yp_node *value;
926
1075
  } yp_instance_variable_or_write_node_t;
927
1076
 
928
1077
  // InstanceVariableReadNode
1078
+ //
1079
+ // Type: YP_NODE_INSTANCE_VARIABLE_READ_NODE
929
1080
  typedef struct yp_instance_variable_read_node {
930
1081
  yp_node_t base;
1082
+ yp_constant_id_t name;
931
1083
  } yp_instance_variable_read_node_t;
932
1084
 
933
1085
  // InstanceVariableTargetNode
1086
+ //
1087
+ // Type: YP_NODE_INSTANCE_VARIABLE_TARGET_NODE
934
1088
  typedef struct yp_instance_variable_target_node {
935
1089
  yp_node_t base;
1090
+ yp_constant_id_t name;
936
1091
  } yp_instance_variable_target_node_t;
937
1092
 
938
1093
  // InstanceVariableWriteNode
1094
+ //
1095
+ // Type: YP_NODE_INSTANCE_VARIABLE_WRITE_NODE
939
1096
  typedef struct yp_instance_variable_write_node {
940
1097
  yp_node_t base;
1098
+ yp_constant_id_t name;
941
1099
  yp_location_t name_loc;
942
1100
  struct yp_node *value;
943
1101
  yp_location_t operator_loc;
944
1102
  } yp_instance_variable_write_node_t;
945
1103
 
946
1104
  // IntegerNode
1105
+ //
1106
+ // Type: YP_NODE_INTEGER_NODE
947
1107
  typedef struct yp_integer_node {
948
1108
  yp_node_t base;
949
1109
  } yp_integer_node_t;
950
1110
 
951
1111
  // InterpolatedRegularExpressionNode
1112
+ //
1113
+ // Type: YP_NODE_INTERPOLATED_REGULAR_EXPRESSION_NODE
1114
+ // Flags:
1115
+ // YP_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
1116
+ // YP_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
1117
+ // YP_REGULAR_EXPRESSION_FLAGS_EXTENDED
1118
+ // YP_REGULAR_EXPRESSION_FLAGS_EUC_JP
1119
+ // YP_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
1120
+ // YP_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
1121
+ // YP_REGULAR_EXPRESSION_FLAGS_UTF_8
1122
+ // YP_REGULAR_EXPRESSION_FLAGS_ONCE
952
1123
  typedef struct yp_interpolated_regular_expression_node {
953
1124
  yp_node_t base;
954
1125
  yp_location_t opening_loc;
@@ -957,6 +1128,8 @@ typedef struct yp_interpolated_regular_expression_node {
957
1128
  } yp_interpolated_regular_expression_node_t;
958
1129
 
959
1130
  // InterpolatedStringNode
1131
+ //
1132
+ // Type: YP_NODE_INTERPOLATED_STRING_NODE
960
1133
  typedef struct yp_interpolated_string_node {
961
1134
  yp_node_t base;
962
1135
  yp_location_t opening_loc;
@@ -965,6 +1138,8 @@ typedef struct yp_interpolated_string_node {
965
1138
  } yp_interpolated_string_node_t;
966
1139
 
967
1140
  // InterpolatedSymbolNode
1141
+ //
1142
+ // Type: YP_NODE_INTERPOLATED_SYMBOL_NODE
968
1143
  typedef struct yp_interpolated_symbol_node {
969
1144
  yp_node_t base;
970
1145
  yp_location_t opening_loc;
@@ -973,6 +1148,8 @@ typedef struct yp_interpolated_symbol_node {
973
1148
  } yp_interpolated_symbol_node_t;
974
1149
 
975
1150
  // InterpolatedXStringNode
1151
+ //
1152
+ // Type: YP_NODE_INTERPOLATED_X_STRING_NODE
976
1153
  typedef struct yp_interpolated_x_string_node {
977
1154
  yp_node_t base;
978
1155
  yp_location_t opening_loc;
@@ -981,12 +1158,16 @@ typedef struct yp_interpolated_x_string_node {
981
1158
  } yp_interpolated_x_string_node_t;
982
1159
 
983
1160
  // KeywordHashNode
1161
+ //
1162
+ // Type: YP_NODE_KEYWORD_HASH_NODE
984
1163
  typedef struct yp_keyword_hash_node {
985
1164
  yp_node_t base;
986
1165
  struct yp_node_list elements;
987
1166
  } yp_keyword_hash_node_t;
988
1167
 
989
1168
  // KeywordParameterNode
1169
+ //
1170
+ // Type: YP_NODE_KEYWORD_PARAMETER_NODE
990
1171
  typedef struct yp_keyword_parameter_node {
991
1172
  yp_node_t base;
992
1173
  yp_location_t name_loc;
@@ -994,6 +1175,8 @@ typedef struct yp_keyword_parameter_node {
994
1175
  } yp_keyword_parameter_node_t;
995
1176
 
996
1177
  // KeywordRestParameterNode
1178
+ //
1179
+ // Type: YP_NODE_KEYWORD_REST_PARAMETER_NODE
997
1180
  typedef struct yp_keyword_rest_parameter_node {
998
1181
  yp_node_t base;
999
1182
  yp_location_t operator_loc;
@@ -1001,6 +1184,8 @@ typedef struct yp_keyword_rest_parameter_node {
1001
1184
  } yp_keyword_rest_parameter_node_t;
1002
1185
 
1003
1186
  // LambdaNode
1187
+ //
1188
+ // Type: YP_NODE_LAMBDA_NODE
1004
1189
  typedef struct yp_lambda_node {
1005
1190
  yp_node_t base;
1006
1191
  yp_constant_id_list_t locals;
@@ -1012,61 +1197,75 @@ typedef struct yp_lambda_node {
1012
1197
  } yp_lambda_node_t;
1013
1198
 
1014
1199
  // LocalVariableAndWriteNode
1200
+ //
1201
+ // Type: YP_NODE_LOCAL_VARIABLE_AND_WRITE_NODE
1015
1202
  typedef struct yp_local_variable_and_write_node {
1016
1203
  yp_node_t base;
1017
1204
  yp_location_t name_loc;
1018
1205
  yp_location_t operator_loc;
1019
1206
  struct yp_node *value;
1020
- yp_constant_id_t constant_id;
1207
+ yp_constant_id_t name;
1021
1208
  uint32_t depth;
1022
1209
  } yp_local_variable_and_write_node_t;
1023
1210
 
1024
1211
  // LocalVariableOperatorWriteNode
1212
+ //
1213
+ // Type: YP_NODE_LOCAL_VARIABLE_OPERATOR_WRITE_NODE
1025
1214
  typedef struct yp_local_variable_operator_write_node {
1026
1215
  yp_node_t base;
1027
1216
  yp_location_t name_loc;
1028
1217
  yp_location_t operator_loc;
1029
1218
  struct yp_node *value;
1030
- yp_constant_id_t constant_id;
1031
- yp_constant_id_t operator_id;
1219
+ yp_constant_id_t name;
1220
+ yp_constant_id_t operator;
1032
1221
  uint32_t depth;
1033
1222
  } yp_local_variable_operator_write_node_t;
1034
1223
 
1035
1224
  // LocalVariableOrWriteNode
1225
+ //
1226
+ // Type: YP_NODE_LOCAL_VARIABLE_OR_WRITE_NODE
1036
1227
  typedef struct yp_local_variable_or_write_node {
1037
1228
  yp_node_t base;
1038
1229
  yp_location_t name_loc;
1039
1230
  yp_location_t operator_loc;
1040
1231
  struct yp_node *value;
1041
- yp_constant_id_t constant_id;
1232
+ yp_constant_id_t name;
1042
1233
  uint32_t depth;
1043
1234
  } yp_local_variable_or_write_node_t;
1044
1235
 
1045
1236
  // LocalVariableReadNode
1237
+ //
1238
+ // Type: YP_NODE_LOCAL_VARIABLE_READ_NODE
1046
1239
  typedef struct yp_local_variable_read_node {
1047
1240
  yp_node_t base;
1048
- yp_constant_id_t constant_id;
1241
+ yp_constant_id_t name;
1049
1242
  uint32_t depth;
1050
1243
  } yp_local_variable_read_node_t;
1051
1244
 
1052
1245
  // LocalVariableTargetNode
1246
+ //
1247
+ // Type: YP_NODE_LOCAL_VARIABLE_TARGET_NODE
1053
1248
  typedef struct yp_local_variable_target_node {
1054
1249
  yp_node_t base;
1055
- yp_constant_id_t constant_id;
1250
+ yp_constant_id_t name;
1056
1251
  uint32_t depth;
1057
1252
  } yp_local_variable_target_node_t;
1058
1253
 
1059
1254
  // LocalVariableWriteNode
1255
+ //
1256
+ // Type: YP_NODE_LOCAL_VARIABLE_WRITE_NODE
1060
1257
  typedef struct yp_local_variable_write_node {
1061
1258
  yp_node_t base;
1062
- yp_constant_id_t constant_id;
1259
+ yp_constant_id_t name;
1063
1260
  uint32_t depth;
1064
- struct yp_node *value;
1065
1261
  yp_location_t name_loc;
1262
+ struct yp_node *value;
1066
1263
  yp_location_t operator_loc;
1067
1264
  } yp_local_variable_write_node_t;
1068
1265
 
1069
1266
  // MatchPredicateNode
1267
+ //
1268
+ // Type: YP_NODE_MATCH_PREDICATE_NODE
1070
1269
  typedef struct yp_match_predicate_node {
1071
1270
  yp_node_t base;
1072
1271
  struct yp_node *value;
@@ -1075,6 +1274,8 @@ typedef struct yp_match_predicate_node {
1075
1274
  } yp_match_predicate_node_t;
1076
1275
 
1077
1276
  // MatchRequiredNode
1277
+ //
1278
+ // Type: YP_NODE_MATCH_REQUIRED_NODE
1078
1279
  typedef struct yp_match_required_node {
1079
1280
  yp_node_t base;
1080
1281
  struct yp_node *value;
@@ -1083,11 +1284,15 @@ typedef struct yp_match_required_node {
1083
1284
  } yp_match_required_node_t;
1084
1285
 
1085
1286
  // MissingNode
1287
+ //
1288
+ // Type: YP_NODE_MISSING_NODE
1086
1289
  typedef struct yp_missing_node {
1087
1290
  yp_node_t base;
1088
1291
  } yp_missing_node_t;
1089
1292
 
1090
1293
  // ModuleNode
1294
+ //
1295
+ // Type: YP_NODE_MODULE_NODE
1091
1296
  typedef struct yp_module_node {
1092
1297
  yp_node_t base;
1093
1298
  yp_constant_id_list_t locals;
@@ -1099,6 +1304,8 @@ typedef struct yp_module_node {
1099
1304
  } yp_module_node_t;
1100
1305
 
1101
1306
  // MultiWriteNode
1307
+ //
1308
+ // Type: YP_NODE_MULTI_WRITE_NODE
1102
1309
  typedef struct yp_multi_write_node {
1103
1310
  yp_node_t base;
1104
1311
  struct yp_node_list targets;
@@ -1109,6 +1316,8 @@ typedef struct yp_multi_write_node {
1109
1316
  } yp_multi_write_node_t;
1110
1317
 
1111
1318
  // NextNode
1319
+ //
1320
+ // Type: YP_NODE_NEXT_NODE
1112
1321
  typedef struct yp_next_node {
1113
1322
  yp_node_t base;
1114
1323
  struct yp_arguments_node *arguments;
@@ -1116,11 +1325,15 @@ typedef struct yp_next_node {
1116
1325
  } yp_next_node_t;
1117
1326
 
1118
1327
  // NilNode
1328
+ //
1329
+ // Type: YP_NODE_NIL_NODE
1119
1330
  typedef struct yp_nil_node {
1120
1331
  yp_node_t base;
1121
1332
  } yp_nil_node_t;
1122
1333
 
1123
1334
  // NoKeywordsParameterNode
1335
+ //
1336
+ // Type: YP_NODE_NO_KEYWORDS_PARAMETER_NODE
1124
1337
  typedef struct yp_no_keywords_parameter_node {
1125
1338
  yp_node_t base;
1126
1339
  yp_location_t operator_loc;
@@ -1128,20 +1341,27 @@ typedef struct yp_no_keywords_parameter_node {
1128
1341
  } yp_no_keywords_parameter_node_t;
1129
1342
 
1130
1343
  // NumberedReferenceReadNode
1344
+ //
1345
+ // Type: YP_NODE_NUMBERED_REFERENCE_READ_NODE
1131
1346
  typedef struct yp_numbered_reference_read_node {
1132
1347
  yp_node_t base;
1348
+ uint32_t number;
1133
1349
  } yp_numbered_reference_read_node_t;
1134
1350
 
1135
1351
  // OptionalParameterNode
1352
+ //
1353
+ // Type: YP_NODE_OPTIONAL_PARAMETER_NODE
1136
1354
  typedef struct yp_optional_parameter_node {
1137
1355
  yp_node_t base;
1138
- yp_constant_id_t constant_id;
1356
+ yp_constant_id_t name;
1139
1357
  yp_location_t name_loc;
1140
1358
  yp_location_t operator_loc;
1141
1359
  struct yp_node *value;
1142
1360
  } yp_optional_parameter_node_t;
1143
1361
 
1144
1362
  // OrNode
1363
+ //
1364
+ // Type: YP_NODE_OR_NODE
1145
1365
  typedef struct yp_or_node {
1146
1366
  yp_node_t base;
1147
1367
  struct yp_node *left;
@@ -1150,6 +1370,8 @@ typedef struct yp_or_node {
1150
1370
  } yp_or_node_t;
1151
1371
 
1152
1372
  // ParametersNode
1373
+ //
1374
+ // Type: YP_NODE_PARAMETERS_NODE
1153
1375
  typedef struct yp_parameters_node {
1154
1376
  yp_node_t base;
1155
1377
  struct yp_node_list requireds;
@@ -1162,6 +1384,8 @@ typedef struct yp_parameters_node {
1162
1384
  } yp_parameters_node_t;
1163
1385
 
1164
1386
  // ParenthesesNode
1387
+ //
1388
+ // Type: YP_NODE_PARENTHESES_NODE
1165
1389
  typedef struct yp_parentheses_node {
1166
1390
  yp_node_t base;
1167
1391
  struct yp_node *body;
@@ -1170,6 +1394,8 @@ typedef struct yp_parentheses_node {
1170
1394
  } yp_parentheses_node_t;
1171
1395
 
1172
1396
  // PinnedExpressionNode
1397
+ //
1398
+ // Type: YP_NODE_PINNED_EXPRESSION_NODE
1173
1399
  typedef struct yp_pinned_expression_node {
1174
1400
  yp_node_t base;
1175
1401
  struct yp_node *expression;
@@ -1179,6 +1405,8 @@ typedef struct yp_pinned_expression_node {
1179
1405
  } yp_pinned_expression_node_t;
1180
1406
 
1181
1407
  // PinnedVariableNode
1408
+ //
1409
+ // Type: YP_NODE_PINNED_VARIABLE_NODE
1182
1410
  typedef struct yp_pinned_variable_node {
1183
1411
  yp_node_t base;
1184
1412
  struct yp_node *variable;
@@ -1186,6 +1414,8 @@ typedef struct yp_pinned_variable_node {
1186
1414
  } yp_pinned_variable_node_t;
1187
1415
 
1188
1416
  // PostExecutionNode
1417
+ //
1418
+ // Type: YP_NODE_POST_EXECUTION_NODE
1189
1419
  typedef struct yp_post_execution_node {
1190
1420
  yp_node_t base;
1191
1421
  struct yp_statements_node *statements;
@@ -1195,6 +1425,8 @@ typedef struct yp_post_execution_node {
1195
1425
  } yp_post_execution_node_t;
1196
1426
 
1197
1427
  // PreExecutionNode
1428
+ //
1429
+ // Type: YP_NODE_PRE_EXECUTION_NODE
1198
1430
  typedef struct yp_pre_execution_node {
1199
1431
  yp_node_t base;
1200
1432
  struct yp_statements_node *statements;
@@ -1204,6 +1436,8 @@ typedef struct yp_pre_execution_node {
1204
1436
  } yp_pre_execution_node_t;
1205
1437
 
1206
1438
  // ProgramNode
1439
+ //
1440
+ // Type: YP_NODE_PROGRAM_NODE
1207
1441
  typedef struct yp_program_node {
1208
1442
  yp_node_t base;
1209
1443
  yp_constant_id_list_t locals;
@@ -1211,6 +1445,10 @@ typedef struct yp_program_node {
1211
1445
  } yp_program_node_t;
1212
1446
 
1213
1447
  // RangeNode
1448
+ //
1449
+ // Type: YP_NODE_RANGE_NODE
1450
+ // Flags:
1451
+ // YP_RANGE_FLAGS_EXCLUDE_END
1214
1452
  typedef struct yp_range_node {
1215
1453
  yp_node_t base;
1216
1454
  struct yp_node *left;
@@ -1219,17 +1457,32 @@ typedef struct yp_range_node {
1219
1457
  } yp_range_node_t;
1220
1458
 
1221
1459
  // RationalNode
1460
+ //
1461
+ // Type: YP_NODE_RATIONAL_NODE
1222
1462
  typedef struct yp_rational_node {
1223
1463
  yp_node_t base;
1224
1464
  struct yp_node *numeric;
1225
1465
  } yp_rational_node_t;
1226
1466
 
1227
1467
  // RedoNode
1468
+ //
1469
+ // Type: YP_NODE_REDO_NODE
1228
1470
  typedef struct yp_redo_node {
1229
1471
  yp_node_t base;
1230
1472
  } yp_redo_node_t;
1231
1473
 
1232
1474
  // RegularExpressionNode
1475
+ //
1476
+ // Type: YP_NODE_REGULAR_EXPRESSION_NODE
1477
+ // Flags:
1478
+ // YP_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE
1479
+ // YP_REGULAR_EXPRESSION_FLAGS_MULTI_LINE
1480
+ // YP_REGULAR_EXPRESSION_FLAGS_EXTENDED
1481
+ // YP_REGULAR_EXPRESSION_FLAGS_EUC_JP
1482
+ // YP_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT
1483
+ // YP_REGULAR_EXPRESSION_FLAGS_WINDOWS_31J
1484
+ // YP_REGULAR_EXPRESSION_FLAGS_UTF_8
1485
+ // YP_REGULAR_EXPRESSION_FLAGS_ONCE
1233
1486
  typedef struct yp_regular_expression_node {
1234
1487
  yp_node_t base;
1235
1488
  yp_location_t opening_loc;
@@ -1239,6 +1492,8 @@ typedef struct yp_regular_expression_node {
1239
1492
  } yp_regular_expression_node_t;
1240
1493
 
1241
1494
  // RequiredDestructuredParameterNode
1495
+ //
1496
+ // Type: YP_NODE_REQUIRED_DESTRUCTURED_PARAMETER_NODE
1242
1497
  typedef struct yp_required_destructured_parameter_node {
1243
1498
  yp_node_t base;
1244
1499
  struct yp_node_list parameters;
@@ -1247,12 +1502,16 @@ typedef struct yp_required_destructured_parameter_node {
1247
1502
  } yp_required_destructured_parameter_node_t;
1248
1503
 
1249
1504
  // RequiredParameterNode
1505
+ //
1506
+ // Type: YP_NODE_REQUIRED_PARAMETER_NODE
1250
1507
  typedef struct yp_required_parameter_node {
1251
1508
  yp_node_t base;
1252
- yp_constant_id_t constant_id;
1509
+ yp_constant_id_t name;
1253
1510
  } yp_required_parameter_node_t;
1254
1511
 
1255
1512
  // RescueModifierNode
1513
+ //
1514
+ // Type: YP_NODE_RESCUE_MODIFIER_NODE
1256
1515
  typedef struct yp_rescue_modifier_node {
1257
1516
  yp_node_t base;
1258
1517
  struct yp_node *expression;
@@ -1261,6 +1520,8 @@ typedef struct yp_rescue_modifier_node {
1261
1520
  } yp_rescue_modifier_node_t;
1262
1521
 
1263
1522
  // RescueNode
1523
+ //
1524
+ // Type: YP_NODE_RESCUE_NODE
1264
1525
  typedef struct yp_rescue_node {
1265
1526
  yp_node_t base;
1266
1527
  yp_location_t keyword_loc;
@@ -1272,6 +1533,8 @@ typedef struct yp_rescue_node {
1272
1533
  } yp_rescue_node_t;
1273
1534
 
1274
1535
  // RestParameterNode
1536
+ //
1537
+ // Type: YP_NODE_REST_PARAMETER_NODE
1275
1538
  typedef struct yp_rest_parameter_node {
1276
1539
  yp_node_t base;
1277
1540
  yp_location_t operator_loc;
@@ -1279,11 +1542,15 @@ typedef struct yp_rest_parameter_node {
1279
1542
  } yp_rest_parameter_node_t;
1280
1543
 
1281
1544
  // RetryNode
1545
+ //
1546
+ // Type: YP_NODE_RETRY_NODE
1282
1547
  typedef struct yp_retry_node {
1283
1548
  yp_node_t base;
1284
1549
  } yp_retry_node_t;
1285
1550
 
1286
1551
  // ReturnNode
1552
+ //
1553
+ // Type: YP_NODE_RETURN_NODE
1287
1554
  typedef struct yp_return_node {
1288
1555
  yp_node_t base;
1289
1556
  yp_location_t keyword_loc;
@@ -1291,11 +1558,15 @@ typedef struct yp_return_node {
1291
1558
  } yp_return_node_t;
1292
1559
 
1293
1560
  // SelfNode
1561
+ //
1562
+ // Type: YP_NODE_SELF_NODE
1294
1563
  typedef struct yp_self_node {
1295
1564
  yp_node_t base;
1296
1565
  } yp_self_node_t;
1297
1566
 
1298
1567
  // SingletonClassNode
1568
+ //
1569
+ // Type: YP_NODE_SINGLETON_CLASS_NODE
1299
1570
  typedef struct yp_singleton_class_node {
1300
1571
  yp_node_t base;
1301
1572
  yp_constant_id_list_t locals;
@@ -1307,22 +1578,30 @@ typedef struct yp_singleton_class_node {
1307
1578
  } yp_singleton_class_node_t;
1308
1579
 
1309
1580
  // SourceEncodingNode
1581
+ //
1582
+ // Type: YP_NODE_SOURCE_ENCODING_NODE
1310
1583
  typedef struct yp_source_encoding_node {
1311
1584
  yp_node_t base;
1312
1585
  } yp_source_encoding_node_t;
1313
1586
 
1314
1587
  // SourceFileNode
1588
+ //
1589
+ // Type: YP_NODE_SOURCE_FILE_NODE
1315
1590
  typedef struct yp_source_file_node {
1316
1591
  yp_node_t base;
1317
1592
  yp_string_t filepath;
1318
1593
  } yp_source_file_node_t;
1319
1594
 
1320
1595
  // SourceLineNode
1596
+ //
1597
+ // Type: YP_NODE_SOURCE_LINE_NODE
1321
1598
  typedef struct yp_source_line_node {
1322
1599
  yp_node_t base;
1323
1600
  } yp_source_line_node_t;
1324
1601
 
1325
1602
  // SplatNode
1603
+ //
1604
+ // Type: YP_NODE_SPLAT_NODE
1326
1605
  typedef struct yp_splat_node {
1327
1606
  yp_node_t base;
1328
1607
  yp_location_t operator_loc;
@@ -1330,12 +1609,16 @@ typedef struct yp_splat_node {
1330
1609
  } yp_splat_node_t;
1331
1610
 
1332
1611
  // StatementsNode
1612
+ //
1613
+ // Type: YP_NODE_STATEMENTS_NODE
1333
1614
  typedef struct yp_statements_node {
1334
1615
  yp_node_t base;
1335
1616
  struct yp_node_list body;
1336
1617
  } yp_statements_node_t;
1337
1618
 
1338
1619
  // StringConcatNode
1620
+ //
1621
+ // Type: YP_NODE_STRING_CONCAT_NODE
1339
1622
  typedef struct yp_string_concat_node {
1340
1623
  yp_node_t base;
1341
1624
  struct yp_node *left;
@@ -1343,6 +1626,8 @@ typedef struct yp_string_concat_node {
1343
1626
  } yp_string_concat_node_t;
1344
1627
 
1345
1628
  // StringNode
1629
+ //
1630
+ // Type: YP_NODE_STRING_NODE
1346
1631
  typedef struct yp_string_node {
1347
1632
  yp_node_t base;
1348
1633
  yp_location_t opening_loc;
@@ -1352,6 +1637,8 @@ typedef struct yp_string_node {
1352
1637
  } yp_string_node_t;
1353
1638
 
1354
1639
  // SuperNode
1640
+ //
1641
+ // Type: YP_NODE_SUPER_NODE
1355
1642
  typedef struct yp_super_node {
1356
1643
  yp_node_t base;
1357
1644
  yp_location_t keyword_loc;
@@ -1362,6 +1649,8 @@ typedef struct yp_super_node {
1362
1649
  } yp_super_node_t;
1363
1650
 
1364
1651
  // SymbolNode
1652
+ //
1653
+ // Type: YP_NODE_SYMBOL_NODE
1365
1654
  typedef struct yp_symbol_node {
1366
1655
  yp_node_t base;
1367
1656
  yp_location_t opening_loc;
@@ -1371,11 +1660,15 @@ typedef struct yp_symbol_node {
1371
1660
  } yp_symbol_node_t;
1372
1661
 
1373
1662
  // TrueNode
1663
+ //
1664
+ // Type: YP_NODE_TRUE_NODE
1374
1665
  typedef struct yp_true_node {
1375
1666
  yp_node_t base;
1376
1667
  } yp_true_node_t;
1377
1668
 
1378
1669
  // UndefNode
1670
+ //
1671
+ // Type: YP_NODE_UNDEF_NODE
1379
1672
  typedef struct yp_undef_node {
1380
1673
  yp_node_t base;
1381
1674
  struct yp_node_list names;
@@ -1383,6 +1676,8 @@ typedef struct yp_undef_node {
1383
1676
  } yp_undef_node_t;
1384
1677
 
1385
1678
  // UnlessNode
1679
+ //
1680
+ // Type: YP_NODE_UNLESS_NODE
1386
1681
  typedef struct yp_unless_node {
1387
1682
  yp_node_t base;
1388
1683
  yp_location_t keyword_loc;
@@ -1393,6 +1688,10 @@ typedef struct yp_unless_node {
1393
1688
  } yp_unless_node_t;
1394
1689
 
1395
1690
  // UntilNode
1691
+ //
1692
+ // Type: YP_NODE_UNTIL_NODE
1693
+ // Flags:
1694
+ // YP_LOOP_FLAGS_BEGIN_MODIFIER
1396
1695
  typedef struct yp_until_node {
1397
1696
  yp_node_t base;
1398
1697
  yp_location_t keyword_loc;
@@ -1402,6 +1701,8 @@ typedef struct yp_until_node {
1402
1701
  } yp_until_node_t;
1403
1702
 
1404
1703
  // WhenNode
1704
+ //
1705
+ // Type: YP_NODE_WHEN_NODE
1405
1706
  typedef struct yp_when_node {
1406
1707
  yp_node_t base;
1407
1708
  yp_location_t keyword_loc;
@@ -1410,6 +1711,10 @@ typedef struct yp_when_node {
1410
1711
  } yp_when_node_t;
1411
1712
 
1412
1713
  // WhileNode
1714
+ //
1715
+ // Type: YP_NODE_WHILE_NODE
1716
+ // Flags:
1717
+ // YP_LOOP_FLAGS_BEGIN_MODIFIER
1413
1718
  typedef struct yp_while_node {
1414
1719
  yp_node_t base;
1415
1720
  yp_location_t keyword_loc;
@@ -1419,6 +1724,8 @@ typedef struct yp_while_node {
1419
1724
  } yp_while_node_t;
1420
1725
 
1421
1726
  // XStringNode
1727
+ //
1728
+ // Type: YP_NODE_X_STRING_NODE
1422
1729
  typedef struct yp_x_string_node {
1423
1730
  yp_node_t base;
1424
1731
  yp_location_t opening_loc;
@@ -1428,6 +1735,8 @@ typedef struct yp_x_string_node {
1428
1735
  } yp_x_string_node_t;
1429
1736
 
1430
1737
  // YieldNode
1738
+ //
1739
+ // Type: YP_NODE_YIELD_NODE
1431
1740
  typedef struct yp_yield_node {
1432
1741
  yp_node_t base;
1433
1742
  yp_location_t keyword_loc;