yarp 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d7fbd6801f30b7ad185ea9884ad6ab4a0b0fd07494dbf96d90a560d7c5223a3
4
- data.tar.gz: a28e10e86eee28950106cea5be18020349ea5181111f4d45d540322677b5eed4
3
+ metadata.gz: 9d096d8bdda05ec360a58c8c6d98d1aeb6680b95a983a7d10d916d4a941be1c8
4
+ data.tar.gz: 7833c692ae2547f6628d15972b539484e06804179277d8f73a33cf448687f48b
5
5
  SHA512:
6
- metadata.gz: c30fdd9590910182706dc3d6f0747ce8c467156ede3c2ed727d8a2efb2aa7f821abd2e5465e80ddfe122ba80c03af23ab1d60c50f7a39348d797106c9c4567d7
7
- data.tar.gz: 8c877d31c11834e6e0d22b6acab729258cd87ce4a53e026c8b0ff4b92f98f90a0daa57b21811a29d3c4e2387a65b4a3935d165a4311985d40b3511f95c94f280
6
+ metadata.gz: 6c42795d64e15210922249c5b81a7bd8a4f04f6589f8266aaf73341afbd72bde016aeafa879eddb12dd0ae75b6e2b91bba7c28599495f31030031117d12be9cf
7
+ data.tar.gz: 6534173b9aa41bf180358750198c16749279723575045fffb819040509f6ca2e4f264653ad7857af152f64f7bdb16e95cbdedaab474bb62d86f9f920c5e44d83
data/CHANGELOG.md CHANGED
@@ -6,6 +6,29 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.11.0] - 2023-09-08
10
+
11
+ ### Added
12
+
13
+ - `Node#inspect` is much improved.
14
+ - `YARP::Pattern` is introduced, which can construct procs to match against nodes.
15
+ - `BlockLocalVariableNode` is introduced to take the place of the locations array on `BlockParametersNode`.
16
+ - `ParseResult#attach_comments!` is now provided to attach comments to locations in the tree.
17
+ - `MultiTargetNode` is introduced as the target of multi writes and for loops.
18
+ - `Node#comment_targets` is introduced to return the list of objects that can have attached comments.
19
+
20
+ ### Changed
21
+
22
+ - **BREAKING**: `GlobalVariable*Node#name` now returns a symbol.
23
+ - **BREAKING**: `Constant*Node#name` now returns a symbol.
24
+ - **BREAKING**: `BlockParameterNode`, `KeywordParameterNode`, `KeywordRestParameterNode`, `RestParameterNode`, `DefNode` all have their `name` methods returning symbols now.
25
+ - **BREAKING**: `ClassNode#name` and `ModuleNode#name` now return symbols.
26
+ - **BREAKING**: `Location#end_column` is now exclusive instead of inclusive.
27
+ - `Location#slice` now returns a properly encoded string.
28
+ - `CallNode#operator_loc` is now `CallNode#call_operator_loc`.
29
+ - `CallOperatorAndWriteNode` is renamed to `CallAndWriteNode` and its structure has changed.
30
+ - `CallOperatorOrWriteNode` is renamed to `CallOrWriteNode` and its structure has changed.
31
+
9
32
  ## [0.10.0] - 2023-09-01
10
33
 
11
34
  ### Added
@@ -94,7 +117,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
94
117
 
95
118
  - 🎉 Initial release! 🎉
96
119
 
97
- [unreleased]: https://github.com/ruby/yarp/compare/v0.10.0...HEAD
120
+ [unreleased]: https://github.com/ruby/yarp/compare/v0.11.0...HEAD
121
+ [0.11.0]: https://github.com/ruby/yarp/compare/v0.10.0...v0.11.0
98
122
  [0.10.0]: https://github.com/ruby/yarp/compare/v0.9.0...v0.10.0
99
123
  [0.9.0]: https://github.com/ruby/yarp/compare/v0.8.0...v0.9.0
100
124
  [0.8.0]: https://github.com/ruby/yarp/compare/v0.7.0...v0.8.0
data/CONTRIBUTING.md CHANGED
@@ -32,6 +32,13 @@ bundle exec rake compile test
32
32
  bundle exec rake compile:yarp test
