prism 0.13.0 → 0.14.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/lib/prism/node.rb CHANGED
@@ -130,6 +130,16 @@ module Prism
130
130
  def type
131
131
  :alias_global_variable_node
132
132
  end
133
+
134
+ # Similar to #type, this method returns a symbol that you can use for
135
+ # splitting on the type of the node without having to do a long === chain.
136
+ # Note that like #type, it will still be slower than using == for a single
137
+ # class, but should be faster in a case statement or an array comparison.
138
+ #
139
+ # def self.type: () -> Symbol
140
+ def self.type
141
+ :alias_global_variable_node
142
+ end
133
143
  end
134
144
 
135
145
  # Represents the use of the `alias` keyword to alias a method.
@@ -224,6 +234,16 @@ module Prism
224
234
  def type
225
235
  :alias_method_node
226
236
  end
237
+
238
+ # Similar to #type, this method returns a symbol that you can use for
239
+ # splitting on the type of the node without having to do a long === chain.
240
+ # Note that like #type, it will still be slower than using == for a single
241
+ # class, but should be faster in a case statement or an array comparison.
242
+ #
243
+ # def self.type: () -> Symbol
244
+ def self.type
245
+ :alias_method_node
246
+ end
227
247
  end
228
248
 
229
249
  # Represents an alternation pattern in pattern matching.
@@ -318,6 +338,16 @@ module Prism
318
338
  def type
319
339
  :alternation_pattern_node
320
340
  end
341
+
342
+ # Similar to #type, this method returns a symbol that you can use for
343
+ # splitting on the type of the node without having to do a long === chain.
344
+ # Note that like #type, it will still be slower than using == for a single
345
+ # class, but should be faster in a case statement or an array comparison.
346
+ #
347
+ # def self.type: () -> Symbol
348
+ def self.type
349
+ :alternation_pattern_node
350
+ end
321
351
  end
322
352
 
323
353
  # Represents the use of the `&&` operator or the `and` keyword.
@@ -412,6 +442,16 @@ module Prism
412
442
  def type
413
443
  :and_node
414
444
  end
445
+
446
+ # Similar to #type, this method returns a symbol that you can use for
447
+ # splitting on the type of the node without having to do a long === chain.
448
+ # Note that like #type, it will still be slower than using == for a single
449
+ # class, but should be faster in a case statement or an array comparison.
450
+ #
451
+ # def self.type: () -> Symbol
452
+ def self.type
453
+ :and_node
454
+ end
415
455
  end
416
456
 
417
457
  # Represents a set of arguments to a method or a keyword.
@@ -487,6 +527,16 @@ module Prism
487
527
  def type
488
528
  :arguments_node
489
529
  end
530
+
531
+ # Similar to #type, this method returns a symbol that you can use for
532
+ # splitting on the type of the node without having to do a long === chain.
533
+ # Note that like #type, it will still be slower than using == for a single
534
+ # class, but should be faster in a case statement or an array comparison.
535
+ #
536
+ # def self.type: () -> Symbol
537
+ def self.type
538
+ :arguments_node
539
+ end
490
540
  end
491
541
 
492
542
  # Represents an array literal. This can be a regular array using brackets or
@@ -585,6 +635,16 @@ module Prism
585
635
  def type
586
636
  :array_node
587
637
  end
638
+
639
+ # Similar to #type, this method returns a symbol that you can use for
640
+ # splitting on the type of the node without having to do a long === chain.
641
+ # Note that like #type, it will still be slower than using == for a single
642
+ # class, but should be faster in a case statement or an array comparison.
643
+ #
644
+ # def self.type: () -> Symbol
645
+ def self.type
646
+ :array_node
647
+ end
588
648
  end
589
649
 
590
650
  # Represents an array pattern in pattern matching.
@@ -727,6 +787,16 @@ module Prism
727
787
  def type
728
788
  :array_pattern_node
729
789
  end
790
+
791
+ # Similar to #type, this method returns a symbol that you can use for
792
+ # splitting on the type of the node without having to do a long === chain.
793
+ # Note that like #type, it will still be slower than using == for a single
794
+ # class, but should be faster in a case statement or an array comparison.
795
+ #
796
+ # def self.type: () -> Symbol
797
+ def self.type
798
+ :array_pattern_node
799
+ end
730
800
  end
731
801
 
732
802
  # Represents a hash key/value pair.
@@ -828,6 +898,16 @@ module Prism
828
898
  def type
829
899
  :assoc_node
830
900
  end
901
+
902
+ # Similar to #type, this method returns a symbol that you can use for
903
+ # splitting on the type of the node without having to do a long === chain.
904
+ # Note that like #type, it will still be slower than using == for a single
905
+ # class, but should be faster in a case statement or an array comparison.
906
+ #
907
+ # def self.type: () -> Symbol
908
+ def self.type
909
+ :assoc_node
910
+ end
831
911
  end
832
912
 
833
913
  # Represents a splat in a hash literal.
@@ -921,6 +1001,16 @@ module Prism
921
1001
  def type
922
1002
  :assoc_splat_node
923
1003
  end
1004
+
1005
+ # Similar to #type, this method returns a symbol that you can use for
1006
+ # splitting on the type of the node without having to do a long === chain.
1007
+ # Note that like #type, it will still be slower than using == for a single
1008
+ # class, but should be faster in a case statement or an array comparison.
1009
+ #
1010
+ # def self.type: () -> Symbol
1011
+ def self.type
1012
+ :assoc_splat_node
1013
+ end
924
1014
  end
925
1015
 
926
1016
  # Represents reading a reference to a field in the previous match.
@@ -990,6 +1080,16 @@ module Prism
990
1080
  def type
991
1081
  :back_reference_read_node
992
1082
  end
1083
+
1084
+ # Similar to #type, this method returns a symbol that you can use for
1085
+ # splitting on the type of the node without having to do a long === chain.
1086
+ # Note that like #type, it will still be slower than using == for a single
1087
+ # class, but should be faster in a case statement or an array comparison.
1088
+ #
1089
+ # def self.type: () -> Symbol
1090
+ def self.type
1091
+ :back_reference_read_node
1092
+ end
993
1093
  end
994
1094
 
995
1095
  # Represents a begin statement.
@@ -1136,6 +1236,16 @@ module Prism
1136
1236
  def type
1137
1237
  :begin_node
1138
1238
  end
1239
+
1240
+ # Similar to #type, this method returns a symbol that you can use for
1241
+ # splitting on the type of the node without having to do a long === chain.
1242
+ # Note that like #type, it will still be slower than using == for a single
1243
+ # class, but should be faster in a case statement or an array comparison.
1244
+ #
1245
+ # def self.type: () -> Symbol
1246
+ def self.type
1247
+ :begin_node
1248
+ end
1139
1249
  end
1140
1250
 
1141
1251
  # Represents block method arguments.
@@ -1229,6 +1339,16 @@ module Prism
1229
1339
  def type
1230
1340
  :block_argument_node
1231
1341
  end
1342
+
1343
+ # Similar to #type, this method returns a symbol that you can use for
1344
+ # splitting on the type of the node without having to do a long === chain.
1345
+ # Note that like #type, it will still be slower than using == for a single
1346
+ # class, but should be faster in a case statement or an array comparison.
1347
+ #
1348
+ # def self.type: () -> Symbol
1349
+ def self.type
1350
+ :block_argument_node
1351
+ end
1232
1352
  end
1233
1353
 
1234
1354
  # Represents a block local variable.
@@ -1304,6 +1424,16 @@ module Prism
1304
1424
  def type
1305
1425
  :block_local_variable_node
1306
1426
  end
1427
+
1428
+ # Similar to #type, this method returns a symbol that you can use for
1429
+ # splitting on the type of the node without having to do a long === chain.
1430
+ # Note that like #type, it will still be slower than using == for a single
1431
+ # class, but should be faster in a case statement or an array comparison.
1432
+ #
1433
+ # def self.type: () -> Symbol
1434
+ def self.type
1435
+ :block_local_variable_node
1436
+ end
1307
1437
  end
1308
1438
 
1309
1439
  # Represents a block of ruby code.
@@ -1426,6 +1556,16 @@ module Prism
1426
1556
  def type
1427
1557
  :block_node
1428
1558
  end
1559
+
1560
+ # Similar to #type, this method returns a symbol that you can use for
1561
+ # splitting on the type of the node without having to do a long === chain.
1562
+ # Note that like #type, it will still be slower than using == for a single
1563
+ # class, but should be faster in a case statement or an array comparison.
1564
+ #
1565
+ # def self.type: () -> Symbol
1566
+ def self.type
1567
+ :block_node
1568
+ end
1429
1569
  end
1430
1570
 
1431
1571
  # Represents a block parameter to a method, block, or lambda definition.
@@ -1519,6 +1659,16 @@ module Prism
1519
1659
  def type
1520
1660
  :block_parameter_node
1521
1661
  end
1662
+
1663
+ # Similar to #type, this method returns a symbol that you can use for
1664
+ # splitting on the type of the node without having to do a long === chain.
1665
+ # Note that like #type, it will still be slower than using == for a single
1666
+ # class, but should be faster in a case statement or an array comparison.
1667
+ #
1668
+ # def self.type: () -> Symbol
1669
+ def self.type
1670
+ :block_parameter_node
1671
+ end
1522
1672
  end
1523
1673
 
1524
1674
  # Represents a block's parameters declaration.
@@ -1634,6 +1784,16 @@ module Prism
1634
1784
  def type
1635
1785
  :block_parameters_node
1636
1786
  end
1787
+
1788
+ # Similar to #type, this method returns a symbol that you can use for
1789
+ # splitting on the type of the node without having to do a long === chain.
1790
+ # Note that like #type, it will still be slower than using == for a single
1791
+ # class, but should be faster in a case statement or an array comparison.
1792
+ #
1793
+ # def self.type: () -> Symbol
1794
+ def self.type
1795
+ :block_parameters_node
1796
+ end
1637
1797
  end
1638
1798
 
1639
1799
  # Represents the use of the `break` keyword.
@@ -1727,6 +1887,16 @@ module Prism
1727
1887
  def type
1728
1888
  :break_node
1729
1889
  end
1890
+
1891
+ # Similar to #type, this method returns a symbol that you can use for
1892
+ # splitting on the type of the node without having to do a long === chain.
1893
+ # Note that like #type, it will still be slower than using == for a single
1894
+ # class, but should be faster in a case statement or an array comparison.
1895
+ #
1896
+ # def self.type: () -> Symbol
1897
+ def self.type
1898
+ :break_node
1899
+ end
1730
1900
  end
1731
1901
 
1732
1902
  # Represents the use of the `&&=` operator on a call.
@@ -1755,10 +1925,10 @@ module Prism
1755
1925
  # attr_reader flags: Integer
1756
1926
  private attr_reader :flags
1757
1927
 
1758
- # attr_reader read_name: String
1928
+ # attr_reader read_name: Symbol
1759
1929
  attr_reader :read_name
1760
1930
 
1761
- # attr_reader write_name: String
1931
+ # attr_reader write_name: Symbol
1762
1932
  attr_reader :write_name
1763
1933
 
1764
1934
  # attr_reader operator_loc: Location
@@ -1767,7 +1937,7 @@ module Prism
1767
1937
  # attr_reader value: Node
1768
1938
  attr_reader :value
1769
1939
 
1770
- # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: String, write_name: String, operator_loc: Location, value: Node, location: Location) -> void
1940
+ # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void
1771
1941
  def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location)
1772
1942
  @receiver = receiver
1773
1943
  @call_operator_loc = call_operator_loc
@@ -1913,6 +2083,16 @@ module Prism
1913
2083
  def type
1914
2084
  :call_and_write_node
1915
2085
  end
2086
+
2087
+ # Similar to #type, this method returns a symbol that you can use for
2088
+ # splitting on the type of the node without having to do a long === chain.
2089
+ # Note that like #type, it will still be slower than using == for a single
2090
+ # class, but should be faster in a case statement or an array comparison.
2091
+ #
2092
+ # def self.type: () -> Symbol
2093
+ def self.type
2094
+ :call_and_write_node
2095
+ end
1916
2096
  end
1917
2097
 
1918
2098
  # Represents a method call, in all of the various forms that can take.
@@ -1959,10 +2139,10 @@ module Prism
1959
2139
  # attr_reader flags: Integer
1960
2140
  private attr_reader :flags
1961
2141
 
1962
- # attr_reader name: String
2142
+ # attr_reader name: Symbol
1963
2143
  attr_reader :name
1964
2144
 
1965
- # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, flags: Integer, name: String, location: Location) -> void
2145
+ # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, flags: Integer, name: Symbol, location: Location) -> void
1966
2146
  def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, block, flags, name, location)
1967
2147
  @receiver = receiver
1968
2148
  @call_operator_loc = call_operator_loc
@@ -2101,6 +2281,16 @@ module Prism
2101
2281
  def type
2102
2282
  :call_node
2103
2283
  end
2284
+
2285
+ # Similar to #type, this method returns a symbol that you can use for
2286
+ # splitting on the type of the node without having to do a long === chain.
2287
+ # Note that like #type, it will still be slower than using == for a single
2288
+ # class, but should be faster in a case statement or an array comparison.
2289
+ #
2290
+ # def self.type: () -> Symbol
2291
+ def self.type
2292
+ :call_node
2293
+ end
2104
2294
  end
