yarp 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -0
- data/CONTRIBUTING.md +4 -0
- data/{Makefile.in → Makefile} +3 -4
- data/README.md +1 -1
- data/config.yml +29 -7
- data/docs/build_system.md +4 -15
- data/docs/building.md +1 -5
- data/docs/encoding.md +1 -0
- data/docs/{extension.md → ruby_api.md} +6 -3
- data/docs/serialization.md +71 -24
- data/ext/yarp/api_node.c +38 -6
- data/ext/yarp/extconf.rb +15 -10
- data/ext/yarp/extension.c +2 -0
- data/ext/yarp/extension.h +1 -1
- data/include/yarp/ast.h +108 -104
- data/include/yarp/defines.h +0 -15
- data/include/yarp/enc/yp_encoding.h +1 -0
- data/include/yarp/util/yp_buffer.h +1 -0
- data/include/yarp/util/yp_string.h +5 -1
- data/include/yarp/version.h +2 -3
- data/include/yarp.h +4 -2
- data/lib/yarp/ffi.rb +211 -0
- data/lib/yarp/lex_compat.rb +16 -2
- data/lib/yarp/node.rb +169 -117
- data/lib/yarp/ripper_compat.rb +3 -3
- data/lib/yarp/serialize.rb +285 -92
- data/lib/yarp.rb +167 -2
- data/src/enc/yp_unicode.c +9 -0
- data/src/node.c +22 -0
- data/src/prettyprint.c +49 -30
- data/src/serialize.c +90 -17
- data/src/util/yp_string.c +8 -17
- data/src/yarp.c +181 -49
- data/yarp.gemspec +5 -5
- metadata +6 -6
- data/config.h.in +0 -25
- data/configure +0 -4487
data/lib/yarp/node.rb
CHANGED
@@ -33,7 +33,6 @@ module YARP
|
|
33
33
|
visitor.visit_alias_node(self)
|
34
34
|
end
|
35
35
|
|
36
|
-
|
37
36
|
# def child_nodes: () -> Array[nil | Node]
|
38
37
|
def child_nodes
|
39
38
|
[new_name, old_name]
|
@@ -80,7 +79,6 @@ module YARP
|
|
80
79
|
visitor.visit_alternation_pattern_node(self)
|
81
80
|
end
|
82
81
|
|
83
|
-
|
84
82
|
# def child_nodes: () -> Array[nil | Node]
|
85
83
|
def child_nodes
|
86
84
|
[left, right]
|
@@ -127,7 +125,6 @@ module YARP
|
|
127
125
|
visitor.visit_and_node(self)
|
128
126
|
end
|
129
127
|
|
130
|
-
|
131
128
|
# def child_nodes: () -> Array[nil | Node]
|
132
129
|
def child_nodes
|
133
130
|
[left, right]
|
@@ -166,7 +163,6 @@ module YARP
|
|
166
163
|
visitor.visit_arguments_node(self)
|
167
164
|
end
|
168
165
|
|
169
|
-
|
170
166
|
# def child_nodes: () -> Array[nil | Node]
|
171
167
|
def child_nodes
|
172
168
|
[*arguments]
|
@@ -209,7 +205,6 @@ module YARP
|
|
209
205
|
visitor.visit_array_node(self)
|
210
206
|
end
|
211
207
|
|
212
|
-
|
213
208
|
# def child_nodes: () -> Array[nil | Node]
|
214
209
|
def child_nodes
|
215
210
|
[*elements]
|
@@ -285,7 +280,6 @@ module YARP
|
|
285
280
|
visitor.visit_array_pattern_node(self)
|
286
281
|
end
|
287
282
|
|
288
|
-
|
289
283
|
# def child_nodes: () -> Array[nil | Node]
|
290
284
|
def child_nodes
|
291
285
|
[constant, *requireds, rest, *posts]
|
@@ -337,7 +331,6 @@ module YARP
|
|
337
331
|
visitor.visit_assoc_node(self)
|
338
332
|
end
|
339
333
|
|
340
|
-
|
341
334
|
# def child_nodes: () -> Array[nil | Node]
|
342
335
|
def child_nodes
|
343
336
|
[key, value]
|
@@ -380,7 +373,6 @@ module YARP
|
|
380
373
|
visitor.visit_assoc_splat_node(self)
|
381
374
|
end
|
382
375
|
|
383
|
-
|
384
376
|
# def child_nodes: () -> Array[nil | Node]
|
385
377
|
def child_nodes
|
386
378
|
[value]
|
@@ -415,7 +407,6 @@ module YARP
|
|
415
407
|
visitor.visit_back_reference_read_node(self)
|
416
408
|
end
|
417
409
|
|
418
|
-
|
419
410
|
# def child_nodes: () -> Array[nil | Node]
|
420
411
|
def child_nodes
|
421
412
|
[]
|
@@ -522,7 +513,6 @@ module YARP
|
|
522
513
|
visitor.visit_block_argument_node(self)
|
523
514
|
end
|
524
515
|
|
525
|
-
|
526
516
|
# def child_nodes: () -> Array[nil | Node]
|
527
517
|
def child_nodes
|
528
518
|
[expression]
|
@@ -577,7 +567,6 @@ module YARP
|
|
577
567
|
visitor.visit_block_node(self)
|
578
568
|
end
|
579
569
|
|
580
|
-
|
581
570
|
# def child_nodes: () -> Array[nil | Node]
|
582
571
|
def child_nodes
|
583
572
|
[parameters, statements]
|
@@ -626,7 +615,6 @@ module YARP
|
|
626
615
|
visitor.visit_block_parameter_node(self)
|
627
616
|
end
|
628
617
|
|
629
|
-
|
630
618
|
# def child_nodes: () -> Array[nil | Node]
|
631
619
|
def child_nodes
|
632
620
|
[]
|
@@ -686,7 +674,6 @@ module YARP
|
|
686
674
|
visitor.visit_block_parameters_node(self)
|
687
675
|
end
|
688
676
|
|
689
|
-
|
690
677
|
# def child_nodes: () -> Array[nil | Node]
|
691
678
|
def child_nodes
|
692
679
|
[parameters]
|
@@ -734,7 +721,6 @@ module YARP
|
|
734
721
|
visitor.visit_break_node(self)
|
735
722
|
end
|
736
723
|
|
737
|
-
|
738
724
|
# def child_nodes: () -> Array[nil | Node]
|
739
725
|
def child_nodes
|
740
726
|
[arguments]
|
@@ -820,7 +806,6 @@ module YARP
|
|
820
806
|
visitor.visit_call_node(self)
|
821
807
|
end
|
822
808
|
|
823
|
-
|
824
809
|
# def child_nodes: () -> Array[nil | Node]
|
825
810
|
def child_nodes
|
826
811
|
[receiver, arguments, block]
|
@@ -853,6 +838,16 @@ module YARP
|
|
853
838
|
def closing
|
854
839
|
closing_loc&.slice
|
855
840
|
end
|
841
|
+
|
842
|
+
# def safe_navigation?: () -> bool
|
843
|
+
def safe_navigation?
|
844
|
+
flags.anybits?(CallNodeFlags::SAFE_NAVIGATION)
|
845
|
+
end
|
846
|
+
|
847
|
+
# def variable_call?: () -> bool
|
848
|
+
def variable_call?
|
849
|
+
flags.anybits?(CallNodeFlags::VARIABLE_CALL)
|
850
|
+
end
|
856
851
|
end
|
857
852
|
|
858
853
|
# Represents the use of the `&&=` operator on a call.
|
@@ -882,7 +877,6 @@ module YARP
|
|
882
877
|
visitor.visit_call_operator_and_write_node(self)
|
883
878
|
end
|
884
879
|
|
885
|
-
|
886
880
|
# def child_nodes: () -> Array[nil | Node]
|
887
881
|
def child_nodes
|
888
882
|
[target, value]
|
@@ -929,7 +923,6 @@ module YARP
|
|
929
923
|
visitor.visit_call_operator_or_write_node(self)
|
930
924
|
end
|
931
925
|
|
932
|
-
|
933
926
|
# def child_nodes: () -> Array[nil | Node]
|
934
927
|
def child_nodes
|
935
928
|
[target, value]
|
@@ -980,7 +973,6 @@ module YARP
|
|
980
973
|
visitor.visit_call_operator_write_node(self)
|
981
974
|
end
|
982
975
|
|
983
|
-
|
984
976
|
# def child_nodes: () -> Array[nil | Node]
|
985
977
|
def child_nodes
|
986
978
|
[target, value]
|
@@ -1027,7 +1019,6 @@ module YARP
|
|
1027
1019
|
visitor.visit_capture_pattern_node(self)
|
1028
1020
|
end
|
1029
1021
|
|
1030
|
-
|
1031
1022
|
# def child_nodes: () -> Array[nil | Node]
|
1032
1023
|
def child_nodes
|
1033
1024
|
[value, target]
|
@@ -1084,7 +1075,6 @@ module YARP
|
|
1084
1075
|
visitor.visit_case_node(self)
|
1085
1076
|
end
|
1086
1077
|
|
1087
|
-
|
1088
1078
|
# def child_nodes: () -> Array[nil | Node]
|
1089
1079
|
def child_nodes
|
1090
1080
|
[predicate, *conditions, consequent]
|
@@ -1152,7 +1142,6 @@ module YARP
|
|
1152
1142
|
visitor.visit_class_node(self)
|
1153
1143
|
end
|
1154
1144
|
|
1155
|
-
|
1156
1145
|
# def child_nodes: () -> Array[nil | Node]
|
1157
1146
|
def child_nodes
|
1158
1147
|
[constant_path, superclass, statements]
|
@@ -1209,7 +1198,6 @@ module YARP
|
|
1209
1198
|
visitor.visit_class_variable_operator_and_write_node(self)
|
1210
1199
|
end
|
1211
1200
|
|
1212
|
-
|
1213
1201
|
# def child_nodes: () -> Array[nil | Node]
|
1214
1202
|
def child_nodes
|
1215
1203
|
[value]
|
@@ -1261,7 +1249,6 @@ module YARP
|
|
1261
1249
|
visitor.visit_class_variable_operator_or_write_node(self)
|
1262
1250
|
end
|
1263
1251
|
|
1264
|
-
|
1265
1252
|
# def child_nodes: () -> Array[nil | Node]
|
1266
1253
|
def child_nodes
|
1267
1254
|
[value]
|
@@ -1317,7 +1304,6 @@ module YARP
|
|
1317
1304
|
visitor.visit_class_variable_operator_write_node(self)
|
1318
1305
|
end
|
1319
1306
|
|
1320
|
-
|
1321
1307
|
# def child_nodes: () -> Array[nil | Node]
|
1322
1308
|
def child_nodes
|
1323
1309
|
[value]
|
@@ -1352,7 +1338,6 @@ module YARP
|
|
1352
1338
|
visitor.visit_class_variable_read_node(self)
|
1353
1339
|
end
|
1354
1340
|
|
1355
|
-
|
1356
1341
|
# def child_nodes: () -> Array[nil | Node]
|
1357
1342
|
def child_nodes
|
1358
1343
|
[]
|
@@ -1394,7 +1379,6 @@ module YARP
|
|
1394
1379
|
visitor.visit_class_variable_write_node(self)
|
1395
1380
|
end
|
1396
1381
|
|
1397
|
-
|
1398
1382
|
# def child_nodes: () -> Array[nil | Node]
|
1399
1383
|
def child_nodes
|
1400
1384
|
[value]
|
@@ -1446,7 +1430,6 @@ module YARP
|
|
1446
1430
|
visitor.visit_constant_operator_and_write_node(self)
|
1447
1431
|
end
|
1448
1432
|
|
1449
|
-
|
1450
1433
|
# def child_nodes: () -> Array[nil | Node]
|
1451
1434
|
def child_nodes
|
1452
1435
|
[value]
|
@@ -1498,7 +1481,6 @@ module YARP
|
|
1498
1481
|
visitor.visit_constant_operator_or_write_node(self)
|
1499
1482
|
end
|
1500
1483
|
|
1501
|
-
|
1502
1484
|
# def child_nodes: () -> Array[nil | Node]
|
1503
1485
|
def child_nodes
|
1504
1486
|
[value]
|
@@ -1554,7 +1536,6 @@ module YARP
|
|
1554
1536
|
visitor.visit_constant_operator_write_node(self)
|
1555
1537
|
end
|
1556
1538
|
|
1557
|
-
|
1558
1539
|
# def child_nodes: () -> Array[nil | Node]
|
1559
1540
|
def child_nodes
|
1560
1541
|
[value]
|
@@ -1601,7 +1582,6 @@ module YARP
|
|
1601
1582
|
visitor.visit_constant_path_node(self)
|
1602
1583
|
end
|
1603
1584
|
|
1604
|
-
|
1605
1585
|
# def child_nodes: () -> Array[nil | Node]
|
1606
1586
|
def child_nodes
|
1607
1587
|
[parent, child]
|
@@ -1648,7 +1628,6 @@ module YARP
|
|
1648
1628
|
visitor.visit_constant_path_operator_and_write_node(self)
|
1649
1629
|
end
|
1650
1630
|
|
1651
|
-
|
1652
1631
|
# def child_nodes: () -> Array[nil | Node]
|
1653
1632
|
def child_nodes
|
1654
1633
|
[target, value]
|
@@ -1695,7 +1674,6 @@ module YARP
|
|
1695
1674
|
visitor.visit_constant_path_operator_or_write_node(self)
|
1696
1675
|
end
|
1697
1676
|
|
1698
|
-
|
1699
1677
|
# def child_nodes: () -> Array[nil | Node]
|
1700
1678
|
def child_nodes
|
1701
1679
|
[target, value]
|
@@ -1746,7 +1724,6 @@ module YARP
|
|
1746
1724
|
visitor.visit_constant_path_operator_write_node(self)
|
1747
1725
|
end
|
1748
1726
|
|
1749
|
-
|
1750
1727
|
# def child_nodes: () -> Array[nil | Node]
|
1751
1728
|
def child_nodes
|
1752
1729
|
[target, value]
|
@@ -1794,7 +1771,6 @@ module YARP
|
|
1794
1771
|
visitor.visit_constant_path_write_node(self)
|
1795
1772
|
end
|
1796
1773
|
|
1797
|
-
|
1798
1774
|
# def child_nodes: () -> Array[nil | Node]
|
1799
1775
|
def child_nodes
|
1800
1776
|
[target, value]
|
@@ -1829,7 +1805,6 @@ module YARP
|
|
1829
1805
|
visitor.visit_constant_read_node(self)
|
1830
1806
|
end
|
1831
1807
|
|
1832
|
-
|
1833
1808
|
# def child_nodes: () -> Array[nil | Node]
|
1834
1809
|
def child_nodes
|
1835
1810
|
[]
|
@@ -1871,7 +1846,6 @@ module YARP
|
|
1871
1846
|
visitor.visit_constant_write_node(self)
|
1872
1847
|
end
|
1873
1848
|
|
1874
|
-
|
1875
1849
|
# def child_nodes: () -> Array[nil | Node]
|
1876
1850
|
def child_nodes
|
1877
1851
|
[value]
|
@@ -1956,7 +1930,6 @@ module YARP
|
|
1956
1930
|
visitor.visit_def_node(self)
|
1957
1931
|
end
|
1958
1932
|
|
1959
|
-
|
1960
1933
|
# def child_nodes: () -> Array[nil | Node]
|
1961
1934
|
def child_nodes
|
1962
1935
|
[receiver, parameters, statements]
|
@@ -2037,7 +2010,6 @@ module YARP
|
|
2037
2010
|
visitor.visit_defined_node(self)
|
2038
2011
|
end
|
2039
2012
|
|
2040
|
-
|
2041
2013
|
# def child_nodes: () -> Array[nil | Node]
|
2042
2014
|
def child_nodes
|
2043
2015
|
[value]
|
@@ -2094,7 +2066,6 @@ module YARP
|
|
2094
2066
|
visitor.visit_else_node(self)
|
2095
2067
|
end
|
2096
2068
|
|
2097
|
-
|
2098
2069
|
# def child_nodes: () -> Array[nil | Node]
|
2099
2070
|
def child_nodes
|
2100
2071
|
[statements]
|
@@ -2146,7 +2117,6 @@ module YARP
|
|
2146
2117
|
visitor.visit_embedded_statements_node(self)
|
2147
2118
|
end
|
2148
2119
|
|
2149
|
-
|
2150
2120
|
# def child_nodes: () -> Array[nil | Node]
|
2151
2121
|
def child_nodes
|
2152
2122
|
[statements]
|
@@ -2194,7 +2164,6 @@ module YARP
|
|
2194
2164
|
visitor.visit_embedded_variable_node(self)
|
2195
2165
|
end
|
2196
2166
|
|
2197
|
-
|
2198
2167
|
# def child_nodes: () -> Array[nil | Node]
|
2199
2168
|
def child_nodes
|
2200
2169
|
[variable]
|
@@ -2245,7 +2214,6 @@ module YARP
|
|
2245
2214
|
visitor.visit_ensure_node(self)
|
2246
2215
|
end
|
2247
2216
|
|
2248
|
-
|
2249
2217
|
# def child_nodes: () -> Array[nil | Node]
|
2250
2218
|
def child_nodes
|
2251
2219
|
[statements]
|
@@ -2285,7 +2253,6 @@ module YARP
|
|
2285
2253
|
visitor.visit_false_node(self)
|
2286
2254
|
end
|
2287
2255
|
|
2288
|
-
|
2289
2256
|
# def child_nodes: () -> Array[nil | Node]
|
2290
2257
|
def child_nodes
|
2291
2258
|
[]
|
@@ -2345,7 +2312,6 @@ module YARP
|
|
2345
2312
|
visitor.visit_find_pattern_node(self)
|
2346
2313
|
end
|
2347
2314
|
|
2348
|
-
|
2349
2315
|
# def child_nodes: () -> Array[nil | Node]
|
2350
2316
|
def child_nodes
|
2351
2317
|
[constant, left, *requireds, right]
|
@@ -2370,6 +2336,61 @@ module YARP
|
|
2370
2336
|
end
|
2371
2337
|
end
|
2372
2338
|
|
2339
|
+
# Represents the use of the `..` or `...` operators to create flip flops.
|
2340
|
+
#
|
2341
|
+
# baz if foo .. bar
|
2342
|
+
# ^^^^^^^^^^
|
2343
|
+
class FlipFlopNode < Node
|
2344
|
+
# attr_reader left: Node?
|
2345
|
+
attr_reader :left
|
2346
|
+
|
2347
|
+
# attr_reader right: Node?
|
2348
|
+
attr_reader :right
|
2349
|
+
|
2350
|
+
# attr_reader operator_loc: Location
|
2351
|
+
attr_reader :operator_loc
|
2352
|
+
|
2353
|
+
# attr_reader flags: Integer
|
2354
|
+
attr_reader :flags
|
2355
|
+
|
2356
|
+
# def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void
|
2357
|
+
def initialize(left, right, operator_loc, flags, location)
|
2358
|
+
@left = left
|
2359
|
+
@right = right
|
2360
|
+
@operator_loc = operator_loc
|
2361
|
+
@flags = flags
|
2362
|
+
@location = location
|
2363
|
+
end
|
2364
|
+
|
2365
|
+
# def accept: (visitor: Visitor) -> void
|
2366
|
+
def accept(visitor)
|
2367
|
+
visitor.visit_flip_flop_node(self)
|
2368
|
+
end
|
2369
|
+
|
2370
|
+
# def child_nodes: () -> Array[nil | Node]
|
2371
|
+
def child_nodes
|
2372
|
+
[left, right]
|
2373
|
+
end
|
2374
|
+
|
2375
|
+
# def deconstruct: () -> Array[nil | Node]
|
2376
|
+
alias deconstruct child_nodes
|
2377
|
+
|
2378
|
+
# def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location]
|
2379
|
+
def deconstruct_keys(keys)
|
2380
|
+
{ left: left, right: right, operator_loc: operator_loc, flags: flags, location: location }
|
2381
|
+
end
|
2382
|
+
|
2383
|
+
# def operator: () -> String
|
2384
|
+
def operator
|
2385
|
+
operator_loc.slice
|
2386
|
+
end
|
2387
|
+
|
2388
|
+
# def exclude_end?: () -> bool
|
2389
|
+
def exclude_end?
|
2390
|
+
flags.anybits?(RangeFlags::EXCLUDE_END)
|
2391
|
+
end
|
2392
|
+
end
|
2393
|
+
|
2373
2394
|
# Represents a floating point number literal.
|
2374
2395
|
#
|
2375
2396
|
# 1.0
|
@@ -2385,7 +2406,6 @@ module YARP
|
|
2385
2406
|
visitor.visit_float_node(self)
|
2386
2407
|
end
|
2387
2408
|
|
2388
|
-
|
2389
2409
|
# def child_nodes: () -> Array[nil | Node]
|
2390
2410
|
def child_nodes
|
2391
2411
|
[]
|
@@ -2443,7 +2463,6 @@ module YARP
|
|
2443
2463
|
visitor.visit_for_node(self)
|
2444
2464
|
end
|
2445
2465
|
|
2446
|
-
|
2447
2466
|
# def child_nodes: () -> Array[nil | Node]
|
2448
2467
|
def child_nodes
|
2449
2468
|
[index, collection, statements]
|
@@ -2495,7 +2514,6 @@ module YARP
|
|
2495
2514
|
visitor.visit_forwarding_arguments_node(self)
|
2496
2515
|
end
|
2497
2516
|
|
2498
|
-
|
2499
2517
|
# def child_nodes: () -> Array[nil | Node]
|
2500
2518
|
def child_nodes
|
2501
2519
|
[]
|
@@ -2526,7 +2544,6 @@ module YARP
|
|
2526
2544
|
visitor.visit_forwarding_parameter_node(self)
|
2527
2545
|
end
|
2528
2546
|
|
2529
|
-
|
2530
2547
|
# def child_nodes: () -> Array[nil | Node]
|
2531
2548
|
def child_nodes
|
2532
2549
|
[]
|
@@ -2560,7 +2577,6 @@ module YARP
|
|
2560
2577
|
visitor.visit_forwarding_super_node(self)
|
2561
2578
|
end
|
2562
2579
|
|
2563
|
-
|
2564
2580
|
# def child_nodes: () -> Array[nil | Node]
|
2565
2581
|
def child_nodes
|
2566
2582
|
[block]
|
@@ -2602,7 +2618,6 @@ module YARP
|
|
2602
2618
|
visitor.visit_global_variable_operator_and_write_node(self)
|
2603
2619
|
end
|
2604
2620
|
|
2605
|
-
|
2606
2621
|
# def child_nodes: () -> Array[nil | Node]
|
2607
2622
|
def child_nodes
|
2608
2623
|
[value]
|
@@ -2654,7 +2669,6 @@ module YARP
|
|
2654
2669
|
visitor.visit_global_variable_operator_or_write_node(self)
|
2655
2670
|
end
|
2656
2671
|
|
2657
|
-
|
2658
2672
|
# def child_nodes: () -> Array[nil | Node]
|
2659
2673
|
def child_nodes
|
2660
2674
|
[value]
|
@@ -2710,7 +2724,6 @@ module YARP
|
|
2710
2724
|
visitor.visit_global_variable_operator_write_node(self)
|
2711
2725
|
end
|
2712
2726
|
|
2713
|
-
|
2714
2727
|
# def child_nodes: () -> Array[nil | Node]
|
2715
2728
|
def child_nodes
|
2716
2729
|
[value]
|
@@ -2745,7 +2758,6 @@ module YARP
|
|
2745
2758
|
visitor.visit_global_variable_read_node(self)
|
2746
2759
|
end
|
2747
2760
|
|
2748
|
-
|
2749
2761
|
# def child_nodes: () -> Array[nil | Node]
|
2750
2762
|
def child_nodes
|
2751
2763
|
[]
|
@@ -2787,7 +2799,6 @@ module YARP
|
|
2787
2799
|
visitor.visit_global_variable_write_node(self)
|
2788
2800
|
end
|
2789
2801
|
|
2790
|
-
|
2791
2802
|
# def child_nodes: () -> Array[nil | Node]
|
2792
2803
|
def child_nodes
|
2793
2804
|
[value]
|
@@ -2839,7 +2850,6 @@ module YARP
|
|
2839
2850
|
visitor.visit_hash_node(self)
|
2840
2851
|
end
|
2841
2852
|
|
2842
|
-
|
2843
2853
|
# def child_nodes: () -> Array[nil | Node]
|
2844
2854
|
def child_nodes
|
2845
2855
|
[*elements]
|
@@ -2902,7 +2912,6 @@ module YARP
|
|
2902
2912
|
visitor.visit_hash_pattern_node(self)
|
2903
2913
|
end
|
2904
2914
|
|
2905
|
-
|
2906
2915
|
# def child_nodes: () -> Array[nil | Node]
|
2907
2916
|
def child_nodes
|
2908
2917
|
[constant, *assocs, kwrest]
|
@@ -3012,7 +3021,6 @@ module YARP
|
|
3012
3021
|
visitor.visit_imaginary_node(self)
|
3013
3022
|
end
|
3014
3023
|
|
3015
|
-
|
3016
3024
|
# def child_nodes: () -> Array[nil | Node]
|
3017
3025
|
def child_nodes
|
3018
3026
|
[numeric]
|
@@ -3058,7 +3066,6 @@ module YARP
|
|
3058
3066
|
visitor.visit_in_node(self)
|
3059
3067
|
end
|
3060
3068
|
|
3061
|
-
|
3062
3069
|
# def child_nodes: () -> Array[nil | Node]
|
3063
3070
|
def child_nodes
|
3064
3071
|
[pattern, statements]
|
@@ -3110,7 +3117,6 @@ module YARP
|
|
3110
3117
|
visitor.visit_instance_variable_operator_and_write_node(self)
|
3111
3118
|
end
|
3112
3119
|
|
3113
|
-
|
3114
3120
|
# def child_nodes: () -> Array[nil | Node]
|
3115
3121
|
def child_nodes
|
3116
3122
|
[value]
|
@@ -3162,7 +3168,6 @@ module YARP
|
|
3162
3168
|
visitor.visit_instance_variable_operator_or_write_node(self)
|
3163
3169
|
end
|
3164
3170
|
|
3165
|
-
|
3166
3171
|
# def child_nodes: () -> Array[nil | Node]
|
3167
3172
|
def child_nodes
|
3168
3173
|
[value]
|
@@ -3218,7 +3223,6 @@ module YARP
|
|
3218
3223
|
visitor.visit_instance_variable_operator_write_node(self)
|
3219
3224
|
end
|
3220
3225
|
|
3221
|
-
|
3222
3226
|
# def child_nodes: () -> Array[nil | Node]
|
3223
3227
|
def child_nodes
|
3224
3228
|
[value]
|
@@ -3253,7 +3257,6 @@ module YARP
|
|
3253
3257
|
visitor.visit_instance_variable_read_node(self)
|
3254
3258
|
end
|
3255
3259
|
|
3256
|
-
|
3257
3260
|
# def child_nodes: () -> Array[nil | Node]
|
3258
3261
|
def child_nodes
|
3259
3262
|
[]
|
@@ -3295,7 +3298,6 @@ module YARP
|
|
3295
3298
|
visitor.visit_instance_variable_write_node(self)
|
3296
3299
|
end
|
3297
3300
|
|
3298
|
-
|
3299
3301
|
# def child_nodes: () -> Array[nil | Node]
|
3300
3302
|
def child_nodes
|
3301
3303
|
[value]
|
@@ -3335,7 +3337,6 @@ module YARP
|
|
3335
3337
|
visitor.visit_integer_node(self)
|
3336
3338
|
end
|
3337
3339
|
|
3338
|
-
|
3339
3340
|
# def child_nodes: () -> Array[nil | Node]
|
3340
3341
|
def child_nodes
|
3341
3342
|
[]
|
@@ -3408,6 +3409,46 @@ module YARP
|
|
3408
3409
|
def closing
|
3409
3410
|
closing_loc.slice
|
3410
3411
|
end
|
3412
|
+
|
3413
|
+
# def ignore_case?: () -> bool
|
3414
|
+
def ignore_case?
|
3415
|
+
flags.anybits?(RegularExpressionFlags::IGNORE_CASE)
|
3416
|
+
end
|
3417
|
+
|
3418
|
+
# def multi_line?: () -> bool
|
3419
|
+
def multi_line?
|
3420
|
+
flags.anybits?(RegularExpressionFlags::MULTI_LINE)
|
3421
|
+
end
|
3422
|
+
|
3423
|
+
# def extended?: () -> bool
|
3424
|
+
def extended?
|
3425
|
+
flags.anybits?(RegularExpressionFlags::EXTENDED)
|
3426
|
+
end
|
3427
|
+
|
3428
|
+
# def euc_jp?: () -> bool
|
3429
|
+
def euc_jp?
|
3430
|
+
flags.anybits?(RegularExpressionFlags::EUC_JP)
|
3431
|
+
end
|
3432
|
+
|
3433
|
+
# def ascii_8bit?: () -> bool
|
3434
|
+
def ascii_8bit?
|
3435
|
+
flags.anybits?(RegularExpressionFlags::ASCII_8BIT)
|
3436
|
+
end
|
3437
|
+
|
3438
|
+
# def windows_31j?: () -> bool
|
3439
|
+
def windows_31j?
|
3440
|
+
flags.anybits?(RegularExpressionFlags::WINDOWS_31J)
|
3441
|
+
end
|
3442
|
+
|
3443
|
+
# def utf_8?: () -> bool
|
3444
|
+
def utf_8?
|
3445
|
+
flags.anybits?(RegularExpressionFlags::UTF_8)
|
3446
|
+
end
|
3447
|
+
|
3448
|
+
# def once?: () -> bool
|
3449
|
+
def once?
|
3450
|
+
flags.anybits?(RegularExpressionFlags::ONCE)
|
3451
|
+
end
|
3411
3452
|
end
|
3412
3453
|
|
3413
3454
|
# Represents a string literal that contains interpolation.
|
@@ -3597,7 +3638,6 @@ module YARP
|
|
3597
3638
|
visitor.visit_keyword_hash_node(self)
|
3598
3639
|
end
|
3599
3640
|
|
3600
|
-
|
3601
3641
|
# def child_nodes: () -> Array[nil | Node]
|
3602
3642
|
def child_nodes
|
3603
3643
|
[*elements]
|
@@ -3640,7 +3680,6 @@ module YARP
|
|
3640
3680
|
visitor.visit_keyword_parameter_node(self)
|
3641
3681
|
end
|
3642
3682
|
|
3643
|
-
|
3644
3683
|
# def child_nodes: () -> Array[nil | Node]
|
3645
3684
|
def child_nodes
|
3646
3685
|
[value]
|
@@ -3684,7 +3723,6 @@ module YARP
|
|
3684
3723
|
visitor.visit_keyword_rest_parameter_node(self)
|
3685
3724
|
end
|
3686
3725
|
|
3687
|
-
|
3688
3726
|
# def child_nodes: () -> Array[nil | Node]
|
3689
3727
|
def child_nodes
|
3690
3728
|
[]
|
@@ -3740,7 +3778,6 @@ module YARP
|
|
3740
3778
|
visitor.visit_lambda_node(self)
|
3741
3779
|
end
|
3742
3780
|
|
3743
|
-
|
3744
3781
|
# def child_nodes: () -> Array[nil | Node]
|
3745
3782
|
def child_nodes
|
3746
3783
|
[parameters, statements]
|
@@ -3791,7 +3828,6 @@ module YARP
|
|
3791
3828
|
visitor.visit_local_variable_operator_and_write_node(self)
|
3792
3829
|
end
|
3793
3830
|
|
3794
|
-
|
3795
3831
|
# def child_nodes: () -> Array[nil | Node]
|
3796
3832
|
def child_nodes
|
3797
3833
|
[value]
|
@@ -3847,7 +3883,6 @@ module YARP
|
|
3847
3883
|
visitor.visit_local_variable_operator_or_write_node(self)
|
3848
3884
|
end
|
3849
3885
|
|
3850
|
-
|
3851
3886
|
# def child_nodes: () -> Array[nil | Node]
|
3852
3887
|
def child_nodes
|
3853
3888
|
[value]
|
@@ -3907,7 +3942,6 @@ module YARP
|
|
3907
3942
|
visitor.visit_local_variable_operator_write_node(self)
|
3908
3943
|
end
|
3909
3944
|
|
3910
|
-
|
3911
3945
|
# def child_nodes: () -> Array[nil | Node]
|
3912
3946
|
def child_nodes
|
3913
3947
|
[value]
|
@@ -3957,7 +3991,6 @@ module YARP
|
|
3957
3991
|
visitor.visit_local_variable_read_node(self)
|
3958
3992
|
end
|
3959
3993
|
|
3960
|
-
|
3961
3994
|
# def child_nodes: () -> Array[nil | Node]
|
3962
3995
|
def child_nodes
|
3963
3996
|
[]
|
@@ -4007,7 +4040,6 @@ module YARP
|
|
4007
4040
|
visitor.visit_local_variable_write_node(self)
|
4008
4041
|
end
|
4009
4042
|
|
4010
|
-
|
4011
4043
|
# def child_nodes: () -> Array[nil | Node]
|
4012
4044
|
def child_nodes
|
4013
4045
|
[value]
|
@@ -4059,7 +4091,6 @@ module YARP
|
|
4059
4091
|
visitor.visit_match_predicate_node(self)
|
4060
4092
|
end
|
4061
4093
|
|
4062
|
-
|
4063
4094
|
# def child_nodes: () -> Array[nil | Node]
|
4064
4095
|
def child_nodes
|
4065
4096
|
[value, pattern]
|
@@ -4106,7 +4137,6 @@ module YARP
|
|
4106
4137
|
visitor.visit_match_required_node(self)
|
4107
4138
|
end
|
4108
4139
|
|
4109
|
-
|
4110
4140
|
# def child_nodes: () -> Array[nil | Node]
|
4111
4141
|
def child_nodes
|
4112
4142
|
[value, pattern]
|
@@ -4139,7 +4169,6 @@ module YARP
|
|
4139
4169
|
visitor.visit_missing_node(self)
|
4140
4170
|
end
|
4141
4171
|
|
4142
|
-
|
4143
4172
|
# def child_nodes: () -> Array[nil | Node]
|
4144
4173
|
def child_nodes
|
4145
4174
|
[]
|
@@ -4189,7 +4218,6 @@ module YARP
|
|
4189
4218
|
visitor.visit_module_node(self)
|
4190
4219
|
end
|
4191
4220
|
|
4192
|
-
|
4193
4221
|
# def child_nodes: () -> Array[nil | Node]
|
4194
4222
|
def child_nodes
|
4195
4223
|
[constant_path, statements]
|
@@ -4249,7 +4277,6 @@ module YARP
|
|
4249
4277
|
visitor.visit_multi_write_node(self)
|
4250
4278
|
end
|
4251
4279
|
|
4252
|
-
|
4253
4280
|
# def child_nodes: () -> Array[nil | Node]
|
4254
4281
|
def child_nodes
|
4255
4282
|
[*targets, value]
|
@@ -4302,7 +4329,6 @@ module YARP
|
|
4302
4329
|
visitor.visit_next_node(self)
|
4303
4330
|
end
|
4304
4331
|
|
4305
|
-
|
4306
4332
|
# def child_nodes: () -> Array[nil | Node]
|
4307
4333
|
def child_nodes
|
4308
4334
|
[arguments]
|
@@ -4337,7 +4363,6 @@ module YARP
|
|
4337
4363
|
visitor.visit_nil_node(self)
|
4338
4364
|
end
|
4339
4365
|
|
4340
|
-
|
4341
4366
|
# def child_nodes: () -> Array[nil | Node]
|
4342
4367
|
def child_nodes
|
4343
4368
|
[]
|
@@ -4376,7 +4401,6 @@ module YARP
|
|
4376
4401
|
visitor.visit_no_keywords_parameter_node(self)
|
4377
4402
|
end
|
4378
4403
|
|
4379
|
-
|
4380
4404
|
# def child_nodes: () -> Array[nil | Node]
|
4381
4405
|
def child_nodes
|
4382
4406
|
[]
|
@@ -4416,7 +4440,6 @@ module YARP
|
|
4416
4440
|
visitor.visit_numbered_reference_read_node(self)
|
4417
4441
|
end
|
4418
4442
|
|
4419
|
-
|
4420
4443
|
# def child_nodes: () -> Array[nil | Node]
|
4421
4444
|
def child_nodes
|
4422
4445
|
[]
|
@@ -4463,7 +4486,6 @@ module YARP
|
|
4463
4486
|
visitor.visit_optional_parameter_node(self)
|
4464
4487
|
end
|
4465
4488
|
|
4466
|
-
|
4467
4489
|
# def child_nodes: () -> Array[nil | Node]
|
4468
4490
|
def child_nodes
|
4469
4491
|
[value]
|
@@ -4515,7 +4537,6 @@ module YARP
|
|
4515
4537
|
visitor.visit_or_node(self)
|
4516
4538
|
end
|
4517
4539
|
|
4518
|
-
|
4519
4540
|
# def child_nodes: () -> Array[nil | Node]
|
4520
4541
|
def child_nodes
|
4521
4542
|
[left, right]
|
@@ -4579,7 +4600,6 @@ module YARP
|
|
4579
4600
|
visitor.visit_parameters_node(self)
|
4580
4601
|
end
|
4581
4602
|
|
4582
|
-
|
4583
4603
|
# def child_nodes: () -> Array[nil | Node]
|
4584
4604
|
def child_nodes
|
4585
4605
|
[*requireds, *optionals, *posts, rest, *keywords, keyword_rest, block]
|
@@ -4681,7 +4701,6 @@ module YARP
|
|
4681
4701
|
visitor.visit_pinned_expression_node(self)
|
4682
4702
|
end
|
4683
4703
|
|
4684
|
-
|
4685
4704
|
# def child_nodes: () -> Array[nil | Node]
|
4686
4705
|
def child_nodes
|
4687
4706
|
[expression]
|
@@ -4735,7 +4754,6 @@ module YARP
|
|
4735
4754
|
visitor.visit_pinned_variable_node(self)
|
4736
4755
|
end
|
4737
4756
|
|
4738
|
-
|
4739
4757
|
# def child_nodes: () -> Array[nil | Node]
|
4740
4758
|
def child_nodes
|
4741
4759
|
[variable]
|
@@ -4786,7 +4804,6 @@ module YARP
|
|
4786
4804
|
visitor.visit_post_execution_node(self)
|
4787
4805
|
end
|
4788
4806
|
|
4789
|
-
|
4790
4807
|
# def child_nodes: () -> Array[nil | Node]
|
4791
4808
|
def child_nodes
|
4792
4809
|
[statements]
|
@@ -4847,7 +4864,6 @@ module YARP
|
|
4847
4864
|
visitor.visit_pre_execution_node(self)
|
4848
4865
|
end
|
4849
4866
|
|
4850
|
-
|
4851
4867
|
# def child_nodes: () -> Array[nil | Node]
|
4852
4868
|
def child_nodes
|
4853
4869
|
[statements]
|
@@ -4897,7 +4913,6 @@ module YARP
|
|
4897
4913
|
visitor.visit_program_node(self)
|
4898
4914
|
end
|
4899
4915
|
|
4900
|
-
|
4901
4916
|
# def child_nodes: () -> Array[nil | Node]
|
4902
4917
|
def child_nodes
|
4903
4918
|
[statements]
|
@@ -4946,7 +4961,6 @@ module YARP
|
|
4946
4961
|
visitor.visit_range_node(self)
|
4947
4962
|
end
|
4948
4963
|
|
4949
|
-
|
4950
4964
|
# def child_nodes: () -> Array[nil | Node]
|
4951
4965
|
def child_nodes
|
4952
4966
|
[left, right]
|
@@ -4964,6 +4978,11 @@ module YARP
|
|
4964
4978
|
def operator
|
4965
4979
|
operator_loc.slice
|
4966
4980
|
end
|
4981
|
+
|
4982
|
+
# def exclude_end?: () -> bool
|
4983
|
+
def exclude_end?
|
4984
|
+
flags.anybits?(RangeFlags::EXCLUDE_END)
|
4985
|
+
end
|
4967
4986
|
end
|
4968
4987
|
|
4969
4988
|
# Represents a rational number literal.
|
@@ -4985,7 +5004,6 @@ module YARP
|
|
4985
5004
|
visitor.visit_rational_node(self)
|
4986
5005
|
end
|
4987
5006
|
|
4988
|
-
|
4989
5007
|
# def child_nodes: () -> Array[nil | Node]
|
4990
5008
|
def child_nodes
|
4991
5009
|
[numeric]
|
@@ -5015,7 +5033,6 @@ module YARP
|
|
5015
5033
|
visitor.visit_redo_node(self)
|
5016
5034
|
end
|
5017
5035
|
|
5018
|
-
|
5019
5036
|
# def child_nodes: () -> Array[nil | Node]
|
5020
5037
|
def child_nodes
|
5021
5038
|
[]
|
@@ -5065,7 +5082,6 @@ module YARP
|
|
5065
5082
|
visitor.visit_regular_expression_node(self)
|
5066
5083
|
end
|
5067
5084
|
|
5068
|
-
|
5069
5085
|
# def child_nodes: () -> Array[nil | Node]
|
5070
5086
|
def child_nodes
|
5071
5087
|
[]
|
@@ -5093,6 +5109,46 @@ module YARP
|
|
5093
5109
|
def closing
|
5094
5110
|
closing_loc.slice
|
5095
5111
|
end
|
5112
|
+
|
5113
|
+
# def ignore_case?: () -> bool
|
5114
|
+
def ignore_case?
|
5115
|
+
flags.anybits?(RegularExpressionFlags::IGNORE_CASE)
|
5116
|
+
end
|
5117
|
+
|
5118
|
+
# def multi_line?: () -> bool
|
5119
|
+
def multi_line?
|
5120
|
+
flags.anybits?(RegularExpressionFlags::MULTI_LINE)
|
5121
|
+
end
|
5122
|
+
|
5123
|
+
# def extended?: () -> bool
|
5124
|
+
def extended?
|
5125
|
+
flags.anybits?(RegularExpressionFlags::EXTENDED)
|
5126
|
+
end
|
5127
|
+
|
5128
|
+
# def euc_jp?: () -> bool
|
5129
|
+
def euc_jp?
|
5130
|
+
flags.anybits?(RegularExpressionFlags::EUC_JP)
|
5131
|
+
end
|
5132
|
+
|
5133
|
+
# def ascii_8bit?: () -> bool
|
5134
|
+
def ascii_8bit?
|
5135
|
+
flags.anybits?(RegularExpressionFlags::ASCII_8BIT)
|
5136
|
+
end
|
5137
|
+
|
5138
|
+
# def windows_31j?: () -> bool
|
5139
|
+
def windows_31j?
|
5140
|
+
flags.anybits?(RegularExpressionFlags::WINDOWS_31J)
|
5141
|
+
end
|
5142
|
+
|
5143
|
+
# def utf_8?: () -> bool
|
5144
|
+
def utf_8?
|
5145
|
+
flags.anybits?(RegularExpressionFlags::UTF_8)
|
5146
|
+
end
|
5147
|
+
|
5148
|
+
# def once?: () -> bool
|
5149
|
+
def once?
|
5150
|
+
flags.anybits?(RegularExpressionFlags::ONCE)
|
5151
|
+
end
|
5096
5152
|
end
|
5097
5153
|
|
5098
5154
|
# Represents a destructured required parameter node.
|
@@ -5123,7 +5179,6 @@ module YARP
|
|
5123
5179
|
visitor.visit_required_destructured_parameter_node(self)
|
5124
5180
|
end
|
5125
5181
|
|
5126
|
-
|
5127
5182
|
# def child_nodes: () -> Array[nil | Node]
|
5128
5183
|
def child_nodes
|
5129
5184
|
[*parameters]
|
@@ -5168,7 +5223,6 @@ module YARP
|
|
5168
5223
|
visitor.visit_required_parameter_node(self)
|
5169
5224
|
end
|
5170
5225
|
|
5171
|
-
|
5172
5226
|
# def child_nodes: () -> Array[nil | Node]
|
5173
5227
|
def child_nodes
|
5174
5228
|
[]
|
@@ -5278,7 +5332,6 @@ module YARP
|
|
5278
5332
|
visitor.visit_rescue_node(self)
|
5279
5333
|
end
|
5280
5334
|
|
5281
|
-
|
5282
5335
|
# def child_nodes: () -> Array[nil | Node]
|
5283
5336
|
def child_nodes
|
5284
5337
|
[*exceptions, reference, statements, consequent]
|
@@ -5327,7 +5380,6 @@ module YARP
|
|
5327
5380
|
visitor.visit_rest_parameter_node(self)
|
5328
5381
|
end
|
5329
5382
|
|
5330
|
-
|
5331
5383
|
# def child_nodes: () -> Array[nil | Node]
|
5332
5384
|
def child_nodes
|
5333
5385
|
[]
|
@@ -5367,7 +5419,6 @@ module YARP
|
|
5367
5419
|
visitor.visit_retry_node(self)
|
5368
5420
|
end
|
5369
5421
|
|
5370
|
-
|
5371
5422
|
# def child_nodes: () -> Array[nil | Node]
|
5372
5423
|
def child_nodes
|
5373
5424
|
[]
|
@@ -5405,7 +5456,6 @@ module YARP
|
|
5405
5456
|
visitor.visit_return_node(self)
|
5406
5457
|
end
|
5407
5458
|
|
5408
|
-
|
5409
5459
|
# def child_nodes: () -> Array[nil | Node]
|
5410
5460
|
def child_nodes
|
5411
5461
|
[arguments]
|
@@ -5440,7 +5490,6 @@ module YARP
|
|
5440
5490
|
visitor.visit_self_node(self)
|
5441
5491
|
end
|
5442
5492
|
|
5443
|
-
|
5444
5493
|
# def child_nodes: () -> Array[nil | Node]
|
5445
5494
|
def child_nodes
|
5446
5495
|
[]
|
@@ -5494,7 +5543,6 @@ module YARP
|
|
5494
5543
|
visitor.visit_singleton_class_node(self)
|
5495
5544
|
end
|
5496
5545
|
|
5497
|
-
|
5498
5546
|
# def child_nodes: () -> Array[nil | Node]
|
5499
5547
|
def child_nodes
|
5500
5548
|
[expression, statements]
|
@@ -5539,7 +5587,6 @@ module YARP
|
|
5539
5587
|
visitor.visit_source_encoding_node(self)
|
5540
5588
|
end
|
5541
5589
|
|
5542
|
-
|
5543
5590
|
# def child_nodes: () -> Array[nil | Node]
|
5544
5591
|
def child_nodes
|
5545
5592
|
[]
|
@@ -5573,7 +5620,6 @@ module YARP
|
|
5573
5620
|
visitor.visit_source_file_node(self)
|
5574
5621
|
end
|
5575
5622
|
|
5576
|
-
|
5577
5623
|
# def child_nodes: () -> Array[nil | Node]
|
5578
5624
|
def child_nodes
|
5579
5625
|
[]
|
@@ -5603,7 +5649,6 @@ module YARP
|
|
5603
5649
|
visitor.visit_source_line_node(self)
|
5604
5650
|
end
|
5605
5651
|
|
5606
|
-
|
5607
5652
|
# def child_nodes: () -> Array[nil | Node]
|
5608
5653
|
def child_nodes
|
5609
5654
|
[]
|
@@ -5641,7 +5686,6 @@ module YARP
|
|
5641
5686
|
visitor.visit_splat_node(self)
|
5642
5687
|
end
|
5643
5688
|
|
5644
|
-
|
5645
5689
|
# def child_nodes: () -> Array[nil | Node]
|
5646
5690
|
def child_nodes
|
5647
5691
|
[expression]
|
@@ -5680,7 +5724,6 @@ module YARP
|
|
5680
5724
|
visitor.visit_statements_node(self)
|
5681
5725
|
end
|
5682
5726
|
|
5683
|
-
|
5684
5727
|
# def child_nodes: () -> Array[nil | Node]
|
5685
5728
|
def child_nodes
|
5686
5729
|
[*body]
|
@@ -5718,7 +5761,6 @@ module YARP
|
|
5718
5761
|
visitor.visit_string_concat_node(self)
|
5719
5762
|
end
|
5720
5763
|
|
5721
|
-
|
5722
5764
|
# def child_nodes: () -> Array[nil | Node]
|
5723
5765
|
def child_nodes
|
5724
5766
|
[left, right]
|
@@ -5771,7 +5813,6 @@ module YARP
|
|
5771
5813
|
visitor.visit_string_node(self)
|
5772
5814
|
end
|
5773
5815
|
|
5774
|
-
|
5775
5816
|
# def child_nodes: () -> Array[nil | Node]
|
5776
5817
|
def child_nodes
|
5777
5818
|
[]
|
@@ -5839,7 +5880,6 @@ module YARP
|
|
5839
5880
|
visitor.visit_super_node(self)
|
5840
5881
|
end
|
5841
5882
|
|
5842
|
-
|
5843
5883
|
# def child_nodes: () -> Array[nil | Node]
|
5844
5884
|
def child_nodes
|
5845
5885
|
[arguments, block]
|
@@ -5903,7 +5943,6 @@ module YARP
|
|
5903
5943
|
visitor.visit_symbol_node(self)
|
5904
5944
|
end
|
5905
5945
|
|
5906
|
-
|
5907
5946
|
# def child_nodes: () -> Array[nil | Node]
|
5908
5947
|
def child_nodes
|
5909
5948
|
[]
|
@@ -5948,7 +5987,6 @@ module YARP
|
|
5948
5987
|
visitor.visit_true_node(self)
|
5949
5988
|
end
|
5950
5989
|
|
5951
|
-
|
5952
5990
|
# def child_nodes: () -> Array[nil | Node]
|
5953
5991
|
def child_nodes
|
5954
5992
|
[]
|
@@ -5986,7 +6024,6 @@ module YARP
|
|
5986
6024
|
visitor.visit_undef_node(self)
|
5987
6025
|
end
|
5988
6026
|
|
5989
|
-
|
5990
6027
|
# def child_nodes: () -> Array[nil | Node]
|
5991
6028
|
def child_nodes
|
5992
6029
|
[*names]
|
@@ -6127,6 +6164,11 @@ module YARP
|
|
6127
6164
|
def keyword
|
6128
6165
|
keyword_loc.slice
|
6129
6166
|
end
|
6167
|
+
|
6168
|
+
# def begin_modifier?: () -> bool
|
6169
|
+
def begin_modifier?
|
6170
|
+
flags.anybits?(LoopFlags::BEGIN_MODIFIER)
|
6171
|
+
end
|
6130
6172
|
end
|
6131
6173
|
|
6132
6174
|
# case true
|
@@ -6156,7 +6198,6 @@ module YARP
|
|
6156
6198
|
visitor.visit_when_node(self)
|
6157
6199
|
end
|
6158
6200
|
|
6159
|
-
|
6160
6201
|
# def child_nodes: () -> Array[nil | Node]
|
6161
6202
|
def child_nodes
|
6162
6203
|
[*conditions, statements]
|
@@ -6231,6 +6272,11 @@ module YARP
|
|
6231
6272
|
def keyword
|
6232
6273
|
keyword_loc.slice
|
6233
6274
|
end
|
6275
|
+
|
6276
|
+
# def begin_modifier?: () -> bool
|
6277
|
+
def begin_modifier?
|
6278
|
+
flags.anybits?(LoopFlags::BEGIN_MODIFIER)
|
6279
|
+
end
|
6234
6280
|
end
|
6235
6281
|
|
6236
6282
|
# Represents an xstring literal with no interpolation.
|
@@ -6264,7 +6310,6 @@ module YARP
|
|
6264
6310
|
visitor.visit_x_string_node(self)
|
6265
6311
|
end
|
6266
6312
|
|
6267
|
-
|
6268
6313
|
# def child_nodes: () -> Array[nil | Node]
|
6269
6314
|
def child_nodes
|
6270
6315
|
[]
|
@@ -6325,7 +6370,6 @@ module YARP
|
|
6325
6370
|
visitor.visit_yield_node(self)
|
6326
6371
|
end
|
6327
6372
|
|
6328
|
-
|
6329
6373
|
# def child_nodes: () -> Array[nil | Node]
|
6330
6374
|
def child_nodes
|
6331
6375
|
[arguments]
|
@@ -6368,7 +6412,7 @@ module YARP
|
|
6368
6412
|
BEGIN_MODIFIER = 1 << 0
|
6369
6413
|
end
|
6370
6414
|
|
6371
|
-
module
|
6415
|
+
module RangeFlags
|
6372
6416
|
# ... operator
|
6373
6417
|
EXCLUDE_END = 1 << 0
|
6374
6418
|
end
|
@@ -6535,6 +6579,9 @@ module YARP
|
|
6535
6579
|
# Visit a FindPatternNode node
|
6536
6580
|
alias visit_find_pattern_node visit_child_nodes
|
6537
6581
|
|
6582
|
+
# Visit a FlipFlopNode node
|
6583
|
+
alias visit_flip_flop_node visit_child_nodes
|
6584
|
+
|
6538
6585
|
# Visit a FloatNode node
|
6539
6586
|
alias visit_float_node visit_child_nodes
|
6540
6587
|
|
@@ -7015,6 +7062,11 @@ module YARP
|
|
7015
7062
|
FindPatternNode.new(constant, left, requireds, right, opening_loc, closing_loc, location)
|
7016
7063
|
end
|
7017
7064
|
|
7065
|
+
# Create a new FlipFlopNode node
|
7066
|
+
def FlipFlopNode(left, right, operator_loc, flags, location = Location())
|
7067
|
+
FlipFlopNode.new(left, right, operator_loc, flags, location)
|
7068
|
+
end
|
7069
|
+
|
7018
7070
|
# Create a new FloatNode node
|
7019
7071
|
def FloatNode(location = Location())
|
7020
7072
|
FloatNode.new(location)
|