33
33
  ```
34
34
 
35
+ To test the rust bindings (with caveats about setting up your Rust environment properly first):
36
+
37
+ ``` sh
38
+ bundle exec rake compile test:rust
39
+ ```
40
+
41
+
35
42
  ## Documentation
36
43
 
37
44
  We could always use more documentation! If you want to contribute documentation, feel free to open a pull request. These will get merged in as soon as possible. Documenting functions or methods is always useful, but we also need more guides and tutorials. If you have an idea for a guide or tutorial, feel free to open an issue and we can discuss it.
data/config.yml CHANGED
@@ -520,6 +520,15 @@ nodes:
520
520
 
521
521
  bar(&args)
522
522
  ^^^^^^^^^^
523
+ - name: BlockLocalVariableNode
524
+ fields:
525
+ - name: name
526
+ type: constant
527
+ comment: |
528
+ Represents a block local variable.
529
+
530
+ a { |; b| }
531
+ ^
523
532
  - name: BlockNode
524
533
  fields:
525
534
  - name: locals
@@ -540,6 +549,8 @@ nodes:
540
549
  ^^^^^^^^^^^^^^
541
550
  - name: BlockParameterNode
542
551
  fields:
552
+ - name: name
553
+ type: constant?
543
554
  - name: name_loc
544
555
  type: location?
545
556
  - name: operator_loc
@@ -556,7 +567,7 @@ nodes:
556
567
  type: node?
557
568
  kind: ParametersNode
558
569
  - name: locals
559
- type: location[]
570
+ type: node[]
560
571
  - name: opening_loc
561
572
  type: location?
562
573
  - name: closing_loc
@@ -582,11 +593,42 @@ nodes:
582
593
 
583
594
  break foo
584
595
  ^^^^^^^^^
585
- - name: CallNode
596
+ - name: CallAndWriteNode
586
597
  fields:
587
598
  - name: receiver
588
599
  type: node?
600
+ - name: call_operator_loc
601
+ type: location?
602
+ - name: message_loc
603
+ type: location?
604
+ - name: opening_loc
605
+ type: location?
606
+ - name: arguments
607
+ type: node?
608
+ kind: ArgumentsNode
609
+ - name: closing_loc
610
+ type: location?
611
+ - name: flags
612
+ type: flags
613
+ kind: CallNodeFlags
614
+ - name: read_name
615
+ type: string
616
+ - name: write_name
617
+ type: string
589
618
  - name: operator_loc
619
+ type: location
620
+ - name: value
621
+ type: node
622
+ comment: |
623
+ Represents the use of the `&&=` operator on a call.
624
+
625
+ foo.bar &&= value
626
+ ^^^^^^^^^^^^^^^^^
627
+ - name: CallNode
628
+ fields:
629
+ - name: receiver
630
+ type: node?
631
+ - name: call_operator_loc
590
632
  type: location?
591
633
  - name: message_loc
592
634
  type: location?
@@ -625,50 +667,70 @@ nodes:
625
667
 
626
668
  foo&.bar
627
669
  ^^^^^^^^
628
- - name: CallOperatorAndWriteNode
670
+ - name: CallOperatorWriteNode
629
671
  fields:
630
- - name: target
631
- type: node
632
- kind: CallNode
672
+ - name: receiver
673
+ type: node?
674
+ - name: call_operator_loc
675
+ type: location?
676
+ - name: message_loc
677
+ type: location?
678
+ - name: opening_loc
679
+ type: location?
680
+ - name: arguments
681
+ type: node?
682
+ kind: ArgumentsNode
683
+ - name: closing_loc
684
+ type: location?
685
+ - name: flags
686
+ type: flags
687
+ kind: CallNodeFlags
688
+ - name: read_name
689
+ type: string
690
+ - name: write_name
691
+ type: string
692
+ - name: operator
693
+ type: constant
633
694
  - name: operator_loc
634
695
  type: location
635
696
  - name: value
636
697
  type: node
637
698
  comment: |
638
- Represents the use of the `&&=` operator on a call.
699
+ Represents the use of an assignment operator on a call.
639
700
 
640
- foo.bar &&= value
641
- ^^^^^^^^^^^^^^^^^
642
- - name: CallOperatorOrWriteNode
701
+ foo.bar += baz
702
+ ^^^^^^^^^^^^^^
703
+ - name: CallOrWriteNode
643
704
  fields:
644
- - name: target
645
- type: node
646
- kind: CallNode
647
- - name: value
648
- type: node
705
+ - name: receiver
706
+ type: node?
707
+ - name: call_operator_loc
708
+ type: location?
709
+ - name: message_loc
710
+ type: location?
711
+ - name: opening_loc
712
+ type: location?
713
+ - name: arguments
714
+ type: node?
715
+ kind: ArgumentsNode
716
+ - name: closing_loc
717
+ type: location?
718
+ - name: flags
719
+ type: flags
720
+ kind: CallNodeFlags
721
+ - name: read_name
722
+ type: string
723
+ - name: write_name
724
+ type: string
649
725
  - name: operator_loc
650
726
  type: location
727
+ - name: value
728
+ type: node
651
729
  comment: |
652
730
  Represents the use of the `||=` operator on a call.
653
731
 
654
732
  foo.bar ||= value
655
733
  ^^^^^^^^^^^^^^^^^
656
- - name: CallOperatorWriteNode
657
- fields:
658
- - name: target
659
- type: node
660
- kind: CallNode
661
- - name: operator_loc
662
- type: location
663
- - name: value
664
- type: node
665
- - name: operator
666
- type: constant
667
- comment: |
668
- Represents the use of an assignment operator on a call.
669
-
670
- foo.bar += baz
671
- ^^^^^^^^^^^^^^
672
734
  - name: CapturePatternNode
673
735
  fields:
674
736
  - name: value
@@ -719,7 +781,7 @@ nodes:
719
781
  - name: end_keyword_loc
720
782
  type: location
721
783
  - name: name
722
- type: string
784
+ type: constant
723
785
  comment: |
724
786
  Represents a class declaration involving the `class` keyword.
725
787
 
@@ -797,7 +859,7 @@ nodes:
797
859
  - name: name_loc
798
860
  type: location
799
861
  - name: value
800
- type: node?
862
+ type: node
801
863
  - name: operator_loc
802
864
  type: location?
803
865
  comment: |
@@ -807,6 +869,8 @@ nodes:
807
869
  ^^^^^^^^^
808
870
  - name: ConstantAndWriteNode
809
871
  fields:
872
+ - name: name
873
+ type: constant
810
874
  - name: name_loc
811
875
  type: location
812
876
  - name: operator_loc
@@ -820,6 +884,8 @@ nodes:
820
884
  ^^^^^^^^^^^^^^^^
821
885
  - name: ConstantOperatorWriteNode
822
886
  fields:
887
+ - name: name
888
+ type: constant
823
889
  - name: name_loc
824
890
  type: location
825
891
  - name: operator_loc
@@ -835,6 +901,8 @@ nodes:
835
901
  ^^^^^^^^^^^^^^^
836
902
  - name: ConstantOrWriteNode
837
903
  fields:
904
+ - name: name
905
+ type: constant
838
906
  - name: name_loc
839
907
  type: location
840
908
  - name: operator_loc
@@ -937,12 +1005,18 @@ nodes:
937
1005
  ::Foo::Bar = 1
938
1006
  ^^^^^^^^^^^^^^
939
1007
  - name: ConstantReadNode
1008
+ fields:
1009
+ - name: name
1010
+ type: constant
940
1011
  comment: |
941
1012
  Represents referencing a constant.
942
1013
 
943
1014
  Foo
944
1015
  ^^^
945
1016
  - name: ConstantTargetNode
1017
+ fields:
1018
+ - name: name
1019
+ type: constant
946
1020
  comment: |
947
1021
  Represents writing to a constant in a context that doesn't have an explicit value.
948
1022
 
@@ -950,6 +1024,8 @@ nodes:
950
1024
  ^^^ ^^^
951
1025
  - name: ConstantWriteNode
952
1026
  fields:
1027
+ - name: name
1028
+ type: constant
953
1029
  - name: name_loc
954
1030
  type: location
955
1031
  - name: value
@@ -963,6 +1039,8 @@ nodes:
963
1039
  ^^^^^^^
964
1040
  - name: DefNode
965
1041
  fields:
1042
+ - name: name
1043
+ type: constant
966
1044
  - name: name_loc
967
1045
  type: location
968
1046
  - name: receiver
@@ -1166,6 +1244,8 @@ nodes:
1166
1244
  ^^^^^
1167
1245
  - name: GlobalVariableAndWriteNode
1168
1246
  fields:
1247
+ - name: name
1248
+ type: constant
1169
1249
  - name: name_loc
1170
1250
  type: location
1171
1251
  - name: operator_loc
@@ -1179,6 +1259,8 @@ nodes:
1179
1259
  ^^^^^^^^^^^^^^^^^
1180
1260
  - name: GlobalVariableOperatorWriteNode
1181
1261
  fields:
1262
+ - name: name
1263
+ type: constant
1182
1264
  - name: name_loc
1183
1265
  type: location
1184
1266
  - name: operator_loc
@@ -1194,6 +1276,8 @@ nodes:
1194
1276
  ^^^^^^^^^^^^^^^^
1195
1277
  - name: GlobalVariableOrWriteNode
1196
1278
  fields:
1279
+ - name: name
1280
+ type: constant
1197
1281
  - name: name_loc
1198
1282
  type: location
1199
1283
  - name: operator_loc
@@ -1206,12 +1290,18 @@ nodes:
1206
1290
  $target ||= value
1207
1291
  ^^^^^^^^^^^^^^^^^
1208
1292
  - name: GlobalVariableReadNode
1293
+ fields:
1294
+ - name: name
1295
+ type: constant
1209
1296
  comment: |
1210
1297
  Represents referencing a global variable.
1211
1298
 
1212
1299
  $foo
1213
1300
  ^^^^
1214
1301
  - name: GlobalVariableTargetNode
1302
+ fields:
1303
+ - name: name
1304
+ type: constant
1215
1305
  comment: |
1216
1306
  Represents writing to a global variable in a context that doesn't have an explicit value.
1217
1307
 
@@ -1219,6 +1309,8 @@ nodes:
1219
1309
  ^^^^ ^^^^
1220
1310
  - name: GlobalVariableWriteNode
1221
1311
  fields:
1312
+ - name: name
1313
+ type: constant
1222
1314
  - name: name_loc
1223
1315
  type: location
1224
1316
  - name: value
@@ -1466,6 +1558,8 @@ nodes:
1466
1558
  ^^^^
1467
1559
  - name: KeywordParameterNode
1468
1560
  fields:
1561
+ - name: name
1562
+ type: constant
1469
1563
  - name: name_loc
1470
1564
  type: location
1471
1565
  - name: value
@@ -1482,10 +1576,12 @@ nodes:
1482
1576
  end
1483
1577
  - name: KeywordRestParameterNode
1484
1578
  fields:
1485
- - name: operator_loc
1486
- type: location
1579
+ - name: name
1580
+ type: constant?
1487
1581
  - name: name_loc
1488
1582
  type: location?
1583
+ - name: operator_loc
1584
+ type: location
1489
1585
  comment: |
1490
1586
  Represents a keyword rest parameter to a method, block, or lambda definition.
1491
1587
 
@@ -1649,20 +1745,16 @@ nodes:
1649
1745
  - name: end_keyword_loc
1650
1746
  type: location
1651
1747
  - name: name
1652
- type: string
1748
+ type: constant
1653
1749
  comment: |
1654
1750
  Represents a module declaration involving the `module` keyword.
1655
1751
 
1656
1752
  module Foo end
1657
1753
  ^^^^^^^^^^^^^^
1658
- - name: MultiWriteNode
1754
+ - name: MultiTargetNode
1659
1755
  fields:
1660
1756
  - name: targets
1661
1757
  type: node[]
1662
- - name: operator_loc
1663
- type: location?
1664
- - name: value
1665
- type: node?
1666
1758
  - name: lparen_loc
1667
1759
  type: location?
1668
1760
  - name: rparen_loc
@@ -1670,6 +1762,23 @@ nodes:
1670
1762
  comment: |
1671
1763
  Represents a multi-target expression.
1672
1764
 
1765
+ a, b, c = 1, 2, 3
1766
+ ^^^^^^^
1767
+ - name: MultiWriteNode
1768
+ fields:
1769
+ - name: targets
1770
+ type: node[]
1771
+ - name: lparen_loc
1772
+ type: location?
1773
+ - name: rparen_loc
1774
+ type: location?
1775
+ - name: operator_loc
1776
+ type: location
1777
+ - name: value
1778
+ type: node
1779
+ comment: |
1780
+ Represents a write to a multi-target expression.
1781
+
1673
1782
  a, b, c = 1, 2, 3
1674
1783
  ^^^^^^^^^^^^^^^^^
1675
1784
  - name: NextNode
@@ -1965,10 +2074,12 @@ nodes:
1965
2074
  `ex` is in the `exception` field.
1966
2075
  - name: RestParameterNode
1967
2076
  fields:
1968
- - name: operator_loc
1969
- type: location
2077
+ - name: name
2078
+ type: constant?
1970
2079
  - name: name_loc
1971
2080
  type: location?
2081
+ - name: operator_loc
2082
+ type: location
1972
2083
  comment: |
1973
2084
  Represents a rest parameter to a method, block, or lambda definition.
1974
2085
 
@@ -51,7 +51,6 @@ The available values for `type` are:
51
51
  * `constant[]` - A child node that is an array of constants. This is a `yp_constant_id_list_t` in C.
52
52
  * `location` - A child node that is a location. This is a `yp_location_t` in C.
53
53
  * `location?` - A child node that is a location that is optionally present. This is a `yp_location_t` in C, but if the value is not present then the `start` and `end` fields will be `NULL`.
54
- * `location[]` - A child node that is an array of locations. This is a `yp_location_list_t` in C.
55
54
  * `uint32` - A child node that is a 32-bit unsigned integer. This is a `uint32_t` in C.
56
55
 
57
56
  If the type is `node` or `node?` then the value also accepts an optional `kind` key (a string). This key is expected to match to the name of another node type within `config.yml`. This changes a couple of places where code is templated out to use the more specific struct name instead of the generic `yp_node_t`. For example, with `kind: StatementsNode` the `yp_node_t *` in C becomes a `yp_statements_node_t *`.
data/docs/mapping.md CHANGED
@@ -10,108 +10,108 @@ The following table shows how the various CRuby nodes are mapped to YARP nodes.
10
10
  | --- | --- |
11
11
  | `NODE_SCOPE` | |
12
12
  | `NODE_BLOCK` | |
13
- | `NODE_IF` | `YP_NODE_IF_NODE` |
14
- | `NODE_UNLESS` | `YP_NODE_UNLESS_NODE` |
15
- | `NODE_CASE` | `YP_NODE_CASE_NODE` |
16
- | `NODE_CASE2` | `YP_NODE_CASE_NODE` (with a null predicate) |
13
+ | `NODE_IF` | `YP_IF_NODE` |
14
+ | `NODE_UNLESS` | `YP_UNLESS_NODE` |
15
+ | `NODE_CASE` | `YP_CASE_NODE` |
16
+ | `NODE_CASE2` | `YP_CASE_NODE` (with a null predicate) |
17
17
  | `NODE_CASE3` | |
18
- | `NODE_WHEN` | `YP_NODE_WHEN_NODE` |
19
- | `NODE_IN` | `YP_NODE_IN_NODE` |
20
- | `NODE_WHILE` | `YP_NODE_WHILE_NODE` |
21
- | `NODE_UNTIL` | `YP_NODE_UNTIL_NODE` |
22
- | `NODE_ITER` | `YP_NODE_CALL_NODE` (with a non-null block) |
23
- | `NODE_FOR` | `YP_NODE_FOR_NODE` |
24
- | `NODE_FOR_MASGN` | `YP_NODE_FOR_NODE` (with a multi-write node as the index) |
25
- | `NODE_BREAK` | `YP_NODE_BREAK_NODE` |
26
- | `NODE_NEXT` | `YP_NODE_NEXT_NODE` |
27
- | `NODE_REDO` | `YP_NODE_REDO_NODE` |
28
- | `NODE_RETRY` | `YP_NODE_RETRY_NODE` |
29
- | `NODE_BEGIN` | `YP_NODE_BEGIN_NODE` |
30
- | `NODE_RESCUE` | `YP_NODE_RESCUE_NODE` |
18
+ | `NODE_WHEN` | `YP_WHEN_NODE` |
19
+ | `NODE_IN` | `YP_IN_NODE` |
20
+ | `NODE_WHILE` | `YP_WHILE_NODE` |
21
+ | `NODE_UNTIL` | `YP_UNTIL_NODE` |
22
+ | `NODE_ITER` | `YP_CALL_NODE` (with a non-null block) |
23
+ | `NODE_FOR` | `YP_FOR_NODE` |
24
+ | `NODE_FOR_MASGN` | `YP_FOR_NODE` (with a multi-write node as the index) |
25
+ | `NODE_BREAK` | `YP_BREAK_NODE` |
26
+ | `NODE_NEXT` | `YP_NEXT_NODE` |
27
+ | `NODE_REDO` | `YP_REDO_NODE` |
28
+ | `NODE_RETRY` | `YP_RETRY_NODE` |
29
+ | `NODE_BEGIN` | `YP_BEGIN_NODE` |
30
+ | `NODE_RESCUE` | `YP_RESCUE_NODE` |
31
31
  | `NODE_RESBODY` | |
32
- | `NODE_ENSURE` | `YP_NODE_ENSURE_NODE` |
33
- | `NODE_AND` | `YP_NODE_AND_NODE` |
34
- | `NODE_OR` | `YP_NODE_OR_NODE` |
35
- | `NODE_MASGN` | `YP_NODE_MULTI_WRITE_NODE` |
36
- | `NODE_LASGN` | `YP_NODE_LOCAL_VARIABLE_WRITE_NODE` |
37
- | `NODE_DASGN` | `YP_NODE_LOCAL_VARIABLE_WRITE_NODE` |
38
- | `NODE_GASGN` | `YP_NODE_GLOBAL_VARIABLE_WRITE_NODE` |
39
- | `NODE_IASGN` | `YP_NODE_INSTANCE_VARIABLE_WRITE_NODE` |
40
- | `NODE_CDECL` | `YP_NODE_CONSTANT_PATH_WRITE_NODE` |
41
- | `NODE_CVASGN` | `YP_NODE_CLASS_VARIABLE_WRITE_NODE` |
32
+ | `NODE_ENSURE` | `YP_ENSURE_NODE` |
33
+ | `NODE_AND` | `YP_AND_NODE` |
34
+ | `NODE_OR` | `YP_OR_NODE` |
35
+ | `NODE_MASGN` | `YP_MULTI_WRITE_NODE` |
36
+ | `NODE_LASGN` | `YP_LOCAL_VARIABLE_WRITE_NODE` |
37
+ | `NODE_DASGN` | `YP_LOCAL_VARIABLE_WRITE_NODE` |
38
+ | `NODE_GASGN` | `YP_GLOBAL_VARIABLE_WRITE_NODE` |
39
+ | `NODE_IASGN` | `YP_INSTANCE_VARIABLE_WRITE_NODE` |
40
+ | `NODE_CDECL` | `YP_CONSTANT_PATH_WRITE_NODE` |
41
+ | `NODE_CVASGN` | `YP_CLASS_VARIABLE_WRITE_NODE` |
42
42
  | `NODE_OP_ASGN1` | |
43
43
  | `NODE_OP_ASGN2` | |
44
- | `NODE_OP_ASGN_AND` | `YP_NODE_OPERATOR_AND_ASSIGNMENT_NODE` |
45
- | `NODE_OP_ASGN_OR` | `YP_NODE_OPERATOR_OR_ASSIGNMENT_NODE` |
44
+ | `NODE_OP_ASGN_AND` | `YP_OPERATOR_AND_ASSIGNMENT_NODE` |
45
+ | `NODE_OP_ASGN_OR` | `YP_OPERATOR_OR_ASSIGNMENT_NODE` |
46
46
  | `NODE_OP_CDECL` | |
47
- | `NODE_CALL` | `YP_NODE_CALL_NODE` |
48
- | `NODE_OPCALL` | `YP_NODE_CALL_NODE` (with an operator as the method) |
49
- | `NODE_FCALL` | `YP_NODE_CALL_NODE` (with a null receiver and parentheses) |
50
- | `NODE_VCALL` | `YP_NODE_CALL_NODE` (with a null receiver and parentheses or arguments) |
51
- | `NODE_QCALL` | `YP_NODE_CALL_NODE` (with a &. operator) |
52
- | `NODE_SUPER` | `YP_NODE_SUPER_NODE` |
53
- | `NODE_ZSUPER` | `YP_NODE_FORWARDING_SUPER_NODE` |
54
- | `NODE_LIST` | `YP_NODE_ARRAY_NODE` |
55
- | `NODE_ZLIST` | `YP_NODE_ARRAY_NODE` (with no child elements) |
56
- | `NODE_VALUES` | `YP_NODE_ARGUMENTS_NODE` |
57
- | `NODE_HASH` | `YP_NODE_HASH_NODE` |
58
- | `NODE_RETURN` | `YP_NODE_RETURN_NODE` |
59
- | `NODE_YIELD` | `YP_NODE_YIELD_NODE` |
60
- | `NODE_LVAR` | `YP_NODE_LOCAL_VARIABLE_READ_NODE` |
61
- | `NODE_DVAR` | `YP_NODE_LOCAL_VARIABLE_READ_NODE` |
62
- | `NODE_GVAR` | `YP_NODE_GLOBAL_VARIABLE_READ_NODE` |
63
- | `NODE_IVAR` | `YP_NODE_INSTANCE_VARIABLE_READ_NODE` |
64
- | `NODE_CONST` | `YP_NODE_CONSTANT_PATH_READ_NODE` |
65
- | `NODE_CVAR` | `YP_NODE_CLASS_VARIABLE_READ_NODE` |
66
- | `NODE_NTH_REF` | `YP_NODE_NUMBERED_REFERENCE_READ_NODE` |
67
- | `NODE_BACK_REF` | `YP_NODE_BACK_REFERENCE_READ_NODE` |
47
+ | `NODE_CALL` | `YP_CALL_NODE` |
48
+ | `NODE_OPCALL` | `YP_CALL_NODE` (with an operator as the method) |
49
+ | `NODE_FCALL` | `YP_CALL_NODE` (with a null receiver and parentheses) |
50
+ | `NODE_VCALL` | `YP_CALL_NODE` (with a null receiver and parentheses or arguments) |
51
+ | `NODE_QCALL` | `YP_CALL_NODE` (with a &. operator) |
52
+ | `NODE_SUPER` | `YP_SUPER_NODE` |
53
+ | `NODE_ZSUPER` | `YP_FORWARDING_SUPER_NODE` |
54
+ | `NODE_LIST` | `YP_ARRAY_NODE` |
55
+ | `NODE_ZLIST` | `YP_ARRAY_NODE` (with no child elements) |
56
+ | `NODE_VALUES` | `YP_ARGUMENTS_NODE` |
57
+ | `NODE_HASH` | `YP_HASH_NODE` |
58
+ | `NODE_RETURN` | `YP_RETURN_NODE` |
59
+ | `NODE_YIELD` | `YP_YIELD_NODE` |
60
+ | `NODE_LVAR` | `YP_LOCAL_VARIABLE_READ_NODE` |
61
+ | `NODE_DVAR` | `YP_LOCAL_VARIABLE_READ_NODE` |
62
+ | `NODE_GVAR` | `YP_GLOBAL_VARIABLE_READ_NODE` |
63
+ | `NODE_IVAR` | `YP_INSTANCE_VARIABLE_READ_NODE` |
64
+ | `NODE_CONST` | `YP_CONSTANT_PATH_READ_NODE` |
65
+ | `NODE_CVAR` | `YP_CLASS_VARIABLE_READ_NODE` |
66
+ | `NODE_NTH_REF` | `YP_NUMBERED_REFERENCE_READ_NODE` |
67
+ | `NODE_BACK_REF` | `YP_BACK_REFERENCE_READ_NODE` |
68
68
  | `NODE_MATCH` | |
69
- | `NODE_MATCH2` | `YP_NODE_CALL_NODE` (with regular expression as receiver) |
70
- | `NODE_MATCH3` | `YP_NODE_CALL_NODE` (with regular expression as only argument) |
69
+ | `NODE_MATCH2` | `YP_CALL_NODE` (with regular expression as receiver) |
70
+ | `NODE_MATCH3` | `YP_CALL_NODE` (with regular expression as only argument) |
71
71
  | `NODE_LIT` | |
72
- | `NODE_STR` | `YP_NODE_STRING_NODE` |
73
- | `NODE_DSTR` | `YP_NODE_INTERPOLATED_STRING_NODE` |
74
- | `NODE_XSTR` | `YP_NODE_X_STRING_NODE` |
75
- | `NODE_DXSTR` | `YP_NODE_INTERPOLATED_X_STRING_NODE` |
76
- | `NODE_EVSTR` | `YP_NODE_STRING_INTERPOLATED_NODE` |
77
- | `NODE_DREGX` | `YP_NODE_INTERPOLATED_REGULAR_EXPRESSION_NODE` |
72
+ | `NODE_STR` | `YP_STRING_NODE` |
73
+ | `NODE_DSTR` | `YP_INTERPOLATED_STRING_NODE` |
74
+ | `NODE_XSTR` | `YP_X_STRING_NODE` |
75
+ | `NODE_DXSTR` | `YP_INTERPOLATED_X_STRING_NODE` |
76
+ | `NODE_EVSTR` | `YP_STRING_INTERPOLATED_NODE` |
77
+ | `NODE_DREGX` | `YP_INTERPOLATED_REGULAR_EXPRESSION_NODE` |
78
78
  | `NODE_ONCE` | |
79
- | `NODE_ARGS` | `YP_NODE_PARAMETERS_NODE` |
79
+ | `NODE_ARGS` | `YP_PARAMETERS_NODE` |
80
80
  | `NODE_ARGS_AUX` | |
81
- | `NODE_OPT_ARG` | `YP_NODE_OPTIONAL_PARAMETER_NODE` |
82
- | `NODE_KW_ARG` | `YP_NODE_KEYWORD_PARAMETER_NODE` |
83
- | `NODE_POSTARG` | `YP_NODE_REQUIRED_PARAMETER_NODE` |
81
+ | `NODE_OPT_ARG` | `YP_OPTIONAL_PARAMETER_NODE` |
82
+ | `NODE_KW_ARG` | `YP_KEYWORD_PARAMETER_NODE` |
83
+ | `NODE_POSTARG` | `YP_REQUIRED_PARAMETER_NODE` |
84
84
  | `NODE_ARGSCAT` | |
85
85
  | `NODE_ARGSPUSH` | |
86
- | `NODE_SPLAT` | `YP_NODE_SPLAT_NODE` |
87
- | `NODE_BLOCK_PASS` | `YP_NODE_BLOCK_ARGUMENT_NODE` |
88
- | `NODE_DEFN` | `YP_NODE_DEF_NODE` (with a null receiver) |
89
- | `NODE_DEFS` | `YP_NODE_DEF_NODE` (with a non-null receiver) |
90
- | `NODE_ALIAS` | `YP_NODE_ALIAS_NODE` |
91
- | `NODE_VALIAS` | `YP_NODE_ALIAS_NODE` (with a global variable first argument) |
92
- | `NODE_UNDEF` | `YP_NODE_UNDEF_NODE` |
93
- | `NODE_CLASS` | `YP_NODE_CLASS_NODE` |
94
- | `NODE_MODULE` | `YP_NODE_MODULE_NODE` |
95
- | `NODE_SCLASS` | `YP_NODE_S_CLASS_NODE` |
96
- | `NODE_COLON2` | `YP_NODE_CONSTANT_PATH_NODE` |
97
- | `NODE_COLON3` | `YP_NODE_CONSTANT_PATH_NODE` (with a null receiver) |
98
- | `NODE_DOT2` | `YP_NODE_RANGE_NODE` (with a .. operator) |
99
- | `NODE_DOT3` | `YP_NODE_RANGE_NODE` (with a ... operator) |
100
- | `NODE_FLIP2` | `YP_NODE_RANGE_NODE` (with a .. operator) |
101
- | `NODE_FLIP3` | `YP_NODE_RANGE_NODE` (with a ... operator) |
102
- | `NODE_SELF` | `YP_NODE_SELF_NODE` |
103
- | `NODE_NIL` | `YP_NODE_NIL_NODE` |
104
- | `NODE_TRUE` | `YP_NODE_TRUE_NODE` |
105
- | `NODE_FALSE` | `YP_NODE_FALSE_NODE` |
86
+ | `NODE_SPLAT` | `YP_SPLAT_NODE` |
87
+ | `NODE_BLOCK_PASS` | `YP_BLOCK_ARGUMENT_NODE` |
88
+ | `NODE_DEFN` | `YP_DEF_NODE` (with a null receiver) |
89
+ | `NODE_DEFS` | `YP_DEF_NODE` (with a non-null receiver) |
90
+ | `NODE_ALIAS` | `YP_ALIAS_NODE` |
91
+ | `NODE_VALIAS` | `YP_ALIAS_NODE` (with a global variable first argument) |
92
+ | `NODE_UNDEF` | `YP_UNDEF_NODE` |
93
+ | `NODE_CLASS` | `YP_CLASS_NODE` |
94
+ | `NODE_MODULE` | `YP_MODULE_NODE` |
95
+ | `NODE_SCLASS` | `YP_S_CLASS_NODE` |
96
+ | `NODE_COLON2` | `YP_CONSTANT_PATH_NODE` |
97
+ | `NODE_COLON3` | `YP_CONSTANT_PATH_NODE` (with a null receiver) |
98
+ | `NODE_DOT2` | `YP_RANGE_NODE` (with a .. operator) |
99
+ | `NODE_DOT3` | `YP_RANGE_NODE` (with a ... operator) |
100
+ | `NODE_FLIP2` | `YP_RANGE_NODE` (with a .. operator) |
101
+ | `NODE_FLIP3` | `YP_RANGE_NODE` (with a ... operator) |
102
+ | `NODE_SELF` | `YP_SELF_NODE` |
103
+ | `NODE_NIL` | `YP_NIL_NODE` |
104
+ | `NODE_TRUE` | `YP_TRUE_NODE` |
105
+ | `NODE_FALSE` | `YP_FALSE_NODE` |
106
106
  | `NODE_ERRINFO` | |
107
- | `NODE_DEFINED` | `YP_NODE_DEFINED_NODE` |
108
- | `NODE_POSTEXE` | `YP_NODE_POST_EXECUTION_NODE` |
109
- | `NODE_DSYM` | `YP_NODE_INTERPOLATED_SYMBOL_NODE` |
110
- | `NODE_ATTRASGN` | `YP_NODE_CALL_NODE` (with a message that ends with =) |
111
- | `NODE_LAMBDA` | `YP_NODE_LAMBDA_NODE` |
112
- | `NODE_ARYPTN` | `YP_NODE_ARRAY_PATTERN_NODE` |
113
- | `NODE_HSHPTN` | `YP_NODE_HASH_PATTERN_NODE` |
114
- | `NODE_FNDPTN` | `YP_NODE_FIND_PATTERN_NODE` |
115
- | `NODE_ERROR` | `YP_NODE_MISSING_NODE` |
107
+ | `NODE_DEFINED` | `YP_DEFINED_NODE` |
108
+ | `NODE_POSTEXE` | `YP_POST_EXECUTION_NODE` |
109
+ | `NODE_DSYM` | `YP_INTERPOLATED_SYMBOL_NODE` |
110
+ | `NODE_ATTRASGN` | `YP_CALL_NODE` (with a message that ends with =) |
111
+ | `NODE_LAMBDA` | `YP_LAMBDA_NODE` |
112
+ | `NODE_ARYPTN` | `YP_ARRAY_PATTERN_NODE` |
113
+ | `NODE_HSHPTN` | `YP_HASH_PATTERN_NODE` |
114
+ | `NODE_FNDPTN` | `YP_FIND_PATTERN_NODE` |
115
+ | `NODE_ERROR` | `YP_MISSING_NODE` |
116
116
  | `NODE_LAST` | |
117
117
  ```