2105
2295
 
2106
2296
  # Represents the use of an assignment operator on a call.
@@ -2129,10 +2319,10 @@ module Prism
2129
2319
  # attr_reader flags: Integer
2130
2320
  private attr_reader :flags
2131
2321
 
2132
- # attr_reader read_name: String
2322
+ # attr_reader read_name: Symbol
2133
2323
  attr_reader :read_name
2134
2324
 
2135
- # attr_reader write_name: String
2325
+ # attr_reader write_name: Symbol
2136
2326
  attr_reader :write_name
2137
2327
 
2138
2328
  # attr_reader operator: Symbol
@@ -2144,7 +2334,7 @@ module Prism
2144
2334
  # attr_reader value: Node
2145
2335
  attr_reader :value
2146
2336
 
2147
- # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: String, write_name: String, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void
2337
+ # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void
2148
2338
  def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator, operator_loc, value, location)
2149
2339
  @receiver = receiver
2150
2340
  @call_operator_loc = call_operator_loc
@@ -2288,6 +2478,16 @@ module Prism
2288
2478
  def type
2289
2479
  :call_operator_write_node
2290
2480
  end
2481
+
2482
+ # Similar to #type, this method returns a symbol that you can use for
2483
+ # splitting on the type of the node without having to do a long === chain.
2484
+ # Note that like #type, it will still be slower than using == for a single
2485
+ # class, but should be faster in a case statement or an array comparison.
2486
+ #
2487
+ # def self.type: () -> Symbol
2488
+ def self.type
2489
+ :call_operator_write_node
2490
+ end
2291
2491
  end
2292
2492
 
2293
2493
  # Represents the use of the `||=` operator on a call.
@@ -2316,10 +2516,10 @@ module Prism
2316
2516
  # attr_reader flags: Integer
2317
2517
  private attr_reader :flags
2318
2518
 
2319
- # attr_reader read_name: String
2519
+ # attr_reader read_name: Symbol
2320
2520
  attr_reader :read_name
2321
2521
 
2322
- # attr_reader write_name: String
2522
+ # attr_reader write_name: Symbol
2323
2523
  attr_reader :write_name
2324
2524
 
2325
2525
  # attr_reader operator_loc: Location
@@ -2328,7 +2528,7 @@ module Prism
2328
2528
  # attr_reader value: Node
2329
2529
  attr_reader :value
2330
2530
 
2331
- # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: String, write_name: String, operator_loc: Location, value: Node, location: Location) -> void
2531
+ # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void
2332
2532
  def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location)
2333
2533
  @receiver = receiver
2334
2534
  @call_operator_loc = call_operator_loc
@@ -2474,6 +2674,16 @@ module Prism
2474
2674
  def type
2475
2675
  :call_or_write_node
2476
2676
  end
2677
+
2678
+ # Similar to #type, this method returns a symbol that you can use for
2679
+ # splitting on the type of the node without having to do a long === chain.
2680
+ # Note that like #type, it will still be slower than using == for a single
2681
+ # class, but should be faster in a case statement or an array comparison.
2682
+ #
2683
+ # def self.type: () -> Symbol
2684
+ def self.type
2685
+ :call_or_write_node
2686
+ end
2477
2687
  end
2478
2688
 
2479
2689
  # Represents assigning to a local variable in pattern matching.
@@ -2568,6 +2778,16 @@ module Prism
2568
2778
  def type
2569
2779
  :capture_pattern_node
2570
2780
  end
2781
+
2782
+ # Similar to #type, this method returns a symbol that you can use for
2783
+ # splitting on the type of the node without having to do a long === chain.
2784
+ # Note that like #type, it will still be slower than using == for a single
2785
+ # class, but should be faster in a case statement or an array comparison.
2786
+ #
2787
+ # def self.type: () -> Symbol
2788
+ def self.type
2789
+ :capture_pattern_node
2790
+ end
2571
2791
  end
2572
2792
 
2573
2793
  # Represents the use of a case statement.
@@ -2693,6 +2913,16 @@ module Prism
2693
2913
  def type
2694
2914
  :case_node
2695
2915
  end
2916
+
2917
+ # Similar to #type, this method returns a symbol that you can use for
2918
+ # splitting on the type of the node without having to do a long === chain.
2919
+ # Note that like #type, it will still be slower than using == for a single
2920
+ # class, but should be faster in a case statement or an array comparison.
2921
+ #
2922
+ # def self.type: () -> Symbol
2923
+ def self.type
2924
+ :case_node
2925
+ end
2696
2926
  end
2697
2927
 
2698
2928
  # Represents a class declaration involving the `class` keyword.
@@ -2840,6 +3070,16 @@ module Prism
2840
3070
  def type
2841
3071
  :class_node
2842
3072
  end
3073
+
3074
+ # Similar to #type, this method returns a symbol that you can use for
3075
+ # splitting on the type of the node without having to do a long === chain.
3076
+ # Note that like #type, it will still be slower than using == for a single
3077
+ # class, but should be faster in a case statement or an array comparison.
3078
+ #
3079
+ # def self.type: () -> Symbol
3080
+ def self.type
3081
+ :class_node
3082
+ end
2843
3083
  end
2844
3084
 
2845
3085
  # Represents the use of the `&&=` operator for assignment to a class variable.
@@ -2939,6 +3179,16 @@ module Prism
2939
3179
  def type
2940
3180
  :class_variable_and_write_node
2941
3181
  end
3182
+
3183
+ # Similar to #type, this method returns a symbol that you can use for
3184
+ # splitting on the type of the node without having to do a long === chain.
3185
+ # Note that like #type, it will still be slower than using == for a single
3186
+ # class, but should be faster in a case statement or an array comparison.
3187
+ #
3188
+ # def self.type: () -> Symbol
3189
+ def self.type
3190
+ :class_variable_and_write_node
3191
+ end
2942
3192
  end
2943
3193
 
2944
3194
  # Represents assigning to a class variable using an operator that isn't `=`.
@@ -3039,6 +3289,16 @@ module Prism
3039
3289
  def type
3040
3290
  :class_variable_operator_write_node
3041
3291
  end
3292
+
3293
+ # Similar to #type, this method returns a symbol that you can use for
3294
+ # splitting on the type of the node without having to do a long === chain.
3295
+ # Note that like #type, it will still be slower than using == for a single
3296
+ # class, but should be faster in a case statement or an array comparison.
3297
+ #
3298
+ # def self.type: () -> Symbol
3299
+ def self.type
3300
+ :class_variable_operator_write_node
3301
+ end
3042
3302
  end
3043
3303
 
3044
3304
  # Represents the use of the `||=` operator for assignment to a class variable.
@@ -3138,6 +3398,16 @@ module Prism
3138
3398
  def type
3139
3399
  :class_variable_or_write_node
3140
3400
  end
3401
+
3402
+ # Similar to #type, this method returns a symbol that you can use for
3403
+ # splitting on the type of the node without having to do a long === chain.
3404
+ # Note that like #type, it will still be slower than using == for a single
3405
+ # class, but should be faster in a case statement or an array comparison.
3406
+ #
3407
+ # def self.type: () -> Symbol
3408
+ def self.type
3409
+ :class_variable_or_write_node
3410
+ end
3141
3411
  end
3142
3412
 
3143
3413
  # Represents referencing a class variable.
@@ -3213,6 +3483,16 @@ module Prism
3213
3483
  def type
3214
3484
  :class_variable_read_node
3215
3485
  end
3486
+
3487
+ # Similar to #type, this method returns a symbol that you can use for
3488
+ # splitting on the type of the node without having to do a long === chain.
3489
+ # Note that like #type, it will still be slower than using == for a single
3490
+ # class, but should be faster in a case statement or an array comparison.
3491
+ #
3492
+ # def self.type: () -> Symbol
3493
+ def self.type
3494
+ :class_variable_read_node
3495
+ end
3216
3496
  end
3217
3497
 
3218
3498
  # Represents writing to a class variable in a context that doesn't have an explicit value.
@@ -3288,6 +3568,16 @@ module Prism
3288
3568
  def type
3289
3569
  :class_variable_target_node
3290
3570
  end
3571
+
3572
+ # Similar to #type, this method returns a symbol that you can use for
3573
+ # splitting on the type of the node without having to do a long === chain.
3574
+ # Note that like #type, it will still be slower than using == for a single
3575
+ # class, but should be faster in a case statement or an array comparison.
3576
+ #
3577
+ # def self.type: () -> Symbol
3578
+ def self.type
3579
+ :class_variable_target_node
3580
+ end
3291
3581
  end
3292
3582
 
3293
3583
  # Represents writing to a class variable.
@@ -3387,6 +3677,16 @@ module Prism
3387
3677
  def type
3388
3678
  :class_variable_write_node
3389
3679
  end
3680
+
3681
+ # Similar to #type, this method returns a symbol that you can use for
3682
+ # splitting on the type of the node without having to do a long === chain.
3683
+ # Note that like #type, it will still be slower than using == for a single
3684
+ # class, but should be faster in a case statement or an array comparison.
3685
+ #
3686
+ # def self.type: () -> Symbol
3687
+ def self.type
3688
+ :class_variable_write_node
3689
+ end
3390
3690
  end
3391
3691
 
3392
3692
  # Represents the use of the `&&=` operator for assignment to a constant.
@@ -3486,6 +3786,16 @@ module Prism
3486
3786
  def type
3487
3787
  :constant_and_write_node
3488
3788
  end
3789
+
3790
+ # Similar to #type, this method returns a symbol that you can use for
3791
+ # splitting on the type of the node without having to do a long === chain.
3792
+ # Note that like #type, it will still be slower than using == for a single
3793
+ # class, but should be faster in a case statement or an array comparison.
3794
+ #
3795
+ # def self.type: () -> Symbol
3796
+ def self.type
3797
+ :constant_and_write_node
3798
+ end
3489
3799
  end
3490
3800
 
3491
3801
  # Represents assigning to a constant using an operator that isn't `=`.
@@ -3586,6 +3896,16 @@ module Prism
3586
3896
  def type
3587
3897
  :constant_operator_write_node
3588
3898
  end
3899
+
3900
+ # Similar to #type, this method returns a symbol that you can use for
3901
+ # splitting on the type of the node without having to do a long === chain.
3902
+ # Note that like #type, it will still be slower than using == for a single
3903
+ # class, but should be faster in a case statement or an array comparison.
3904
+ #
3905
+ # def self.type: () -> Symbol
3906
+ def self.type
3907
+ :constant_operator_write_node
3908
+ end
3589
3909
  end
3590
3910
 
3591
3911
  # Represents the use of the `||=` operator for assignment to a constant.
@@ -3685,6 +4005,16 @@ module Prism
3685
4005
  def type
3686
4006
  :constant_or_write_node
3687
4007
  end
4008
+
4009
+ # Similar to #type, this method returns a symbol that you can use for
4010
+ # splitting on the type of the node without having to do a long === chain.
4011
+ # Note that like #type, it will still be slower than using == for a single
4012
+ # class, but should be faster in a case statement or an array comparison.
4013
+ #
4014
+ # def self.type: () -> Symbol
4015
+ def self.type
4016
+ :constant_or_write_node
4017
+ end
3688
4018
  end
3689
4019
 
3690
4020
  # Represents the use of the `&&=` operator for assignment to a constant path.
@@ -3779,6 +4109,16 @@ module Prism
3779
4109
  def type
3780
4110
  :constant_path_and_write_node
3781
4111
  end
4112
+
4113
+ # Similar to #type, this method returns a symbol that you can use for
4114
+ # splitting on the type of the node without having to do a long === chain.
4115
+ # Note that like #type, it will still be slower than using == for a single
4116
+ # class, but should be faster in a case statement or an array comparison.
4117
+ #
4118
+ # def self.type: () -> Symbol
4119
+ def self.type
4120
+ :constant_path_and_write_node
4121
+ end
3782
4122
  end
3783
4123
 
3784
4124
  # Represents accessing a constant through a path of `::` operators.
@@ -3880,6 +4220,16 @@ module Prism
3880
4220
  def type
3881
4221
  :constant_path_node
3882
4222
  end
4223
+
4224
+ # Similar to #type, this method returns a symbol that you can use for
4225
+ # splitting on the type of the node without having to do a long === chain.
4226
+ # Note that like #type, it will still be slower than using == for a single
4227
+ # class, but should be faster in a case statement or an array comparison.
4228
+ #
4229
+ # def self.type: () -> Symbol
4230
+ def self.type
4231
+ :constant_path_node
4232
+ end
3883
4233
  end
3884
4234
 
3885
4235
  # Represents assigning to a constant path using an operator that isn't `=`.
@@ -3975,6 +4325,16 @@ module Prism
3975
4325
  def type
3976
4326
  :constant_path_operator_write_node
3977
4327
  end
4328
+
4329
+ # Similar to #type, this method returns a symbol that you can use for
4330
+ # splitting on the type of the node without having to do a long === chain.
4331
+ # Note that like #type, it will still be slower than using == for a single
4332
+ # class, but should be faster in a case statement or an array comparison.
4333
+ #
4334
+ # def self.type: () -> Symbol
4335
+ def self.type
4336
+ :constant_path_operator_write_node
4337
+ end
3978
4338
  end
3979
4339
 
3980
4340
  # Represents the use of the `||=` operator for assignment to a constant path.
@@ -4069,6 +4429,16 @@ module Prism
4069
4429
  def type
4070
4430
  :constant_path_or_write_node
4071
4431
  end
4432
+
4433
+ # Similar to #type, this method returns a symbol that you can use for
4434
+ # splitting on the type of the node without having to do a long === chain.
4435
+ # Note that like #type, it will still be slower than using == for a single
4436
+ # class, but should be faster in a case statement or an array comparison.
4437
+ #
4438
+ # def self.type: () -> Symbol
4439
+ def self.type
4440
+ :constant_path_or_write_node
4441
+ end
4072
4442
  end
4073
4443
 
4074
4444
  # Represents writing to a constant path in a context that doesn't have an explicit value.
@@ -4170,6 +4540,16 @@ module Prism
4170
4540
  def type
4171
4541
  :constant_path_target_node
4172
4542
  end
4543
+
4544
+ # Similar to #type, this method returns a symbol that you can use for
4545
+ # splitting on the type of the node without having to do a long === chain.
4546
+ # Note that like #type, it will still be slower than using == for a single
4547
+ # class, but should be faster in a case statement or an array comparison.
4548
+ #
4549
+ # def self.type: () -> Symbol
4550
+ def self.type
4551
+ :constant_path_target_node
4552
+ end
4173
4553
  end
4174
4554
 
4175
4555
  # Represents writing to a constant path.
@@ -4270,6 +4650,16 @@ module Prism
4270
4650
  def type
4271
4651
  :constant_path_write_node
4272
4652
  end
4653
+
4654
+ # Similar to #type, this method returns a symbol that you can use for
4655
+ # splitting on the type of the node without having to do a long === chain.
4656
+ # Note that like #type, it will still be slower than using == for a single
4657
+ # class, but should be faster in a case statement or an array comparison.
4658
+ #
4659
+ # def self.type: () -> Symbol
4660
+ def self.type
4661
+ :constant_path_write_node
4662
+ end
4273
4663
  end
4274
4664
 
4275
4665
  # Represents referencing a constant.
@@ -4345,6 +4735,16 @@ module Prism
4345
4735
  def type
4346
4736
  :constant_read_node
4347
4737
  end
4738
+
4739
+ # Similar to #type, this method returns a symbol that you can use for
4740
+ # splitting on the type of the node without having to do a long === chain.
4741
+ # Note that like #type, it will still be slower than using == for a single
4742
+ # class, but should be faster in a case statement or an array comparison.
4743
+ #
4744
+ # def self.type: () -> Symbol
4745
+ def self.type
4746
+ :constant_read_node
4747
+ end
4348
4748
  end
4349
4749
 
4350
4750
  # Represents writing to a constant in a context that doesn't have an explicit value.
@@ -4420,6 +4820,16 @@ module Prism
4420
4820
  def type
4421
4821
  :constant_target_node
4422
4822
  end
4823
+
4824
+ # Similar to #type, this method returns a symbol that you can use for
4825
+ # splitting on the type of the node without having to do a long === chain.
4826
+ # Note that like #type, it will still be slower than using == for a single
4827
+ # class, but should be faster in a case statement or an array comparison.
4828
+ #
4829
+ # def self.type: () -> Symbol
4830
+ def self.type
4831
+ :constant_target_node
4832
+ end
4423
4833
  end
4424
4834
 
4425
4835
  # Represents writing to a constant.
@@ -4519,6 +4929,16 @@ module Prism
4519
4929
  def type
4520
4930
  :constant_write_node
4521
4931
  end
4932
+
4933
+ # Similar to #type, this method returns a symbol that you can use for
4934
+ # splitting on the type of the node without having to do a long === chain.
4935
+ # Note that like #type, it will still be slower than using == for a single
4936
+ # class, but should be faster in a case statement or an array comparison.
4937
+ #
4938
+ # def self.type: () -> Symbol
4939
+ def self.type
4940
+ :constant_write_node
4941
+ end
4522
4942
  end
4523
4943
 
4524
4944
  # Represents a method definition.
@@ -4710,6 +5130,16 @@ module Prism
4710
5130
  def type
4711
5131
  :def_node
4712
5132
  end
5133
+
5134
+ # Similar to #type, this method returns a symbol that you can use for
5135
+ # splitting on the type of the node without having to do a long === chain.
5136
+ # Note that like #type, it will still be slower than using == for a single
5137
+ # class, but should be faster in a case statement or an array comparison.
5138
+ #
5139
+ # def self.type: () -> Symbol
5140
+ def self.type
5141
+ :def_node
5142
+ end
4713
5143
  end
4714
5144
 
4715
5145
  # Represents the use of the `defined?` keyword.
@@ -4819,6 +5249,16 @@ module Prism
4819
5249
  def type
4820
5250
  :defined_node
4821
5251
  end
5252
+
5253
+ # Similar to #type, this method returns a symbol that you can use for
5254
+ # splitting on the type of the node without having to do a long === chain.
5255
+ # Note that like #type, it will still be slower than using == for a single
5256
+ # class, but should be faster in a case statement or an array comparison.
5257
+ #
5258
+ # def self.type: () -> Symbol
5259
+ def self.type
5260
+ :defined_node
5261
+ end
4822
5262
  end
4823
5263
 
4824
5264
  # Represents an `else` clause in a `case`, `if`, or `unless` statement.
@@ -4923,6 +5363,16 @@ module Prism
4923
5363
  def type
4924
5364
  :else_node
4925
5365
  end
5366
+
5367
+ # Similar to #type, this method returns a symbol that you can use for
5368
+ # splitting on the type of the node without having to do a long === chain.
5369
+ # Note that like #type, it will still be slower than using == for a single
5370
+ # class, but should be faster in a case statement or an array comparison.
5371
+ #
5372
+ # def self.type: () -> Symbol
5373
+ def self.type
5374
+ :else_node
5375
+ end
4926
5376
  end
4927
5377
 
4928
5378
  # Represents an interpolated set of statements.
@@ -5027,6 +5477,16 @@ module Prism
5027
5477
  def type
5028
5478
  :embedded_statements_node
5029
5479
  end
5480
+
5481
+ # Similar to #type, this method returns a symbol that you can use for
5482
+ # splitting on the type of the node without having to do a long === chain.
5483
+ # Note that like #type, it will still be slower than using == for a single
5484
+ # class, but should be faster in a case statement or an array comparison.
5485
+ #
5486
+ # def self.type: () -> Symbol
5487
+ def self.type
5488
+ :embedded_statements_node
5489
+ end
5030
5490
  end
5031
5491
 
5032
5492
  # Represents an interpolated variable.
@@ -5114,6 +5574,16 @@ module Prism
5114
5574
  def type
5115
5575
  :embedded_variable_node
5116
5576
  end
5577
+
5578
+ # Similar to #type, this method returns a symbol that you can use for
5579
+ # splitting on the type of the node without having to do a long === chain.
5580
+ # Note that like #type, it will still be slower than using == for a single
5581
+ # class, but should be faster in a case statement or an array comparison.
5582
+ #
5583
+ # def self.type: () -> Symbol
5584
+ def self.type
5585
+ :embedded_variable_node
5586
+ end
5117
5587
  end
5118
5588
 
5119
5589
  # Represents an `ensure` clause in a `begin` statement.
@@ -5222,6 +5692,16 @@ module Prism
5222
5692
  def type
5223
5693
  :ensure_node
5224
5694
  end
5695
+
5696
+ # Similar to #type, this method returns a symbol that you can use for
5697
+ # splitting on the type of the node without having to do a long === chain.
5698
+ # Note that like #type, it will still be slower than using == for a single
5699
+ # class, but should be faster in a case statement or an array comparison.
5700
+ #
5701
+ # def self.type: () -> Symbol
5702
+ def self.type
5703
+ :ensure_node
5704
+ end
5225
5705
  end
5226
5706
 
5227
5707
  # Represents the use of the literal `false` keyword.
@@ -5291,6 +5771,16 @@ module Prism
5291
5771
  def type
5292
5772
  :false_node
5293
5773
  end
5774
+
5775
+ # Similar to #type, this method returns a symbol that you can use for
5776
+ # splitting on the type of the node without having to do a long === chain.
5777
+ # Note that like #type, it will still be slower than using == for a single
5778
+ # class, but should be faster in a case statement or an array comparison.
5779
+ #
5780
+ # def self.type: () -> Symbol
5781
+ def self.type
5782
+ :false_node
5783
+ end
5294
5784
  end
5295
5785
 
5296
5786
  # Represents a find pattern in pattern matching.
@@ -5424,6 +5914,16 @@ module Prism
5424
5914
  def type
5425
5915
  :find_pattern_node
5426
5916
  end
5917
+
5918
+ # Similar to #type, this method returns a symbol that you can use for
5919
+ # splitting on the type of the node without having to do a long === chain.
5920
+ # Note that like #type, it will still be slower than using == for a single
5921
+ # class, but should be faster in a case statement or an array comparison.
5922
+ #
5923
+ # def self.type: () -> Symbol
5924
+ def self.type
5925
+ :find_pattern_node
5926
+ end
5427
5927
  end
5428
5928
 
5429
5929
  # Represents the use of the `..` or `...` operators to create flip flops.
@@ -5541,6 +6041,16 @@ module Prism
5541
6041
  def type
5542
6042
  :flip_flop_node
5543
6043
  end
6044
+
6045
+ # Similar to #type, this method returns a symbol that you can use for
6046
+ # splitting on the type of the node without having to do a long === chain.
6047
+ # Note that like #type, it will still be slower than using == for a single
6048
+ # class, but should be faster in a case statement or an array comparison.
6049
+ #
6050
+ # def self.type: () -> Symbol
6051
+ def self.type
6052
+ :flip_flop_node
6053
+ end
5544
6054
  end
5545
6055
 
5546
6056
  # Represents a floating point number literal.
@@ -5610,6 +6120,16 @@ module Prism
5610
6120
  def type
5611
6121
  :float_node
5612
6122
  end
6123
+
6124
+ # Similar to #type, this method returns a symbol that you can use for
6125
+ # splitting on the type of the node without having to do a long === chain.
6126
+ # Note that like #type, it will still be slower than using == for a single
6127
+ # class, but should be faster in a case statement or an array comparison.
6128
+ #
6129
+ # def self.type: () -> Symbol
6130
+ def self.type
6131
+ :float_node
6132
+ end
5613
6133
  end
5614
6134
 
5615
6135
  # Represents the use of the `for` keyword.
@@ -5752,6 +6272,16 @@ module Prism
5752
6272
  def type
5753
6273
  :for_node
5754
6274
  end
6275
+
6276
+ # Similar to #type, this method returns a symbol that you can use for
6277
+ # splitting on the type of the node without having to do a long === chain.
6278
+ # Note that like #type, it will still be slower than using == for a single
6279
+ # class, but should be faster in a case statement or an array comparison.
6280
+ #
6281
+ # def self.type: () -> Symbol
6282
+ def self.type
6283
+ :for_node
6284
+ end
5755
6285
  end
5756
6286
 
5757
6287
  # Represents forwarding all arguments to this method to another method.
@@ -5823,6 +6353,16 @@ module Prism
5823
6353
  def type
5824
6354
  :forwarding_arguments_node
5825
6355
  end
6356
+
6357
+ # Similar to #type, this method returns a symbol that you can use for
6358
+ # splitting on the type of the node without having to do a long === chain.
6359
+ # Note that like #type, it will still be slower than using == for a single
6360
+ # class, but should be faster in a case statement or an array comparison.
6361
+ #
6362
+ # def self.type: () -> Symbol
6363
+ def self.type
6364
+ :forwarding_arguments_node
6365
+ end
5826
6366
  end
5827
6367
 
5828
6368
  # Represents the use of the forwarding parameter in a method, block, or lambda declaration.
@@ -5893,6 +6433,16 @@ module Prism
5893
6433
  def type
5894
6434
  :forwarding_parameter_node
5895
6435
  end
6436
+
6437
+ # Similar to #type, this method returns a symbol that you can use for
6438
+ # splitting on the type of the node without having to do a long === chain.
6439
+ # Note that like #type, it will still be slower than using == for a single
6440
+ # class, but should be faster in a case statement or an array comparison.
6441
+ #
6442
+ # def self.type: () -> Symbol
6443
+ def self.type
6444
+ :forwarding_parameter_node
6445
+ end
5896
6446
  end
5897
6447
 
5898
6448
  # Represents the use of the `super` keyword without parentheses or arguments.
@@ -5975,6 +6525,16 @@ module Prism
5975
6525
  def type
5976
6526
  :forwarding_super_node
5977
6527
  end
6528
+
6529
+ # Similar to #type, this method returns a symbol that you can use for
6530
+ # splitting on the type of the node without having to do a long === chain.
6531
+ # Note that like #type, it will still be slower than using == for a single
6532
+ # class, but should be faster in a case statement or an array comparison.
6533
+ #
6534
+ # def self.type: () -> Symbol
6535
+ def self.type
6536
+ :forwarding_super_node
6537
+ end
5978
6538
  end
5979
6539
 
5980
6540
  # Represents the use of the `&&=` operator for assignment to a global variable.
@@ -6074,6 +6634,16 @@ module Prism
6074
6634
  def type
6075
6635
  :global_variable_and_write_node
6076
6636
  end
6637
+
6638
+ # Similar to #type, this method returns a symbol that you can use for
6639
+ # splitting on the type of the node without having to do a long === chain.
6640
+ # Note that like #type, it will still be slower than using == for a single
6641
+ # class, but should be faster in a case statement or an array comparison.
6642
+ #
6643
+ # def self.type: () -> Symbol
6644
+ def self.type
6645
+ :global_variable_and_write_node
6646
+ end
6077
6647
  end
6078
6648
 
6079
6649
  # Represents assigning to a global variable using an operator that isn't `=`.
@@ -6174,6 +6744,16 @@ module Prism
6174
6744
  def type
6175
6745
  :global_variable_operator_write_node
6176
6746
  end
6747
+
6748
+ # Similar to #type, this method returns a symbol that you can use for
6749
+ # splitting on the type of the node without having to do a long === chain.
6750
+ # Note that like #type, it will still be slower than using == for a single
6751
+ # class, but should be faster in a case statement or an array comparison.
6752
+ #
6753
+ # def self.type: () -> Symbol
6754
+ def self.type
6755
+ :global_variable_operator_write_node
6756
+ end
6177
6757
  end
6178
6758
 
6179
6759
  # Represents the use of the `||=` operator for assignment to a global variable.
@@ -6273,6 +6853,16 @@ module Prism
6273
6853
  def type
6274
6854
  :global_variable_or_write_node
6275
6855
  end
6856
+
6857
+ # Similar to #type, this method returns a symbol that you can use for
6858
+ # splitting on the type of the node without having to do a long === chain.
6859
+ # Note that like #type, it will still be slower than using == for a single
6860
+ # class, but should be faster in a case statement or an array comparison.
6861
+ #
6862
+ # def self.type: () -> Symbol
6863
+ def self.type
6864
+ :global_variable_or_write_node
6865
+ end
6276
6866
  end
6277
6867
 
6278
6868
  # Represents referencing a global variable.
@@ -6348,6 +6938,16 @@ module Prism
6348
6938
  def type
6349
6939
  :global_variable_read_node
6350
6940
  end
6941
+
6942
+ # Similar to #type, this method returns a symbol that you can use for
6943
+ # splitting on the type of the node without having to do a long === chain.
6944
+ # Note that like #type, it will still be slower than using == for a single
6945
+ # class, but should be faster in a case statement or an array comparison.
6946
+ #
6947
+ # def self.type: () -> Symbol
6948
+ def self.type
6949
+ :global_variable_read_node
6950
+ end
6351
6951
  end
6352
6952
 
6353
6953
  # Represents writing to a global variable in a context that doesn't have an explicit value.
@@ -6423,6 +7023,16 @@ module Prism
6423
7023
  def type
6424
7024
  :global_variable_target_node
6425
7025
  end
7026
+
7027
+ # Similar to #type, this method returns a symbol that you can use for
7028
+ # splitting on the type of the node without having to do a long === chain.
7029
+ # Note that like #type, it will still be slower than using == for a single
7030
+ # class, but should be faster in a case statement or an array comparison.
7031
+ #
7032
+ # def self.type: () -> Symbol
7033
+ def self.type
7034
+ :global_variable_target_node
7035
+ end
6426
7036
  end
6427
7037
 
6428
7038
  # Represents writing to a global variable.
@@ -6522,6 +7132,16 @@ module Prism
6522
7132
  def type
6523
7133
  :global_variable_write_node
6524
7134
  end
7135
+
7136
+ # Similar to #type, this method returns a symbol that you can use for
7137
+ # splitting on the type of the node without having to do a long === chain.
7138
+ # Note that like #type, it will still be slower than using == for a single
7139
+ # class, but should be faster in a case statement or an array comparison.
7140
+ #
7141
+ # def self.type: () -> Symbol
7142
+ def self.type
7143
+ :global_variable_write_node
7144
+ end
6525
7145
  end
6526
7146
 
6527
7147
  # Represents a hash literal.
@@ -6619,6 +7239,16 @@ module Prism
6619
7239
  def type
6620
7240
  :hash_node
6621
7241
  end
7242
+
7243
+ # Similar to #type, this method returns a symbol that you can use for
7244
+ # splitting on the type of the node without having to do a long === chain.
7245
+ # Note that like #type, it will still be slower than using == for a single
7246
+ # class, but should be faster in a case statement or an array comparison.
7247
+ #
7248
+ # def self.type: () -> Symbol
7249
+ def self.type
7250
+ :hash_node
7251
+ end
6622
7252
  end
6623
7253
 
6624
7254
  # Represents a hash pattern in pattern matching.
@@ -6745,10 +7375,20 @@ module Prism
6745
7375
  def type
6746
7376
  :hash_pattern_node
6747
7377
  end
6748
- end
6749
7378
 
6750
- # Represents the use of the `if` keyword, either in the block form or the modifier form.
6751
- #
7379
+ # Similar to #type, this method returns a symbol that you can use for
7380
+ # splitting on the type of the node without having to do a long === chain.
7381
+ # Note that like #type, it will still be slower than using == for a single
7382
+ # class, but should be faster in a case statement or an array comparison.
7383
+ #
7384
+ # def self.type: () -> Symbol
7385
+ def self.type
7386
+ :hash_pattern_node
7387
+ end
7388
+ end
7389
+
7390
+ # Represents the use of the `if` keyword, either in the block form or the modifier form.
7391
+ #
6752
7392
  # bar if foo
6753
7393
  # ^^^^^^^^^^
6754
7394
  #
@@ -6876,6 +7516,16 @@ module Prism
6876
7516
  def type
6877
7517
  :if_node
6878
7518
  end
7519
+
7520
+ # Similar to #type, this method returns a symbol that you can use for
7521
+ # splitting on the type of the node without having to do a long === chain.
7522
+ # Note that like #type, it will still be slower than using == for a single
7523
+ # class, but should be faster in a case statement or an array comparison.
7524
+ #
7525
+ # def self.type: () -> Symbol
7526
+ def self.type
7527
+ :if_node
7528
+ end
6879
7529
  end
6880
7530
 
6881
7531
  # Represents an imaginary number literal.
@@ -6952,6 +7602,16 @@ module Prism
6952
7602
  def type
6953
7603
  :imaginary_node
6954
7604
  end
7605
+
7606
+ # Similar to #type, this method returns a symbol that you can use for
7607
+ # splitting on the type of the node without having to do a long === chain.
7608
+ # Note that like #type, it will still be slower than using == for a single
7609
+ # class, but should be faster in a case statement or an array comparison.
7610
+ #
7611
+ # def self.type: () -> Symbol
7612
+ def self.type
7613
+ :imaginary_node
7614
+ end
6955
7615
  end
6956
7616
 
6957
7617
  # Represents a node that is implicitly being added to the tree but doesn't
@@ -7032,6 +7692,16 @@ module Prism
7032
7692
  def type
7033
7693
  :implicit_node
7034
7694
  end
7695
+
7696
+ # Similar to #type, this method returns a symbol that you can use for
7697
+ # splitting on the type of the node without having to do a long === chain.
7698
+ # Note that like #type, it will still be slower than using == for a single
7699
+ # class, but should be faster in a case statement or an array comparison.
7700
+ #
7701
+ # def self.type: () -> Symbol
7702
+ def self.type
7703
+ :implicit_node
7704
+ end
7035
7705
  end
7036
7706
 
7037
7707
  # Represents the use of the `in` keyword in a case statement.
@@ -7144,6 +7814,16 @@ module Prism
7144
7814
  def type
7145
7815
  :in_node
7146
7816
  end
7817
+
7818
+ # Similar to #type, this method returns a symbol that you can use for
7819
+ # splitting on the type of the node without having to do a long === chain.
7820
+ # Note that like #type, it will still be slower than using == for a single
7821
+ # class, but should be faster in a case statement or an array comparison.
7822
+ #
7823
+ # def self.type: () -> Symbol
7824
+ def self.type
7825
+ :in_node
7826
+ end
7147
7827
  end
7148
7828
 
7149
7829
  # Represents the use of the `&&=` operator for assignment to an instance variable.
@@ -7243,6 +7923,16 @@ module Prism
7243
7923
  def type
7244
7924
  :instance_variable_and_write_node
7245
7925
  end
7926
+
7927
+ # Similar to #type, this method returns a symbol that you can use for
7928
+ # splitting on the type of the node without having to do a long === chain.
7929
+ # Note that like #type, it will still be slower than using == for a single
7930
+ # class, but should be faster in a case statement or an array comparison.
7931
+ #
7932
+ # def self.type: () -> Symbol
7933
+ def self.type
7934
+ :instance_variable_and_write_node
7935
+ end
7246
7936
  end
7247
7937
 
7248
7938
  # Represents assigning to an instance variable using an operator that isn't `=`.
@@ -7343,6 +8033,16 @@ module Prism
7343
8033
  def type
7344
8034
  :instance_variable_operator_write_node
7345
8035
  end
8036
+
8037
+ # Similar to #type, this method returns a symbol that you can use for
8038
+ # splitting on the type of the node without having to do a long === chain.
8039
+ # Note that like #type, it will still be slower than using == for a single
8040
+ # class, but should be faster in a case statement or an array comparison.
8041
+ #
8042
+ # def self.type: () -> Symbol
8043
+ def self.type
8044
+ :instance_variable_operator_write_node
8045
+ end
7346
8046
  end
7347
8047
 
7348
8048
  # Represents the use of the `||=` operator for assignment to an instance variable.
@@ -7442,6 +8142,16 @@ module Prism
7442
8142
  def type
7443
8143
  :instance_variable_or_write_node
7444
8144
  end
8145
+
8146
+ # Similar to #type, this method returns a symbol that you can use for
8147
+ # splitting on the type of the node without having to do a long === chain.
8148
+ # Note that like #type, it will still be slower than using == for a single
8149
+ # class, but should be faster in a case statement or an array comparison.
8150
+ #
8151
+ # def self.type: () -> Symbol
8152
+ def self.type
8153
+ :instance_variable_or_write_node
8154
+ end
7445
8155
  end
7446
8156
 
7447
8157
  # Represents referencing an instance variable.
@@ -7517,6 +8227,16 @@ module Prism
7517
8227
  def type
7518
8228
  :instance_variable_read_node
7519
8229
  end
8230
+
8231
+ # Similar to #type, this method returns a symbol that you can use for
8232
+ # splitting on the type of the node without having to do a long === chain.
8233
+ # Note that like #type, it will still be slower than using == for a single
8234
+ # class, but should be faster in a case statement or an array comparison.
8235
+ #
8236
+ # def self.type: () -> Symbol
8237
+ def self.type
8238
+ :instance_variable_read_node
8239
+ end
7520
8240
  end
7521
8241
 
7522
8242
  # Represents writing to an instance variable in a context that doesn't have an explicit value.
@@ -7592,6 +8312,16 @@ module Prism
7592
8312
  def type
7593
8313
  :instance_variable_target_node
7594
8314
  end
8315
+
8316
+ # Similar to #type, this method returns a symbol that you can use for
8317
+ # splitting on the type of the node without having to do a long === chain.
8318
+ # Note that like #type, it will still be slower than using == for a single
8319
+ # class, but should be faster in a case statement or an array comparison.
8320
+ #
8321
+ # def self.type: () -> Symbol
8322
+ def self.type
8323
+ :instance_variable_target_node
8324
+ end
7595
8325
  end
7596
8326
 
7597
8327
  # Represents writing to an instance variable.
@@ -7691,6 +8421,16 @@ module Prism
7691
8421
  def type
7692
8422
  :instance_variable_write_node
7693
8423
  end
8424
+
8425
+ # Similar to #type, this method returns a symbol that you can use for
8426
+ # splitting on the type of the node without having to do a long === chain.
8427
+ # Note that like #type, it will still be slower than using == for a single
8428
+ # class, but should be faster in a case statement or an array comparison.
8429
+ #
8430
+ # def self.type: () -> Symbol
8431
+ def self.type
8432
+ :instance_variable_write_node
8433
+ end
7694
8434
  end
7695
8435
 
7696
8436
  # Represents an integer number literal.
@@ -7787,6 +8527,16 @@ module Prism
7787
8527
  def type
7788
8528
  :integer_node
7789
8529
  end
8530
+
8531
+ # Similar to #type, this method returns a symbol that you can use for
8532
+ # splitting on the type of the node without having to do a long === chain.
8533
+ # Note that like #type, it will still be slower than using == for a single
8534
+ # class, but should be faster in a case statement or an array comparison.
8535
+ #
8536
+ # def self.type: () -> Symbol
8537
+ def self.type
8538
+ :integer_node
8539
+ end
7790
8540
  end
7791
8541
 
7792
8542
  # Represents a regular expression literal that contains interpolation that
@@ -7886,6 +8636,11 @@ module Prism
7886
8636
  flags.anybits?(RegularExpressionFlags::MULTI_LINE)
7887
8637
  end
7888
8638
 
8639
+ # def once?: () -> bool
8640
+ def once?
8641
+ flags.anybits?(RegularExpressionFlags::ONCE)
8642
+ end
8643
+
7889
8644
  # def euc_jp?: () -> bool
7890
8645
  def euc_jp?
7891
8646
  flags.anybits?(RegularExpressionFlags::EUC_JP)
@@ -7906,17 +8661,12 @@ module Prism
7906
8661
  flags.anybits?(RegularExpressionFlags::UTF_8)
7907
8662
  end
7908
8663
 
7909
- # def once?: () -> bool
7910
- def once?
7911
- flags.anybits?(RegularExpressionFlags::ONCE)
7912
- end
7913
-
7914
8664
  def inspect(inspector = NodeInspector.new)
7915
8665
  inspector << inspector.header(self)
7916
8666
  inspector << "├── opening_loc: #{inspector.location(opening_loc)}\n"
7917
8667
  inspector << "├── parts: #{inspector.list("#{inspector.prefix}│ ", parts)}"
7918
8668
  inspector << "├── closing_loc: #{inspector.location(closing_loc)}\n"
7919
- flags = [("ignore_case" if ignore_case?), ("extended" if extended?), ("multi_line" if multi_line?), ("euc_jp" if euc_jp?), ("ascii_8bit" if ascii_8bit?), ("windows_31j" if windows_31j?), ("utf_8" if utf_8?), ("once" if once?)].compact
8669
+ flags = [("ignore_case" if ignore_case?), ("extended" if extended?), ("multi_line" if multi_line?), ("once" if once?), ("euc_jp" if euc_jp?), ("ascii_8bit" if ascii_8bit?), ("windows_31j" if windows_31j?), ("utf_8" if utf_8?)].compact
7920
8670
  inspector << "└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n"
7921
8671
  inspector.to_str
7922
8672
  end
@@ -7938,6 +8688,16 @@ module Prism
7938
8688
  def type
7939
8689
  :interpolated_match_last_line_node
7940
8690
  end
8691
+
8692
+ # Similar to #type, this method returns a symbol that you can use for
8693
+ # splitting on the type of the node without having to do a long === chain.
8694
+ # Note that like #type, it will still be slower than using == for a single
8695
+ # class, but should be faster in a case statement or an array comparison.
8696
+ #
8697
+ # def self.type: () -> Symbol
8698
+ def self.type
8699
+ :interpolated_match_last_line_node
8700
+ end
7941
8701
  end
7942
8702
 
7943
8703
  # Represents a regular expression literal that contains interpolation.
@@ -8035,6 +8795,11 @@ module Prism
8035
8795
  flags.anybits?(RegularExpressionFlags::MULTI_LINE)
8036
8796
  end
8037
8797
 
8798
+ # def once?: () -> bool
8799
+ def once?
8800
+ flags.anybits?(RegularExpressionFlags::ONCE)
8801
+ end
8802
+
8038
8803
  # def euc_jp?: () -> bool
8039
8804
  def euc_jp?
8040
8805
  flags.anybits?(RegularExpressionFlags::EUC_JP)
@@ -8055,17 +8820,12 @@ module Prism
8055
8820
  flags.anybits?(RegularExpressionFlags::UTF_8)
8056
8821
  end
8057
8822
 
8058
- # def once?: () -> bool
8059
- def once?
8060
- flags.anybits?(RegularExpressionFlags::ONCE)
8061
- end
8062
-
8063
8823
  def inspect(inspector = NodeInspector.new)
8064
8824
  inspector << inspector.header(self)
8065
8825
  inspector << "├── opening_loc: #{inspector.location(opening_loc)}\n"
8066
8826
  inspector << "├── parts: #{inspector.list("#{inspector.prefix}│ ", parts)}"
8067
8827
  inspector << "├── closing_loc: #{inspector.location(closing_loc)}\n"
8068
- flags = [("ignore_case" if ignore_case?), ("extended" if extended?), ("multi_line" if multi_line?), ("euc_jp" if euc_jp?), ("ascii_8bit" if ascii_8bit?), ("windows_31j" if windows_31j?), ("utf_8" if utf_8?), ("once" if once?)].compact
8828
+ flags = [("ignore_case" if ignore_case?), ("extended" if extended?), ("multi_line" if multi_line?), ("once" if once?), ("euc_jp" if euc_jp?), ("ascii_8bit" if ascii_8bit?), ("windows_31j" if windows_31j?), ("utf_8" if utf_8?)].compact
8069
8829
  inspector << "└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n"
8070
8830
  inspector.to_str
8071
8831
  end
@@ -8087,6 +8847,16 @@ module Prism
8087
8847
  def type
8088
8848
  :interpolated_regular_expression_node
8089
8849
  end
8850
+
8851
+ # Similar to #type, this method returns a symbol that you can use for
8852
+ # splitting on the type of the node without having to do a long === chain.
8853
+ # Note that like #type, it will still be slower than using == for a single
8854
+ # class, but should be faster in a case statement or an array comparison.
8855
+ #
8856
+ # def self.type: () -> Symbol
8857
+ def self.type
8858
+ :interpolated_regular_expression_node
8859
+ end
8090
8860
  end
8091
8861
 
8092
8862
  # Represents a string literal that contains interpolation.
@@ -8189,6 +8959,16 @@ module Prism
8189
8959
  def type
8190
8960
  :interpolated_string_node
8191
8961
  end
8962
+
8963
+ # Similar to #type, this method returns a symbol that you can use for
8964
+ # splitting on the type of the node without having to do a long === chain.
8965
+ # Note that like #type, it will still be slower than using == for a single
8966
+ # class, but should be faster in a case statement or an array comparison.
8967
+ #
8968
+ # def self.type: () -> Symbol
8969
+ def self.type
8970
+ :interpolated_string_node
8971
+ end
8192
8972
  end
8193
8973
 
8194
8974
  # Represents a symbol literal that contains interpolation.
@@ -8291,6 +9071,16 @@ module Prism
8291
9071
  def type
8292
9072
  :interpolated_symbol_node
8293
9073
  end
9074
+
9075
+ # Similar to #type, this method returns a symbol that you can use for
9076
+ # splitting on the type of the node without having to do a long === chain.
9077
+ # Note that like #type, it will still be slower than using == for a single
9078
+ # class, but should be faster in a case statement or an array comparison.
9079
+ #
9080
+ # def self.type: () -> Symbol
9081
+ def self.type
9082
+ :interpolated_symbol_node
9083
+ end
8294
9084
  end
8295
9085
 
8296
9086
  # Represents an xstring literal that contains interpolation.
@@ -8393,6 +9183,16 @@ module Prism
8393
9183
  def type
8394
9184
  :interpolated_x_string_node
8395
9185
  end
9186
+
9187
+ # Similar to #type, this method returns a symbol that you can use for
9188
+ # splitting on the type of the node without having to do a long === chain.
9189
+ # Note that like #type, it will still be slower than using == for a single
9190
+ # class, but should be faster in a case statement or an array comparison.
9191
+ #
9192
+ # def self.type: () -> Symbol
9193
+ def self.type
9194
+ :interpolated_x_string_node
9195
+ end
8396
9196
  end
8397
9197
 
8398
9198
  # Represents a hash literal without opening and closing braces.
@@ -8468,6 +9268,16 @@ module Prism
8468
9268
  def type
8469
9269
  :keyword_hash_node
8470
9270
  end
9271
+
9272
+ # Similar to #type, this method returns a symbol that you can use for
9273
+ # splitting on the type of the node without having to do a long === chain.
9274
+ # Note that like #type, it will still be slower than using == for a single
9275
+ # class, but should be faster in a case statement or an array comparison.
9276
+ #
9277
+ # def self.type: () -> Symbol
9278
+ def self.type
9279
+ :keyword_hash_node
9280
+ end
8471
9281
  end
8472
9282
 
8473
9283
  # Represents a keyword parameter to a method, block, or lambda definition.
@@ -8567,6 +9377,16 @@ module Prism
8567
9377
  def type
8568
9378
  :keyword_parameter_node
8569
9379
  end
9380
+
9381
+ # Similar to #type, this method returns a symbol that you can use for
9382
+ # splitting on the type of the node without having to do a long === chain.
9383
+ # Note that like #type, it will still be slower than using == for a single
9384
+ # class, but should be faster in a case statement or an array comparison.
9385
+ #
9386
+ # def self.type: () -> Symbol
9387
+ def self.type
9388
+ :keyword_parameter_node
9389
+ end
8570
9390
  end
8571
9391
 
8572
9392
  # Represents a keyword rest parameter to a method, block, or lambda definition.
@@ -8660,6 +9480,16 @@ module Prism
8660
9480
  def type
8661
9481
  :keyword_rest_parameter_node
8662
9482
  end
9483
+
9484
+ # Similar to #type, this method returns a symbol that you can use for
9485
+ # splitting on the type of the node without having to do a long === chain.
9486
+ # Note that like #type, it will still be slower than using == for a single
9487
+ # class, but should be faster in a case statement or an array comparison.
9488
+ #
9489
+ # def self.type: () -> Symbol
9490
+ def self.type
9491
+ :keyword_rest_parameter_node
9492
+ end
8663
9493
  end
8664
9494
 
8665
9495
  # Represents using a lambda literal (not the lambda method call).
@@ -8793,6 +9623,16 @@ module Prism
8793
9623
  def type
8794
9624
  :lambda_node
8795
9625
  end
9626
+
9627
+ # Similar to #type, this method returns a symbol that you can use for
9628
+ # splitting on the type of the node without having to do a long === chain.
9629
+ # Note that like #type, it will still be slower than using == for a single
9630
+ # class, but should be faster in a case statement or an array comparison.
9631
+ #
9632
+ # def self.type: () -> Symbol
9633
+ def self.type
9634
+ :lambda_node
9635
+ end
8796
9636
  end
8797
9637
 
8798
9638
  # Represents the use of the `&&=` operator for assignment to a local variable.
@@ -8898,6 +9738,16 @@ module Prism
8898
9738
  def type
8899
9739
  :local_variable_and_write_node
8900
9740
  end
9741
+
9742
+ # Similar to #type, this method returns a symbol that you can use for
9743
+ # splitting on the type of the node without having to do a long === chain.
9744
+ # Note that like #type, it will still be slower than using == for a single
9745
+ # class, but should be faster in a case statement or an array comparison.
9746
+ #
9747
+ # def self.type: () -> Symbol
9748
+ def self.type
9749
+ :local_variable_and_write_node
9750
+ end
8901
9751
  end
8902
9752
 
8903
9753
  # Represents assigning to a local variable using an operator that isn't `=`.
@@ -9004,6 +9854,16 @@ module Prism
9004
9854
  def type
9005
9855
  :local_variable_operator_write_node
9006
9856
  end
9857
+
9858
+ # Similar to #type, this method returns a symbol that you can use for
9859
+ # splitting on the type of the node without having to do a long === chain.
9860
+ # Note that like #type, it will still be slower than using == for a single
9861
+ # class, but should be faster in a case statement or an array comparison.
9862
+ #
9863
+ # def self.type: () -> Symbol
9864
+ def self.type
9865
+ :local_variable_operator_write_node
9866
+ end
9007
9867
  end
9008
9868
 
9009
9869
  # Represents the use of the `||=` operator for assignment to a local variable.
@@ -9109,6 +9969,16 @@ module Prism
9109
9969
  def type
9110
9970
  :local_variable_or_write_node
9111
9971
  end
9972
+
9973
+ # Similar to #type, this method returns a symbol that you can use for
9974
+ # splitting on the type of the node without having to do a long === chain.
9975
+ # Note that like #type, it will still be slower than using == for a single
9976
+ # class, but should be faster in a case statement or an array comparison.
9977
+ #
9978
+ # def self.type: () -> Symbol
9979
+ def self.type
9980
+ :local_variable_or_write_node
9981
+ end
9112
9982
  end
9113
9983
 
9114
9984
  # Represents reading a local variable. Note that this requires that a local
@@ -9192,6 +10062,16 @@ module Prism
9192
10062
  def type
9193
10063
  :local_variable_read_node
9194
10064
  end
10065
+
10066
+ # Similar to #type, this method returns a symbol that you can use for
10067
+ # splitting on the type of the node without having to do a long === chain.
10068
+ # Note that like #type, it will still be slower than using == for a single
10069
+ # class, but should be faster in a case statement or an array comparison.
10070
+ #
10071
+ # def self.type: () -> Symbol
10072
+ def self.type
10073
+ :local_variable_read_node
10074
+ end
9195
10075
  end
9196
10076
 
9197
10077
  # Represents writing to a local variable in a context that doesn't have an explicit value.
@@ -9273,6 +10153,16 @@ module Prism
9273
10153
  def type
9274
10154
  :local_variable_target_node
9275
10155
  end
10156
+
10157
+ # Similar to #type, this method returns a symbol that you can use for
10158
+ # splitting on the type of the node without having to do a long === chain.
10159
+ # Note that like #type, it will still be slower than using == for a single
10160
+ # class, but should be faster in a case statement or an array comparison.
10161
+ #
10162
+ # def self.type: () -> Symbol
10163
+ def self.type
10164
+ :local_variable_target_node
10165
+ end
9276
10166
  end
9277
10167
 
9278
10168
  # Represents writing to a local variable.
@@ -9378,6 +10268,16 @@ module Prism
9378
10268
  def type
9379
10269
  :local_variable_write_node
9380
10270
  end
10271
+
10272
+ # Similar to #type, this method returns a symbol that you can use for
10273
+ # splitting on the type of the node without having to do a long === chain.
10274
+ # Note that like #type, it will still be slower than using == for a single
10275
+ # class, but should be faster in a case statement or an array comparison.
10276
+ #
10277
+ # def self.type: () -> Symbol
10278
+ def self.type
10279
+ :local_variable_write_node
10280
+ end
9381
10281
  end
9382
10282
 
9383
10283
  # Represents a regular expression literal used in the predicate of a
@@ -9482,6 +10382,11 @@ module Prism
9482
10382
  flags.anybits?(RegularExpressionFlags::MULTI_LINE)
9483
10383
  end
9484
10384
 
10385
+ # def once?: () -> bool
10386
+ def once?
10387
+ flags.anybits?(RegularExpressionFlags::ONCE)
10388
+ end
10389
+
9485
10390
  # def euc_jp?: () -> bool
9486
10391
  def euc_jp?
9487
10392
  flags.anybits?(RegularExpressionFlags::EUC_JP)
@@ -9502,18 +10407,13 @@ module Prism
9502
10407
  flags.anybits?(RegularExpressionFlags::UTF_8)
9503
10408
  end
9504
10409
 
9505
- # def once?: () -> bool
9506
- def once?
9507
- flags.anybits?(RegularExpressionFlags::ONCE)
9508
- end
9509
-
9510
10410
  def inspect(inspector = NodeInspector.new)
9511
10411
  inspector << inspector.header(self)
9512
10412
  inspector << "├── opening_loc: #{inspector.location(opening_loc)}\n"
9513
10413
  inspector << "├── content_loc: #{inspector.location(content_loc)}\n"
9514
10414
  inspector << "├── closing_loc: #{inspector.location(closing_loc)}\n"
9515
10415
  inspector << "├── unescaped: #{unescaped.inspect}\n"
9516
- flags = [("ignore_case" if ignore_case?), ("extended" if extended?), ("multi_line" if multi_line?), ("euc_jp" if euc_jp?), ("ascii_8bit" if ascii_8bit?), ("windows_31j" if windows_31j?), ("utf_8" if utf_8?), ("once" if once?)].compact
10416
+ flags = [("ignore_case" if ignore_case?), ("extended" if extended?), ("multi_line" if multi_line?), ("once" if once?), ("euc_jp" if euc_jp?), ("ascii_8bit" if ascii_8bit?), ("windows_31j" if windows_31j?), ("utf_8" if utf_8?)].compact
9517
10417
  inspector << "└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n"
9518
10418
  inspector.to_str
9519
10419
  end
@@ -9535,6 +10435,16 @@ module Prism
9535
10435
  def type
9536
10436
  :match_last_line_node
9537
10437
  end
10438
+
10439
+ # Similar to #type, this method returns a symbol that you can use for
10440
+ # splitting on the type of the node without having to do a long === chain.
10441
+ # Note that like #type, it will still be slower than using == for a single
10442
+ # class, but should be faster in a case statement or an array comparison.
10443
+ #
10444
+ # def self.type: () -> Symbol
10445
+ def self.type
10446
+ :match_last_line_node
10447
+ end
9538
10448
  end
9539
10449
 
9540
10450
  # Represents the use of the modifier `in` operator.
@@ -9629,6 +10539,16 @@ module Prism
9629
10539
  def type
9630
10540
  :match_predicate_node
9631
10541
  end
10542
+
10543
+ # Similar to #type, this method returns a symbol that you can use for
10544
+ # splitting on the type of the node without having to do a long === chain.
10545
+ # Note that like #type, it will still be slower than using == for a single
10546
+ # class, but should be faster in a case statement or an array comparison.
10547
+ #
10548
+ # def self.type: () -> Symbol
10549
+ def self.type
10550
+ :match_predicate_node
10551
+ end
9632
10552
  end
9633
10553
 
9634
10554
  # Represents the use of the `=>` operator.
@@ -9723,6 +10643,16 @@ module Prism
9723
10643
  def type
9724
10644
  :match_required_node
9725
10645
  end
10646
+
10647
+ # Similar to #type, this method returns a symbol that you can use for
10648
+ # splitting on the type of the node without having to do a long === chain.
10649
+ # Note that like #type, it will still be slower than using == for a single
10650
+ # class, but should be faster in a case statement or an array comparison.
10651
+ #
10652
+ # def self.type: () -> Symbol
10653
+ def self.type
10654
+ :match_required_node
10655
+ end
9726
10656
  end
9727
10657
 
9728
10658
  # Represents writing local variables using a regular expression match with
@@ -9806,6 +10736,16 @@ module Prism
9806
10736
  def type
9807
10737
  :match_write_node
9808
10738
  end
10739
+
10740
+ # Similar to #type, this method returns a symbol that you can use for
10741
+ # splitting on the type of the node without having to do a long === chain.
10742
+ # Note that like #type, it will still be slower than using == for a single
10743
+ # class, but should be faster in a case statement or an array comparison.
10744
+ #
10745
+ # def self.type: () -> Symbol
10746
+ def self.type
10747
+ :match_write_node
10748
+ end
9809
10749
  end
9810
10750
 
9811
10751
  # Represents a node that is missing from the source and results in a syntax
@@ -9873,6 +10813,16 @@ module Prism
9873
10813
  def type
9874
10814
  :missing_node
9875
10815
  end
10816
+
10817
+ # Similar to #type, this method returns a symbol that you can use for
10818
+ # splitting on the type of the node without having to do a long === chain.
10819
+ # Note that like #type, it will still be slower than using == for a single
10820
+ # class, but should be faster in a case statement or an array comparison.
10821
+ #
10822
+ # def self.type: () -> Symbol
10823
+ def self.type
10824
+ :missing_node
10825
+ end
9876
10826
  end
9877
10827
 
9878
10828
  # Represents a module declaration involving the `module` keyword.
@@ -9997,6 +10947,16 @@ module Prism
9997
10947
  def type
9998
10948
  :module_node
9999
10949
  end
10950
+
10951
+ # Similar to #type, this method returns a symbol that you can use for
10952
+ # splitting on the type of the node without having to do a long === chain.
10953
+ # Note that like #type, it will still be slower than using == for a single
10954
+ # class, but should be faster in a case statement or an array comparison.
10955
+ #
10956
+ # def self.type: () -> Symbol
10957
+ def self.type
10958
+ :module_node
10959
+ end
10000
10960
  end
10001
10961
 
10002
10962
  # Represents a multi-target expression.
@@ -10094,6 +11054,16 @@ module Prism
10094
11054
  def type
10095
11055
  :multi_target_node
10096
11056
  end
11057
+
11058
+ # Similar to #type, this method returns a symbol that you can use for
11059
+ # splitting on the type of the node without having to do a long === chain.
11060
+ # Note that like #type, it will still be slower than using == for a single
11061
+ # class, but should be faster in a case statement or an array comparison.
11062
+ #
11063
+ # def self.type: () -> Symbol
11064
+ def self.type
11065
+ :multi_target_node
11066
+ end
10097
11067
  end
10098
11068
 
10099
11069
  # Represents a write to a multi-target expression.
@@ -10209,6 +11179,16 @@ module Prism
10209
11179
  def type
10210
11180
  :multi_write_node
10211
11181
  end
11182
+
11183
+ # Similar to #type, this method returns a symbol that you can use for
11184
+ # splitting on the type of the node without having to do a long === chain.
11185
+ # Note that like #type, it will still be slower than using == for a single
11186
+ # class, but should be faster in a case statement or an array comparison.
11187
+ #
11188
+ # def self.type: () -> Symbol
11189
+ def self.type
11190
+ :multi_write_node
11191
+ end
10212
11192
  end
10213
11193
 
10214
11194
  # Represents the use of the `next` keyword.
@@ -10302,6 +11282,16 @@ module Prism
10302
11282
  def type
10303
11283
  :next_node
10304
11284
  end
11285
+
11286
+ # Similar to #type, this method returns a symbol that you can use for
11287
+ # splitting on the type of the node without having to do a long === chain.
11288
+ # Note that like #type, it will still be slower than using == for a single
11289
+ # class, but should be faster in a case statement or an array comparison.
11290
+ #
11291
+ # def self.type: () -> Symbol
11292
+ def self.type
11293
+ :next_node
11294
+ end
10305
11295
  end
10306
11296
 
10307
11297
  # Represents the use of the `nil` keyword.
@@ -10371,6 +11361,16 @@ module Prism
10371
11361
  def type
10372
11362
  :nil_node
10373
11363
  end
11364
+
11365
+ # Similar to #type, this method returns a symbol that you can use for
11366
+ # splitting on the type of the node without having to do a long === chain.
11367
+ # Note that like #type, it will still be slower than using == for a single
11368
+ # class, but should be faster in a case statement or an array comparison.
11369
+ #
11370
+ # def self.type: () -> Symbol
11371
+ def self.type
11372
+ :nil_node
11373
+ end
10374
11374
  end
10375
11375
 
10376
11376
  # Represents the use of `**nil` inside method arguments.
@@ -10463,6 +11463,16 @@ module Prism
10463
11463
  def type
10464
11464
  :no_keywords_parameter_node
10465
11465
  end
11466
+
11467
+ # Similar to #type, this method returns a symbol that you can use for
11468
+ # splitting on the type of the node without having to do a long === chain.
11469
+ # Note that like #type, it will still be slower than using == for a single
11470
+ # class, but should be faster in a case statement or an array comparison.
11471
+ #
11472
+ # def self.type: () -> Symbol
11473
+ def self.type
11474
+ :no_keywords_parameter_node
11475
+ end
10466
11476
  end
10467
11477
 
10468
11478
  # Represents reading a numbered reference to a capture in the previous match.
@@ -10538,6 +11548,16 @@ module Prism
10538
11548
  def type
10539
11549
  :numbered_reference_read_node
10540
11550
  end
11551
+
11552
+ # Similar to #type, this method returns a symbol that you can use for
11553
+ # splitting on the type of the node without having to do a long === chain.
11554
+ # Note that like #type, it will still be slower than using == for a single
11555
+ # class, but should be faster in a case statement or an array comparison.
11556
+ #
11557
+ # def self.type: () -> Symbol
11558
+ def self.type
11559
+ :numbered_reference_read_node
11560
+ end
10541
11561
  end
10542
11562
 
10543
11563
  # Represents an optional parameter to a method, block, or lambda definition.
@@ -10638,6 +11658,16 @@ module Prism
10638
11658
  def type
10639
11659
  :optional_parameter_node
10640
11660
  end
11661
+
11662
+ # Similar to #type, this method returns a symbol that you can use for
11663
+ # splitting on the type of the node without having to do a long === chain.
11664
+ # Note that like #type, it will still be slower than using == for a single
11665
+ # class, but should be faster in a case statement or an array comparison.
11666
+ #
11667
+ # def self.type: () -> Symbol
11668
+ def self.type
11669
+ :optional_parameter_node
11670
+ end
10641
11671
  end
10642
11672
 
10643
11673
  # Represents the use of the `||` operator or the `or` keyword.
@@ -10732,6 +11762,16 @@ module Prism
10732
11762
  def type
10733
11763
  :or_node
10734
11764
  end
11765
+
11766
+ # Similar to #type, this method returns a symbol that you can use for
11767
+ # splitting on the type of the node without having to do a long === chain.
11768
+ # Note that like #type, it will still be slower than using == for a single
11769
+ # class, but should be faster in a case statement or an array comparison.
11770
+ #
11771
+ # def self.type: () -> Symbol
11772
+ def self.type
11773
+ :or_node
11774
+ end
10735
11775
  end
10736
11776
 
10737
11777
  # Represents the list of parameters on a method, block, or lambda definition.
@@ -10867,6 +11907,16 @@ module Prism
10867
11907
  def type
10868
11908
  :parameters_node
10869
11909
  end
11910
+
11911
+ # Similar to #type, this method returns a symbol that you can use for
11912
+ # splitting on the type of the node without having to do a long === chain.
11913
+ # Note that like #type, it will still be slower than using == for a single
11914
+ # class, but should be faster in a case statement or an array comparison.
11915
+ #
11916
+ # def self.type: () -> Symbol
11917
+ def self.type
11918
+ :parameters_node
11919
+ end
10870
11920
  end
10871
11921
 
10872
11922
  # Represents a parenthesized expression
@@ -10975,6 +12025,16 @@ module Prism
10975
12025
  def type
10976
12026
  :parentheses_node
10977
12027
  end
12028
+
12029
+ # Similar to #type, this method returns a symbol that you can use for
12030
+ # splitting on the type of the node without having to do a long === chain.
12031
+ # Note that like #type, it will still be slower than using == for a single
12032
+ # class, but should be faster in a case statement or an array comparison.
12033
+ #
12034
+ # def self.type: () -> Symbol
12035
+ def self.type
12036
+ :parentheses_node
12037
+ end
10978
12038
  end
10979
12039
 
10980
12040
  # Represents the use of the `^` operator for pinning an expression in a
@@ -11085,6 +12145,16 @@ module Prism
11085
12145
  def type
11086
12146
  :pinned_expression_node
11087
12147
  end
12148
+
12149
+ # Similar to #type, this method returns a symbol that you can use for
12150
+ # splitting on the type of the node without having to do a long === chain.
12151
+ # Note that like #type, it will still be slower than using == for a single
12152
+ # class, but should be faster in a case statement or an array comparison.
12153
+ #
12154
+ # def self.type: () -> Symbol
12155
+ def self.type
12156
+ :pinned_expression_node
12157
+ end
11088
12158
  end
11089
12159
 
11090
12160
  # Represents the use of the `^` operator for pinning a variable in a pattern
@@ -11173,6 +12243,16 @@ module Prism
11173
12243
  def type
11174
12244
  :pinned_variable_node
11175
12245
  end
12246
+
12247
+ # Similar to #type, this method returns a symbol that you can use for
12248
+ # splitting on the type of the node without having to do a long === chain.
12249
+ # Note that like #type, it will still be slower than using == for a single
12250
+ # class, but should be faster in a case statement or an array comparison.
12251
+ #
12252
+ # def self.type: () -> Symbol
12253
+ def self.type
12254
+ :pinned_variable_node
12255
+ end
11176
12256
  end
11177
12257
 
11178
12258
  # Represents the use of the `END` keyword.
@@ -11288,6 +12368,16 @@ module Prism
11288
12368
  def type
11289
12369
  :post_execution_node
11290
12370
  end
12371
+
12372
+ # Similar to #type, this method returns a symbol that you can use for
12373
+ # splitting on the type of the node without having to do a long === chain.
12374
+ # Note that like #type, it will still be slower than using == for a single
12375
+ # class, but should be faster in a case statement or an array comparison.
12376
+ #
12377
+ # def self.type: () -> Symbol
12378
+ def self.type
12379
+ :post_execution_node
12380
+ end
11291
12381
  end
11292
12382
 
11293
12383
  # Represents the use of the `BEGIN` keyword.
@@ -11403,6 +12493,16 @@ module Prism
11403
12493
  def type
11404
12494
  :pre_execution_node
11405
12495
  end
12496
+
12497
+ # Similar to #type, this method returns a symbol that you can use for
12498
+ # splitting on the type of the node without having to do a long === chain.
12499
+ # Note that like #type, it will still be slower than using == for a single
12500
+ # class, but should be faster in a case statement or an array comparison.
12501
+ #
12502
+ # def self.type: () -> Symbol
12503
+ def self.type
12504
+ :pre_execution_node
12505
+ end
11406
12506
  end
11407
12507
 
11408
12508
  # The top level node of any parse tree.
@@ -11482,6 +12582,16 @@ module Prism
11482
12582
  def type
11483
12583
  :program_node
11484
12584
  end
12585
+
12586
+ # Similar to #type, this method returns a symbol that you can use for
12587
+ # splitting on the type of the node without having to do a long === chain.
12588
+ # Note that like #type, it will still be slower than using == for a single
12589
+ # class, but should be faster in a case statement or an array comparison.
12590
+ #
12591
+ # def self.type: () -> Symbol
12592
+ def self.type
12593
+ :program_node
12594
+ end
11485
12595
  end
11486
12596
 
11487
12597
  # Represents the use of the `..` or `...` operators.
@@ -11602,6 +12712,16 @@ module Prism
11602
12712
  def type
11603
12713
  :range_node
11604
12714
  end
12715
+
12716
+ # Similar to #type, this method returns a symbol that you can use for
12717
+ # splitting on the type of the node without having to do a long === chain.
12718
+ # Note that like #type, it will still be slower than using == for a single
12719
+ # class, but should be faster in a case statement or an array comparison.
12720
+ #
12721
+ # def self.type: () -> Symbol
12722
+ def self.type
12723
+ :range_node
12724
+ end
11605
12725
  end
11606
12726
 
11607
12727
  # Represents a rational number literal.
@@ -11678,6 +12798,16 @@ module Prism
11678
12798
  def type
11679
12799
  :rational_node
11680
12800
  end
12801
+
12802
+ # Similar to #type, this method returns a symbol that you can use for
12803
+ # splitting on the type of the node without having to do a long === chain.
12804
+ # Note that like #type, it will still be slower than using == for a single
12805
+ # class, but should be faster in a case statement or an array comparison.
12806
+ #
12807
+ # def self.type: () -> Symbol
12808
+ def self.type
12809
+ :rational_node
12810
+ end
11681
12811
  end
11682
12812
 
11683
12813
  # Represents the use of the `redo` keyword.
@@ -11747,6 +12877,16 @@ module Prism
11747
12877
  def type
11748
12878
  :redo_node
11749
12879
  end
12880
+
12881
+ # Similar to #type, this method returns a symbol that you can use for
12882
+ # splitting on the type of the node without having to do a long === chain.
12883
+ # Note that like #type, it will still be slower than using == for a single
12884
+ # class, but should be faster in a case statement or an array comparison.
12885
+ #
12886
+ # def self.type: () -> Symbol
12887
+ def self.type
12888
+ :redo_node
12889
+ end
11750
12890
  end
11751
12891
 
11752
12892
  # Represents a regular expression literal with no interpolation.
@@ -11849,6 +12989,11 @@ module Prism
11849
12989
  flags.anybits?(RegularExpressionFlags::MULTI_LINE)
11850
12990
  end
11851
12991
 
12992
+ # def once?: () -> bool
12993
+ def once?
12994
+ flags.anybits?(RegularExpressionFlags::ONCE)
12995
+ end
12996
+
11852
12997
  # def euc_jp?: () -> bool
11853
12998
  def euc_jp?
11854
12999
  flags.anybits?(RegularExpressionFlags::EUC_JP)
@@ -11869,18 +13014,13 @@ module Prism
11869
13014
  flags.anybits?(RegularExpressionFlags::UTF_8)
11870
13015
  end
11871
13016
 
11872
- # def once?: () -> bool
11873
- def once?
11874
- flags.anybits?(RegularExpressionFlags::ONCE)
11875
- end
11876
-
11877
13017
  def inspect(inspector = NodeInspector.new)
11878
13018
  inspector << inspector.header(self)
11879
13019
  inspector << "├── opening_loc: #{inspector.location(opening_loc)}\n"
11880
13020
  inspector << "├── content_loc: #{inspector.location(content_loc)}\n"
11881
13021
  inspector << "├── closing_loc: #{inspector.location(closing_loc)}\n"
11882
13022
  inspector << "├── unescaped: #{unescaped.inspect}\n"
11883
- flags = [("ignore_case" if ignore_case?), ("extended" if extended?), ("multi_line" if multi_line?), ("euc_jp" if euc_jp?), ("ascii_8bit" if ascii_8bit?), ("windows_31j" if windows_31j?), ("utf_8" if utf_8?), ("once" if once?)].compact
13023
+ flags = [("ignore_case" if ignore_case?), ("extended" if extended?), ("multi_line" if multi_line?), ("once" if once?), ("euc_jp" if euc_jp?), ("ascii_8bit" if ascii_8bit?), ("windows_31j" if windows_31j?), ("utf_8" if utf_8?)].compact
11884
13024
  inspector << "└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n"
11885
13025
  inspector.to_str
11886
13026
  end
@@ -11902,6 +13042,16 @@ module Prism
11902
13042
  def type
11903
13043
  :regular_expression_node
11904
13044
  end
13045
+
13046
+ # Similar to #type, this method returns a symbol that you can use for
13047
+ # splitting on the type of the node without having to do a long === chain.
13048
+ # Note that like #type, it will still be slower than using == for a single
13049
+ # class, but should be faster in a case statement or an array comparison.
13050
+ #
13051
+ # def self.type: () -> Symbol
13052
+ def self.type
13053
+ :regular_expression_node
13054
+ end
11905
13055
  end
11906
13056
 
11907
13057
  # Represents a destructured required parameter node.
@@ -12000,6 +13150,16 @@ module Prism
12000
13150
  def type
12001
13151
  :required_destructured_parameter_node
12002
13152
  end
13153
+
13154
+ # Similar to #type, this method returns a symbol that you can use for
13155
+ # splitting on the type of the node without having to do a long === chain.
13156
+ # Note that like #type, it will still be slower than using == for a single
13157
+ # class, but should be faster in a case statement or an array comparison.
13158
+ #
13159
+ # def self.type: () -> Symbol
13160
+ def self.type
13161
+ :required_destructured_parameter_node
13162
+ end
12003
13163
  end
12004
13164
 
12005
13165
  # Represents a required parameter to a method, block, or lambda definition.
@@ -12076,6 +13236,16 @@ module Prism
12076
13236
  def type
12077
13237
  :required_parameter_node
12078
13238
  end
13239
+
13240
+ # Similar to #type, this method returns a symbol that you can use for
13241
+ # splitting on the type of the node without having to do a long === chain.
13242
+ # Note that like #type, it will still be slower than using == for a single
13243
+ # class, but should be faster in a case statement or an array comparison.
13244
+ #
13245
+ # def self.type: () -> Symbol
13246
+ def self.type
13247
+ :required_parameter_node
13248
+ end
12079
13249
  end
12080
13250
 
12081
13251
  # Represents an expression modified with a rescue.
@@ -12174,6 +13344,16 @@ module Prism
12174
13344
  def type
12175
13345
  :rescue_modifier_node
12176
13346
  end
13347
+
13348
+ # Similar to #type, this method returns a symbol that you can use for
13349
+ # splitting on the type of the node without having to do a long === chain.
13350
+ # Note that like #type, it will still be slower than using == for a single
13351
+ # class, but should be faster in a case statement or an array comparison.
13352
+ #
13353
+ # def self.type: () -> Symbol
13354
+ def self.type
13355
+ :rescue_modifier_node
13356
+ end
12177
13357
  end
12178
13358
 
12179
13359
  # Represents a rescue statement.
@@ -12315,6 +13495,16 @@ module Prism
12315
13495
  def type
12316
13496
  :rescue_node
12317
13497
  end
13498
+
13499
+ # Similar to #type, this method returns a symbol that you can use for
13500
+ # splitting on the type of the node without having to do a long === chain.
13501
+ # Note that like #type, it will still be slower than using == for a single
13502
+ # class, but should be faster in a case statement or an array comparison.
13503
+ #
13504
+ # def self.type: () -> Symbol
13505
+ def self.type
13506
+ :rescue_node
13507
+ end
12318
13508
  end
12319
13509
 
12320
13510
  # Represents a rest parameter to a method, block, or lambda definition.
@@ -12408,6 +13598,16 @@ module Prism
12408
13598
  def type
12409
13599
  :rest_parameter_node
12410
13600
  end
13601
+
13602
+ # Similar to #type, this method returns a symbol that you can use for
13603
+ # splitting on the type of the node without having to do a long === chain.
13604
+ # Note that like #type, it will still be slower than using == for a single
13605
+ # class, but should be faster in a case statement or an array comparison.
13606
+ #
13607
+ # def self.type: () -> Symbol
13608
+ def self.type
13609
+ :rest_parameter_node
13610
+ end
12411
13611
  end
12412
13612
 
12413
13613
  # Represents the use of the `retry` keyword.
@@ -12477,6 +13677,16 @@ module Prism
12477
13677
  def type
12478
13678
  :retry_node
12479
13679
  end
13680
+
13681
+ # Similar to #type, this method returns a symbol that you can use for
13682
+ # splitting on the type of the node without having to do a long === chain.
13683
+ # Note that like #type, it will still be slower than using == for a single
13684
+ # class, but should be faster in a case statement or an array comparison.
13685
+ #
13686
+ # def self.type: () -> Symbol
13687
+ def self.type
13688
+ :retry_node
13689
+ end
12480
13690
  end
12481
13691
 
12482
13692
  # Represents the use of the `return` keyword.
@@ -12570,6 +13780,16 @@ module Prism
12570
13780
  def type
12571
13781
  :return_node
12572
13782
  end
13783
+
13784
+ # Similar to #type, this method returns a symbol that you can use for
13785
+ # splitting on the type of the node without having to do a long === chain.
13786
+ # Note that like #type, it will still be slower than using == for a single
13787
+ # class, but should be faster in a case statement or an array comparison.
13788
+ #
13789
+ # def self.type: () -> Symbol
13790
+ def self.type
13791
+ :return_node
13792
+ end
12573
13793
  end
12574
13794
 
12575
13795
  # Represents the `self` keyword.
@@ -12639,6 +13859,16 @@ module Prism
12639
13859
  def type
12640
13860
  :self_node
12641
13861
  end
13862
+
13863
+ # Similar to #type, this method returns a symbol that you can use for
13864
+ # splitting on the type of the node without having to do a long === chain.
13865
+ # Note that like #type, it will still be slower than using == for a single
13866
+ # class, but should be faster in a case statement or an array comparison.
13867
+ #
13868
+ # def self.type: () -> Symbol
13869
+ def self.type
13870
+ :self_node
13871
+ end
12642
13872
  end
12643
13873
 
12644
13874
  # Represents a singleton class declaration involving the `class` keyword.
@@ -12768,6 +13998,16 @@ module Prism
12768
13998
  def type
12769
13999
  :singleton_class_node
12770
14000
  end
14001
+
14002
+ # Similar to #type, this method returns a symbol that you can use for
14003
+ # splitting on the type of the node without having to do a long === chain.
14004
+ # Note that like #type, it will still be slower than using == for a single
14005
+ # class, but should be faster in a case statement or an array comparison.
14006
+ #
14007
+ # def self.type: () -> Symbol
14008
+ def self.type
14009
+ :singleton_class_node
14010
+ end
12771
14011
  end
12772
14012
 
12773
14013
  # Represents the use of the `__ENCODING__` keyword.
@@ -12837,6 +14077,16 @@ module Prism
12837
14077
  def type
12838
14078
  :source_encoding_node
12839
14079
  end
14080
+
14081
+ # Similar to #type, this method returns a symbol that you can use for
14082
+ # splitting on the type of the node without having to do a long === chain.
14083
+ # Note that like #type, it will still be slower than using == for a single
14084
+ # class, but should be faster in a case statement or an array comparison.
14085
+ #
14086
+ # def self.type: () -> Symbol
14087
+ def self.type
14088
+ :source_encoding_node
14089
+ end
12840
14090
  end
12841
14091
 
12842
14092
  # Represents the use of the `__FILE__` keyword.
@@ -12912,6 +14162,16 @@ module Prism
12912
14162
  def type
12913
14163
  :source_file_node
12914
14164
  end
14165
+
14166
+ # Similar to #type, this method returns a symbol that you can use for
14167
+ # splitting on the type of the node without having to do a long === chain.
14168
+ # Note that like #type, it will still be slower than using == for a single
14169
+ # class, but should be faster in a case statement or an array comparison.
14170
+ #
14171
+ # def self.type: () -> Symbol
14172
+ def self.type
14173
+ :source_file_node
14174
+ end
12915
14175
  end
12916
14176
 
12917
14177
  # Represents the use of the `__LINE__` keyword.
@@ -12981,6 +14241,16 @@ module Prism
12981
14241
  def type
12982
14242
  :source_line_node
12983
14243
  end
14244
+
14245
+ # Similar to #type, this method returns a symbol that you can use for
14246
+ # splitting on the type of the node without having to do a long === chain.
14247
+ # Note that like #type, it will still be slower than using == for a single
14248
+ # class, but should be faster in a case statement or an array comparison.
14249
+ #
14250
+ # def self.type: () -> Symbol
14251
+ def self.type
14252
+ :source_line_node
14253
+ end
12984
14254
  end
12985
14255
 
12986
14256
  # Represents the use of the splat operator.
@@ -13074,6 +14344,16 @@ module Prism
13074
14344
  def type
13075
14345
  :splat_node
13076
14346
  end
14347
+
14348
+ # Similar to #type, this method returns a symbol that you can use for
14349
+ # splitting on the type of the node without having to do a long === chain.
14350
+ # Note that like #type, it will still be slower than using == for a single
14351
+ # class, but should be faster in a case statement or an array comparison.
14352
+ #
14353
+ # def self.type: () -> Symbol
14354
+ def self.type
14355
+ :splat_node
14356
+ end
13077
14357
  end
13078
14358
 
13079
14359
  # Represents a set of statements contained within some scope.
@@ -13149,6 +14429,16 @@ module Prism
13149
14429
  def type
13150
14430
  :statements_node
13151
14431
  end
14432
+
14433
+ # Similar to #type, this method returns a symbol that you can use for
14434
+ # splitting on the type of the node without having to do a long === chain.
14435
+ # Note that like #type, it will still be slower than using == for a single
14436
+ # class, but should be faster in a case statement or an array comparison.
14437
+ #
14438
+ # def self.type: () -> Symbol
14439
+ def self.type
14440
+ :statements_node
14441
+ end
13152
14442
  end
13153
14443
 
13154
14444
  # Represents the use of compile-time string concatenation.
@@ -13232,6 +14522,16 @@ module Prism
13232
14522
  def type
13233
14523
  :string_concat_node
13234
14524
  end
14525
+
14526
+ # Similar to #type, this method returns a symbol that you can use for
14527
+ # splitting on the type of the node without having to do a long === chain.
14528
+ # Note that like #type, it will still be slower than using == for a single
14529
+ # class, but should be faster in a case statement or an array comparison.
14530
+ #
14531
+ # def self.type: () -> Symbol
14532
+ def self.type
14533
+ :string_concat_node
14534
+ end
13235
14535
  end
13236
14536
 
13237
14537
  # Represents a string literal, a string contained within a `%w` list, or
@@ -13359,6 +14659,16 @@ module Prism
13359
14659
  def type
13360
14660
  :string_node
13361
14661
  end
14662
+
14663
+ # Similar to #type, this method returns a symbol that you can use for
14664
+ # splitting on the type of the node without having to do a long === chain.
14665
+ # Note that like #type, it will still be slower than using == for a single
14666
+ # class, but should be faster in a case statement or an array comparison.
14667
+ #
14668
+ # def self.type: () -> Symbol
14669
+ def self.type
14670
+ :string_node
14671
+ end
13362
14672
  end
13363
14673
 
13364
14674
  # Represents the use of the `super` keyword with parentheses or arguments.
@@ -13489,6 +14799,16 @@ module Prism
13489
14799
  def type
13490
14800
  :super_node
13491
14801
  end
14802
+
14803
+ # Similar to #type, this method returns a symbol that you can use for
14804
+ # splitting on the type of the node without having to do a long === chain.
14805
+ # Note that like #type, it will still be slower than using == for a single
14806
+ # class, but should be faster in a case statement or an array comparison.
14807
+ #
14808
+ # def self.type: () -> Symbol
14809
+ def self.type
14810
+ :super_node
14811
+ end
13492
14812
  end
13493
14813
 
13494
14814
  # Represents a symbol literal or a symbol contained within a `%i` list.
@@ -13600,6 +14920,16 @@ module Prism
13600
14920
  def type
13601
14921
  :symbol_node
13602
14922
  end
14923
+
14924
+ # Similar to #type, this method returns a symbol that you can use for
14925
+ # splitting on the type of the node without having to do a long === chain.
14926
+ # Note that like #type, it will still be slower than using == for a single
14927
+ # class, but should be faster in a case statement or an array comparison.
14928
+ #
14929
+ # def self.type: () -> Symbol
14930
+ def self.type
14931
+ :symbol_node
14932
+ end
13603
14933
  end
13604
14934
 
13605
14935
  # Represents the use of the literal `true` keyword.
@@ -13669,6 +14999,16 @@ module Prism
13669
14999
  def type
13670
15000
  :true_node
13671
15001
  end
15002
+
15003
+ # Similar to #type, this method returns a symbol that you can use for
15004
+ # splitting on the type of the node without having to do a long === chain.
15005
+ # Note that like #type, it will still be slower than using == for a single
15006
+ # class, but should be faster in a case statement or an array comparison.
15007
+ #
15008
+ # def self.type: () -> Symbol
15009
+ def self.type
15010
+ :true_node
15011
+ end
13672
15012
  end
13673
15013
 
13674
15014
  # Represents the use of the `undef` keyword.
@@ -13755,6 +15095,16 @@ module Prism
13755
15095
  def type
13756
15096
  :undef_node
13757
15097
  end
15098
+
15099
+ # Similar to #type, this method returns a symbol that you can use for
15100
+ # splitting on the type of the node without having to do a long === chain.
15101
+ # Note that like #type, it will still be slower than using == for a single
15102
+ # class, but should be faster in a case statement or an array comparison.
15103
+ #
15104
+ # def self.type: () -> Symbol
15105
+ def self.type
15106
+ :undef_node
15107
+ end
13758
15108
  end
13759
15109
 
13760
15110
  # Represents the use of the `unless` keyword, either in the block form or the modifier form.
@@ -13886,6 +15236,16 @@ module Prism
13886
15236
  def type
13887
15237
  :unless_node
13888
15238
  end
15239
+
15240
+ # Similar to #type, this method returns a symbol that you can use for
15241
+ # splitting on the type of the node without having to do a long === chain.
15242
+ # Note that like #type, it will still be slower than using == for a single
15243
+ # class, but should be faster in a case statement or an array comparison.
15244
+ #
15245
+ # def self.type: () -> Symbol
15246
+ def self.type
15247
+ :unless_node
15248
+ end
13889
15249
  end
13890
15250
 
13891
15251
  # Represents the use of the `until` keyword, either in the block form or the modifier form.
@@ -14017,6 +15377,16 @@ module Prism
14017
15377
  def type
14018
15378
  :until_node
14019
15379
  end
15380
+
15381
+ # Similar to #type, this method returns a symbol that you can use for
15382
+ # splitting on the type of the node without having to do a long === chain.
15383
+ # Note that like #type, it will still be slower than using == for a single
15384
+ # class, but should be faster in a case statement or an array comparison.
15385
+ #
15386
+ # def self.type: () -> Symbol
15387
+ def self.type
15388
+ :until_node
15389
+ end
14020
15390
  end
14021
15391
 
14022
15392
  # Represents the use of the `when` keyword within a case statement.
@@ -14119,6 +15489,16 @@ module Prism
14119
15489
  def type
14120
15490
  :when_node
14121
15491
  end
15492
+
15493
+ # Similar to #type, this method returns a symbol that you can use for
15494
+ # splitting on the type of the node without having to do a long === chain.
15495
+ # Note that like #type, it will still be slower than using == for a single
15496
+ # class, but should be faster in a case statement or an array comparison.
15497
+ #
15498
+ # def self.type: () -> Symbol
15499
+ def self.type
15500
+ :when_node
15501
+ end
14122
15502
  end
14123
15503
 
14124
15504
  # Represents the use of the `while` keyword, either in the block form or the modifier form.
@@ -14250,6 +15630,16 @@ module Prism
14250
15630
  def type
14251
15631
  :while_node
14252
15632
  end
15633
+
15634
+ # Similar to #type, this method returns a symbol that you can use for
15635
+ # splitting on the type of the node without having to do a long === chain.
15636
+ # Note that like #type, it will still be slower than using == for a single
15637
+ # class, but should be faster in a case statement or an array comparison.
15638
+ #
15639
+ # def self.type: () -> Symbol
15640
+ def self.type
15641
+ :while_node
15642
+ end
14253
15643
  end
14254
15644
 
14255
15645
  # Represents an xstring literal with no interpolation.
@@ -14358,6 +15748,16 @@ module Prism
14358
15748
  def type
14359
15749
  :x_string_node
14360
15750
  end
15751
+
15752
+ # Similar to #type, this method returns a symbol that you can use for
15753
+ # splitting on the type of the node without having to do a long === chain.
15754
+ # Note that like #type, it will still be slower than using == for a single
15755
+ # class, but should be faster in a case statement or an array comparison.
15756
+ #
15757
+ # def self.type: () -> Symbol
15758
+ def self.type
15759
+ :x_string_node
15760
+ end
14361
15761
  end
14362
15762
 
14363
15763
  # Represents the use of the `yield` keyword.
@@ -14473,6 +15873,16 @@ module Prism
14473
15873
  def type
14474
15874
  :yield_node
14475
15875
  end
15876
+
15877
+ # Similar to #type, this method returns a symbol that you can use for
15878
+ # splitting on the type of the node without having to do a long === chain.
15879
+ # Note that like #type, it will still be slower than using == for a single
15880
+ # class, but should be faster in a case statement or an array comparison.
15881
+ #
15882
+ # def self.type: () -> Symbol
15883
+ def self.type
15884
+ :yield_node
15885
+ end
14476
15886
  end
14477
15887
 
14478
15888
  module CallNodeFlags
@@ -14517,24 +15927,24 @@ module Prism
14517
15927
  # m - allows $ to match the end of lines within strings
14518
15928
  MULTI_LINE = 1 << 2
14519
15929
 
15930
+ # o - only interpolates values into the regular expression once
15931
+ ONCE = 1 << 3
15932
+
14520
15933
  # e - forces the EUC-JP encoding
14521
- EUC_JP = 1 << 3
15934
+ EUC_JP = 1 << 4
14522
15935
 
14523
15936
  # n - forces the ASCII-8BIT encoding
14524
- ASCII_8BIT = 1 << 4
15937
+ ASCII_8BIT = 1 << 5
14525
15938
 
14526
15939
  # s - forces the Windows-31J encoding
14527
- WINDOWS_31J = 1 << 5
15940
+ WINDOWS_31J = 1 << 6
14528
15941
 
14529
15942
  # u - forces the UTF-8 encoding
14530
- UTF_8 = 1 << 6
14531
-
14532
- # o - only interpolates values into the regular expression once
14533
- ONCE = 1 << 7
15943
+ UTF_8 = 1 << 7
14534
15944
  end
14535
15945
 
14536
15946
  module StringFlags
14537
- # frozen by virtue of a frozen_string_literal comment
15947
+ # frozen by virtue of a `frozen_string_literal` comment
14538
15948
  FROZEN = 1 << 0
14539
15949
  end
14540
15950
  end