syntax_tree 5.2.0 → 5.3.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.
- checksums.yaml +4 -4
- data/.github/workflows/auto-merge.yml +1 -1
- data/.github/workflows/gh-pages.yml +1 -1
- data/.gitmodules +3 -0
- data/.rubocop.yml +4 -0
- data/CHANGELOG.md +18 -1
- data/Gemfile.lock +6 -6
- data/README.md +1 -0
- data/lib/syntax_tree/cli.rb +3 -2
- data/lib/syntax_tree/formatter.rb +23 -2
- data/lib/syntax_tree/index.rb +374 -0
- data/lib/syntax_tree/node.rb +127 -97
- data/lib/syntax_tree/parser.rb +19 -2
- data/lib/syntax_tree/plugin/disable_ternary.rb +7 -0
- data/lib/syntax_tree/version.rb +1 -1
- data/lib/syntax_tree/yarv/assembler.rb +10 -6
- data/lib/syntax_tree/yarv/compiler.rb +1 -1
- data/lib/syntax_tree/yarv/decompiler.rb +1 -1
- data/lib/syntax_tree/yarv/instruction_sequence.rb +1 -1
- data/lib/syntax_tree/yarv/instructions.rb +800 -0
- data/lib/syntax_tree/yarv/legacy.rb +33 -0
- data/lib/syntax_tree/yarv/vm.rb +4 -0
- data/lib/syntax_tree.rb +15 -0
- metadata +4 -2
@@ -91,6 +91,14 @@ module SyntaxTree
|
|
91
91
|
[:adjuststack, number]
|
92
92
|
end
|
93
93
|
|
94
|
+
def deconstruct_keys(_keys)
|
95
|
+
{ number: number }
|
96
|
+
end
|
97
|
+
|
98
|
+
def ==(other)
|
99
|
+
other.is_a?(AdjustStack) && other.number == number
|
100
|
+
end
|
101
|
+
|
94
102
|
def length
|
95
103
|
2
|
96
104
|
end
|
@@ -139,6 +147,14 @@ module SyntaxTree
|
|
139
147
|
[:anytostring]
|
140
148
|
end
|
141
149
|
|
150
|
+
def deconstruct_keys(_keys)
|
151
|
+
{}
|
152
|
+
end
|
153
|
+
|
154
|
+
def ==(other)
|
155
|
+
other.is_a?(AnyToString)
|
156
|
+
end
|
157
|
+
|
142
158
|
def length
|
143
159
|
1
|
144
160
|
end
|
@@ -197,6 +213,14 @@ module SyntaxTree
|
|
197
213
|
[:branchif, label.name]
|
198
214
|
end
|
199
215
|
|
216
|
+
def deconstruct_keys(_keys)
|
217
|
+
{ label: label }
|
218
|
+
end
|
219
|
+
|
220
|
+
def ==(other)
|
221
|
+
other.is_a?(BranchIf) && other.label == label
|
222
|
+
end
|
223
|
+
|
200
224
|
def length
|
201
225
|
2
|
202
226
|
end
|
@@ -250,6 +274,14 @@ module SyntaxTree
|
|
250
274
|
[:branchnil, label.name]
|
251
275
|
end
|
252
276
|
|
277
|
+
def deconstruct_keys(_keys)
|
278
|
+
{ label: label }
|
279
|
+
end
|
280
|
+
|
281
|
+
def ==(other)
|
282
|
+
other.is_a?(BranchNil) && other.label == label
|
283
|
+
end
|
284
|
+
|
253
285
|
def length
|
254
286
|
2
|
255
287
|
end
|
@@ -302,6 +334,14 @@ module SyntaxTree
|
|
302
334
|
[:branchunless, label.name]
|
303
335
|
end
|
304
336
|
|
337
|
+
def deconstruct_keys(_keys)
|
338
|
+
{ label: label }
|
339
|
+
end
|
340
|
+
|
341
|
+
def ==(other)
|
342
|
+
other.is_a?(BranchUnless) && other.label == label
|
343
|
+
end
|
344
|
+
|
305
345
|
def length
|
306
346
|
2
|
307
347
|
end
|
@@ -365,6 +405,16 @@ module SyntaxTree
|
|
365
405
|
]
|
366
406
|
end
|
367
407
|
|
408
|
+
def deconstruct_keys(_keys)
|
409
|
+
{ keyword_bits_index: keyword_bits_index, keyword_index: keyword_index }
|
410
|
+
end
|
411
|
+
|
412
|
+
def ==(other)
|
413
|
+
other.is_a?(CheckKeyword) &&
|
414
|
+
other.keyword_bits_index == keyword_bits_index &&
|
415
|
+
other.keyword_index == keyword_index
|
416
|
+
end
|
417
|
+
|
368
418
|
def length
|
369
419
|
3
|
370
420
|
end
|
@@ -419,6 +469,14 @@ module SyntaxTree
|
|
419
469
|
[:checkmatch, type]
|
420
470
|
end
|
421
471
|
|
472
|
+
def deconstruct_keys(_keys)
|
473
|
+
{ type: type }
|
474
|
+
end
|
475
|
+
|
476
|
+
def ==(other)
|
477
|
+
other.is_a?(CheckMatch) && other.type == type
|
478
|
+
end
|
479
|
+
|
422
480
|
def length
|
423
481
|
2
|
424
482
|
end
|
@@ -561,6 +619,14 @@ module SyntaxTree
|
|
561
619
|
[:checktype, type]
|
562
620
|
end
|
563
621
|
|
622
|
+
def deconstruct_keys(_keys)
|
623
|
+
{ type: type }
|
624
|
+
end
|
625
|
+
|
626
|
+
def ==(other)
|
627
|
+
other.is_a?(CheckType) && other.type == type
|
628
|
+
end
|
629
|
+
|
564
630
|
def length
|
565
631
|
2
|
566
632
|
end
|
@@ -656,6 +722,14 @@ module SyntaxTree
|
|
656
722
|
[:concatarray]
|
657
723
|
end
|
658
724
|
|
725
|
+
def deconstruct_keys(_keys)
|
726
|
+
{}
|
727
|
+
end
|
728
|
+
|
729
|
+
def ==(other)
|
730
|
+
other.is_a?(ConcatArray)
|
731
|
+
end
|
732
|
+
|
659
733
|
def length
|
660
734
|
1
|
661
735
|
end
|
@@ -708,6 +782,14 @@ module SyntaxTree
|
|
708
782
|
[:concatstrings, number]
|
709
783
|
end
|
710
784
|
|
785
|
+
def deconstruct_keys(_keys)
|
786
|
+
{ number: number }
|
787
|
+
end
|
788
|
+
|
789
|
+
def ==(other)
|
790
|
+
other.is_a?(ConcatStrings) && other.number == number
|
791
|
+
end
|
792
|
+
|
711
793
|
def length
|
712
794
|
2
|
713
795
|
end
|
@@ -771,6 +853,15 @@ module SyntaxTree
|
|
771
853
|
[:defineclass, name, class_iseq.to_a, flags]
|
772
854
|
end
|
773
855
|
|
856
|
+
def deconstruct_keys(_keys)
|
857
|
+
{ name: name, class_iseq: class_iseq, flags: flags }
|
858
|
+
end
|
859
|
+
|
860
|
+
def ==(other)
|
861
|
+
other.is_a?(DefineClass) && other.name == name &&
|
862
|
+
other.class_iseq == class_iseq && other.flags == flags
|
863
|
+
end
|
864
|
+
|
774
865
|
def length
|
775
866
|
4
|
776
867
|
end
|
@@ -899,6 +990,15 @@ module SyntaxTree
|
|
899
990
|
[:defined, type, name, message]
|
900
991
|
end
|
901
992
|
|
993
|
+
def deconstruct_keys(_keys)
|
994
|
+
{ type: type, name: name, message: message }
|
995
|
+
end
|
996
|
+
|
997
|
+
def ==(other)
|
998
|
+
other.is_a?(Defined) && other.type == type && other.name == name &&
|
999
|
+
other.message == message
|
1000
|
+
end
|
1001
|
+
|
902
1002
|
def length
|
903
1003
|
4
|
904
1004
|
end
|
@@ -989,6 +1089,15 @@ module SyntaxTree
|
|
989
1089
|
[:definemethod, method_name, method_iseq.to_a]
|
990
1090
|
end
|
991
1091
|
|
1092
|
+
def deconstruct_keys(_keys)
|
1093
|
+
{ method_name: method_name, method_iseq: method_iseq }
|
1094
|
+
end
|
1095
|
+
|
1096
|
+
def ==(other)
|
1097
|
+
other.is_a?(DefineMethod) && other.method_name == method_name &&
|
1098
|
+
other.method_iseq == method_iseq
|
1099
|
+
end
|
1100
|
+
|
992
1101
|
def length
|
993
1102
|
3
|
994
1103
|
end
|
@@ -1061,6 +1170,15 @@ module SyntaxTree
|
|
1061
1170
|
[:definesmethod, method_name, method_iseq.to_a]
|
1062
1171
|
end
|
1063
1172
|
|
1173
|
+
def deconstruct_keys(_keys)
|
1174
|
+
{ method_name: method_name, method_iseq: method_iseq }
|
1175
|
+
end
|
1176
|
+
|
1177
|
+
def ==(other)
|
1178
|
+
other.is_a?(DefineSMethod) && other.method_name == method_name &&
|
1179
|
+
other.method_iseq == method_iseq
|
1180
|
+
end
|
1181
|
+
|
1064
1182
|
def length
|
1065
1183
|
3
|
1066
1184
|
end
|
@@ -1118,6 +1236,14 @@ module SyntaxTree
|
|
1118
1236
|
[:dup]
|
1119
1237
|
end
|
1120
1238
|
|
1239
|
+
def deconstruct_keys(_keys)
|
1240
|
+
{}
|
1241
|
+
end
|
1242
|
+
|
1243
|
+
def ==(other)
|
1244
|
+
other.is_a?(Dup)
|
1245
|
+
end
|
1246
|
+
|
1121
1247
|
def length
|
1122
1248
|
1
|
1123
1249
|
end
|
@@ -1164,6 +1290,14 @@ module SyntaxTree
|
|
1164
1290
|
[:duparray, object]
|
1165
1291
|
end
|
1166
1292
|
|
1293
|
+
def deconstruct_keys(_keys)
|
1294
|
+
{ object: object }
|
1295
|
+
end
|
1296
|
+
|
1297
|
+
def ==(other)
|
1298
|
+
other.is_a?(DupArray) && other.object == object
|
1299
|
+
end
|
1300
|
+
|
1167
1301
|
def length
|
1168
1302
|
2
|
1169
1303
|
end
|
@@ -1210,6 +1344,14 @@ module SyntaxTree
|
|
1210
1344
|
[:duphash, object]
|
1211
1345
|
end
|
1212
1346
|
|
1347
|
+
def deconstruct_keys(_keys)
|
1348
|
+
{ object: object }
|
1349
|
+
end
|
1350
|
+
|
1351
|
+
def ==(other)
|
1352
|
+
other.is_a?(DupHash) && other.object == object
|
1353
|
+
end
|
1354
|
+
|
1213
1355
|
def length
|
1214
1356
|
2
|
1215
1357
|
end
|
@@ -1256,6 +1398,14 @@ module SyntaxTree
|
|
1256
1398
|
[:dupn, number]
|
1257
1399
|
end
|
1258
1400
|
|
1401
|
+
def deconstruct_keys(_keys)
|
1402
|
+
{ number: number }
|
1403
|
+
end
|
1404
|
+
|
1405
|
+
def ==(other)
|
1406
|
+
other.is_a?(DupN) && other.number == number
|
1407
|
+
end
|
1408
|
+
|
1259
1409
|
def length
|
1260
1410
|
2
|
1261
1411
|
end
|
@@ -1307,6 +1457,15 @@ module SyntaxTree
|
|
1307
1457
|
[:expandarray, number, flags]
|
1308
1458
|
end
|
1309
1459
|
|
1460
|
+
def deconstruct_keys(_keys)
|
1461
|
+
{ number: number, flags: flags }
|
1462
|
+
end
|
1463
|
+
|
1464
|
+
def ==(other)
|
1465
|
+
other.is_a?(ExpandArray) && other.number == number &&
|
1466
|
+
other.flags == flags
|
1467
|
+
end
|
1468
|
+
|
1310
1469
|
def length
|
1311
1470
|
3
|
1312
1471
|
end
|
@@ -1398,6 +1557,15 @@ module SyntaxTree
|
|
1398
1557
|
[:getblockparam, current.local_table.offset(index), level]
|
1399
1558
|
end
|
1400
1559
|
|
1560
|
+
def deconstruct_keys(_keys)
|
1561
|
+
{ index: index, level: level }
|
1562
|
+
end
|
1563
|
+
|
1564
|
+
def ==(other)
|
1565
|
+
other.is_a?(GetBlockParam) && other.index == index &&
|
1566
|
+
other.level == level
|
1567
|
+
end
|
1568
|
+
|
1401
1569
|
def length
|
1402
1570
|
3
|
1403
1571
|
end
|
@@ -1455,6 +1623,15 @@ module SyntaxTree
|
|
1455
1623
|
[:getblockparamproxy, current.local_table.offset(index), level]
|
1456
1624
|
end
|
1457
1625
|
|
1626
|
+
def deconstruct_keys(_keys)
|
1627
|
+
{ index: index, level: level }
|
1628
|
+
end
|
1629
|
+
|
1630
|
+
def ==(other)
|
1631
|
+
other.is_a?(GetBlockParamProxy) && other.index == index &&
|
1632
|
+
other.level == level
|
1633
|
+
end
|
1634
|
+
|
1458
1635
|
def length
|
1459
1636
|
3
|
1460
1637
|
end
|
@@ -1507,6 +1684,15 @@ module SyntaxTree
|
|
1507
1684
|
[:getclassvariable, name, cache]
|
1508
1685
|
end
|
1509
1686
|
|
1687
|
+
def deconstruct_keys(_keys)
|
1688
|
+
{ name: name, cache: cache }
|
1689
|
+
end
|
1690
|
+
|
1691
|
+
def ==(other)
|
1692
|
+
other.is_a?(GetClassVariable) && other.name == name &&
|
1693
|
+
other.cache == cache
|
1694
|
+
end
|
1695
|
+
|
1510
1696
|
def length
|
1511
1697
|
3
|
1512
1698
|
end
|
@@ -1557,6 +1743,14 @@ module SyntaxTree
|
|
1557
1743
|
[:getconstant, name]
|
1558
1744
|
end
|
1559
1745
|
|
1746
|
+
def deconstruct_keys(_keys)
|
1747
|
+
{ name: name }
|
1748
|
+
end
|
1749
|
+
|
1750
|
+
def ==(other)
|
1751
|
+
other.is_a?(GetConstant) && other.name == name
|
1752
|
+
end
|
1753
|
+
|
1560
1754
|
def length
|
1561
1755
|
2
|
1562
1756
|
end
|
@@ -1619,6 +1813,14 @@ module SyntaxTree
|
|
1619
1813
|
[:getglobal, name]
|
1620
1814
|
end
|
1621
1815
|
|
1816
|
+
def deconstruct_keys(_keys)
|
1817
|
+
{ name: name }
|
1818
|
+
end
|
1819
|
+
|
1820
|
+
def ==(other)
|
1821
|
+
other.is_a?(GetGlobal) && other.name == name
|
1822
|
+
end
|
1823
|
+
|
1622
1824
|
def length
|
1623
1825
|
2
|
1624
1826
|
end
|
@@ -1678,6 +1880,15 @@ module SyntaxTree
|
|
1678
1880
|
[:getinstancevariable, name, cache]
|
1679
1881
|
end
|
1680
1882
|
|
1883
|
+
def deconstruct_keys(_keys)
|
1884
|
+
{ name: name, cache: cache }
|
1885
|
+
end
|
1886
|
+
|
1887
|
+
def ==(other)
|
1888
|
+
other.is_a?(GetInstanceVariable) && other.name == name &&
|
1889
|
+
other.cache == cache
|
1890
|
+
end
|
1891
|
+
|
1681
1892
|
def length
|
1682
1893
|
3
|
1683
1894
|
end
|
@@ -1732,6 +1943,14 @@ module SyntaxTree
|
|
1732
1943
|
[:getlocal, current.local_table.offset(index), level]
|
1733
1944
|
end
|
1734
1945
|
|
1946
|
+
def deconstruct_keys(_keys)
|
1947
|
+
{ index: index, level: level }
|
1948
|
+
end
|
1949
|
+
|
1950
|
+
def ==(other)
|
1951
|
+
other.is_a?(GetLocal) && other.index == index && other.level == level
|
1952
|
+
end
|
1953
|
+
|
1735
1954
|
def length
|
1736
1955
|
3
|
1737
1956
|
end
|
@@ -1781,6 +2000,14 @@ module SyntaxTree
|
|
1781
2000
|
[:getlocal_WC_0, iseq.local_table.offset(index)]
|
1782
2001
|
end
|
1783
2002
|
|
2003
|
+
def deconstruct_keys(_keys)
|
2004
|
+
{ index: index }
|
2005
|
+
end
|
2006
|
+
|
2007
|
+
def ==(other)
|
2008
|
+
other.is_a?(GetLocalWC0) && other.index == index
|
2009
|
+
end
|
2010
|
+
|
1784
2011
|
def length
|
1785
2012
|
2
|
1786
2013
|
end
|
@@ -1830,6 +2057,14 @@ module SyntaxTree
|
|
1830
2057
|
[:getlocal_WC_1, iseq.parent_iseq.local_table.offset(index)]
|
1831
2058
|
end
|
1832
2059
|
|
2060
|
+
def deconstruct_keys(_keys)
|
2061
|
+
{ index: index }
|
2062
|
+
end
|
2063
|
+
|
2064
|
+
def ==(other)
|
2065
|
+
other.is_a?(GetLocalWC1) && other.index == index
|
2066
|
+
end
|
2067
|
+
|
1833
2068
|
def length
|
1834
2069
|
2
|
1835
2070
|
end
|
@@ -1881,6 +2116,14 @@ module SyntaxTree
|
|
1881
2116
|
[:getspecial, key, type]
|
1882
2117
|
end
|
1883
2118
|
|
2119
|
+
def deconstruct_keys(_keys)
|
2120
|
+
{ key: key, type: type }
|
2121
|
+
end
|
2122
|
+
|
2123
|
+
def ==(other)
|
2124
|
+
other.is_a?(GetSpecial) && other.key == key && other.type == type
|
2125
|
+
end
|
2126
|
+
|
1884
2127
|
def length
|
1885
2128
|
3
|
1886
2129
|
end
|
@@ -1929,6 +2172,14 @@ module SyntaxTree
|
|
1929
2172
|
[:intern]
|
1930
2173
|
end
|
1931
2174
|
|
2175
|
+
def deconstruct_keys(_keys)
|
2176
|
+
{}
|
2177
|
+
end
|
2178
|
+
|
2179
|
+
def ==(other)
|
2180
|
+
other.is_a?(Intern)
|
2181
|
+
end
|
2182
|
+
|
1932
2183
|
def length
|
1933
2184
|
1
|
1934
2185
|
end
|
@@ -1979,6 +2230,14 @@ module SyntaxTree
|
|
1979
2230
|
[:invokeblock, calldata.to_h]
|
1980
2231
|
end
|
1981
2232
|
|
2233
|
+
def deconstruct_keys(_keys)
|
2234
|
+
{ calldata: calldata }
|
2235
|
+
end
|
2236
|
+
|
2237
|
+
def ==(other)
|
2238
|
+
other.is_a?(InvokeBlock) && other.calldata == calldata
|
2239
|
+
end
|
2240
|
+
|
1982
2241
|
def length
|
1983
2242
|
2
|
1984
2243
|
end
|
@@ -2034,6 +2293,15 @@ module SyntaxTree
|
|
2034
2293
|
[:invokesuper, calldata.to_h, block_iseq&.to_a]
|
2035
2294
|
end
|
2036
2295
|
|
2296
|
+
def deconstruct_keys(_keys)
|
2297
|
+
{ calldata: calldata, block_iseq: block_iseq }
|
2298
|
+
end
|
2299
|
+
|
2300
|
+
def ==(other)
|
2301
|
+
other.is_a?(InvokeSuper) && other.calldata == calldata &&
|
2302
|
+
other.block_iseq == block_iseq
|
2303
|
+
end
|
2304
|
+
|
2037
2305
|
def length
|
2038
2306
|
1
|
2039
2307
|
end
|
@@ -2105,6 +2373,14 @@ module SyntaxTree
|
|
2105
2373
|
[:jump, label.name]
|
2106
2374
|
end
|
2107
2375
|
|
2376
|
+
def deconstruct_keys(_keys)
|
2377
|
+
{ label: label }
|
2378
|
+
end
|
2379
|
+
|
2380
|
+
def ==(other)
|
2381
|
+
other.is_a?(Jump) && other.label == label
|
2382
|
+
end
|
2383
|
+
|
2108
2384
|
def length
|
2109
2385
|
2
|
2110
2386
|
end
|
@@ -2145,6 +2421,14 @@ module SyntaxTree
|
|
2145
2421
|
[:leave]
|
2146
2422
|
end
|
2147
2423
|
|
2424
|
+
def deconstruct_keys(_keys)
|
2425
|
+
{}
|
2426
|
+
end
|
2427
|
+
|
2428
|
+
def ==(other)
|
2429
|
+
other.is_a?(Leave)
|
2430
|
+
end
|
2431
|
+
|
2148
2432
|
def length
|
2149
2433
|
1
|
2150
2434
|
end
|
@@ -2195,6 +2479,14 @@ module SyntaxTree
|
|
2195
2479
|
[:newarray, number]
|
2196
2480
|
end
|
2197
2481
|
|
2482
|
+
def deconstruct_keys(_keys)
|
2483
|
+
{ number: number }
|
2484
|
+
end
|
2485
|
+
|
2486
|
+
def ==(other)
|
2487
|
+
other.is_a?(NewArray) && other.number == number
|
2488
|
+
end
|
2489
|
+
|
2198
2490
|
def length
|
2199
2491
|
2
|
2200
2492
|
end
|
@@ -2243,6 +2535,14 @@ module SyntaxTree
|
|
2243
2535
|
[:newarraykwsplat, number]
|
2244
2536
|
end
|
2245
2537
|
|
2538
|
+
def deconstruct_keys(_keys)
|
2539
|
+
{ number: number }
|
2540
|
+
end
|
2541
|
+
|
2542
|
+
def ==(other)
|
2543
|
+
other.is_a?(NewArrayKwSplat) && other.number == number
|
2544
|
+
end
|
2545
|
+
|
2246
2546
|
def length
|
2247
2547
|
2
|
2248
2548
|
end
|
@@ -2293,6 +2593,14 @@ module SyntaxTree
|
|
2293
2593
|
[:newhash, number]
|
2294
2594
|
end
|
2295
2595
|
|
2596
|
+
def deconstruct_keys(_keys)
|
2597
|
+
{ number: number }
|
2598
|
+
end
|
2599
|
+
|
2600
|
+
def ==(other)
|
2601
|
+
other.is_a?(NewHash) && other.number == number
|
2602
|
+
end
|
2603
|
+
|
2296
2604
|
def length
|
2297
2605
|
2
|
2298
2606
|
end
|
@@ -2344,6 +2652,14 @@ module SyntaxTree
|
|
2344
2652
|
[:newrange, exclude_end]
|
2345
2653
|
end
|
2346
2654
|
|
2655
|
+
def deconstruct_keys(_keys)
|
2656
|
+
{ exclude_end: exclude_end }
|
2657
|
+
end
|
2658
|
+
|
2659
|
+
def ==(other)
|
2660
|
+
other.is_a?(NewRange) && other.exclude_end == exclude_end
|
2661
|
+
end
|
2662
|
+
|
2347
2663
|
def length
|
2348
2664
|
2
|
2349
2665
|
end
|
@@ -2385,6 +2701,14 @@ module SyntaxTree
|
|
2385
2701
|
[:nop]
|
2386
2702
|
end
|
2387
2703
|
|
2704
|
+
def deconstruct_keys(_keys)
|
2705
|
+
{}
|
2706
|
+
end
|
2707
|
+
|
2708
|
+
def ==(other)
|
2709
|
+
other.is_a?(Nop)
|
2710
|
+
end
|
2711
|
+
|
2388
2712
|
def length
|
2389
2713
|
1
|
2390
2714
|
end
|
@@ -2434,6 +2758,14 @@ module SyntaxTree
|
|
2434
2758
|
[:objtostring, calldata.to_h]
|
2435
2759
|
end
|
2436
2760
|
|
2761
|
+
def deconstruct_keys(_keys)
|
2762
|
+
{ calldata: calldata }
|
2763
|
+
end
|
2764
|
+
|
2765
|
+
def ==(other)
|
2766
|
+
other.is_a?(ObjToString) && other.calldata == calldata
|
2767
|
+
end
|
2768
|
+
|
2437
2769
|
def length
|
2438
2770
|
2
|
2439
2771
|
end
|
@@ -2485,6 +2817,14 @@ module SyntaxTree
|
|
2485
2817
|
[:once, iseq.to_a, cache]
|
2486
2818
|
end
|
2487
2819
|
|
2820
|
+
def deconstruct_keys(_keys)
|
2821
|
+
{ iseq: iseq, cache: cache }
|
2822
|
+
end
|
2823
|
+
|
2824
|
+
def ==(other)
|
2825
|
+
other.is_a?(Once) && other.iseq == iseq && other.cache == cache
|
2826
|
+
end
|
2827
|
+
|
2488
2828
|
def length
|
2489
2829
|
3
|
2490
2830
|
end
|
@@ -2536,6 +2876,14 @@ module SyntaxTree
|
|
2536
2876
|
[:opt_and, calldata.to_h]
|
2537
2877
|
end
|
2538
2878
|
|
2879
|
+
def deconstruct_keys(_keys)
|
2880
|
+
{ calldata: calldata }
|
2881
|
+
end
|
2882
|
+
|
2883
|
+
def ==(other)
|
2884
|
+
other.is_a?(OptAnd) && other.calldata == calldata
|
2885
|
+
end
|
2886
|
+
|
2539
2887
|
def length
|
2540
2888
|
2
|
2541
2889
|
end
|
@@ -2584,6 +2932,14 @@ module SyntaxTree
|
|
2584
2932
|
[:opt_aref, calldata.to_h]
|
2585
2933
|
end
|
2586
2934
|
|
2935
|
+
def deconstruct_keys(_keys)
|
2936
|
+
{ calldata: calldata }
|
2937
|
+
end
|
2938
|
+
|
2939
|
+
def ==(other)
|
2940
|
+
other.is_a?(OptAref) && other.calldata == calldata
|
2941
|
+
end
|
2942
|
+
|
2587
2943
|
def length
|
2588
2944
|
2
|
2589
2945
|
end
|
@@ -2637,6 +2993,15 @@ module SyntaxTree
|
|
2637
2993
|
[:opt_aref_with, object, calldata.to_h]
|
2638
2994
|
end
|
2639
2995
|
|
2996
|
+
def deconstruct_keys(_keys)
|
2997
|
+
{ object: object, calldata: calldata }
|
2998
|
+
end
|
2999
|
+
|
3000
|
+
def ==(other)
|
3001
|
+
other.is_a?(OptArefWith) && other.object == object &&
|
3002
|
+
other.calldata == calldata
|
3003
|
+
end
|
3004
|
+
|
2640
3005
|
def length
|
2641
3006
|
3
|
2642
3007
|
end
|
@@ -2686,6 +3051,14 @@ module SyntaxTree
|
|
2686
3051
|
[:opt_aset, calldata.to_h]
|
2687
3052
|
end
|
2688
3053
|
|
3054
|
+
def deconstruct_keys(_keys)
|
3055
|
+
{ calldata: calldata }
|
3056
|
+
end
|
3057
|
+
|
3058
|
+
def ==(other)
|
3059
|
+
other.is_a?(OptAset) && other.calldata == calldata
|
3060
|
+
end
|
3061
|
+
|
2689
3062
|
def length
|
2690
3063
|
2
|
2691
3064
|
end
|
@@ -2738,6 +3111,15 @@ module SyntaxTree
|
|
2738
3111
|
[:opt_aset_with, object, calldata.to_h]
|
2739
3112
|
end
|
2740
3113
|
|
3114
|
+
def deconstruct_keys(_keys)
|
3115
|
+
{ object: object, calldata: calldata }
|
3116
|
+
end
|
3117
|
+
|
3118
|
+
def ==(other)
|
3119
|
+
other.is_a?(OptAsetWith) && other.object == object &&
|
3120
|
+
other.calldata == calldata
|
3121
|
+
end
|
3122
|
+
|
2741
3123
|
def length
|
2742
3124
|
3
|
2743
3125
|
end
|
@@ -2806,6 +3188,16 @@ module SyntaxTree
|
|
2806
3188
|
]
|
2807
3189
|
end
|
2808
3190
|
|
3191
|
+
def deconstruct_keys(_keys)
|
3192
|
+
{ case_dispatch_hash: case_dispatch_hash, else_label: else_label }
|
3193
|
+
end
|
3194
|
+
|
3195
|
+
def ==(other)
|
3196
|
+
other.is_a?(OptCaseDispatch) &&
|
3197
|
+
other.case_dispatch_hash == case_dispatch_hash &&
|
3198
|
+
other.else_label == else_label
|
3199
|
+
end
|
3200
|
+
|
2809
3201
|
def length
|
2810
3202
|
3
|
2811
3203
|
end
|
@@ -2855,6 +3247,14 @@ module SyntaxTree
|
|
2855
3247
|
[:opt_div, calldata.to_h]
|
2856
3248
|
end
|
2857
3249
|
|
3250
|
+
def deconstruct_keys(_keys)
|
3251
|
+
{ calldata: calldata }
|
3252
|
+
end
|
3253
|
+
|
3254
|
+
def ==(other)
|
3255
|
+
other.is_a?(OptDiv) && other.calldata == calldata
|
3256
|
+
end
|
3257
|
+
|
2858
3258
|
def length
|
2859
3259
|
2
|
2860
3260
|
end
|
@@ -2903,6 +3303,14 @@ module SyntaxTree
|
|
2903
3303
|
[:opt_empty_p, calldata.to_h]
|
2904
3304
|
end
|
2905
3305
|
|
3306
|
+
def deconstruct_keys(_keys)
|
3307
|
+
{ calldata: calldata }
|
3308
|
+
end
|
3309
|
+
|
3310
|
+
def ==(other)
|
3311
|
+
other.is_a?(OptEmptyP) && other.calldata == calldata
|
3312
|
+
end
|
3313
|
+
|
2906
3314
|
def length
|
2907
3315
|
2
|
2908
3316
|
end
|
@@ -2952,6 +3360,14 @@ module SyntaxTree
|
|
2952
3360
|
[:opt_eq, calldata.to_h]
|
2953
3361
|
end
|
2954
3362
|
|
3363
|
+
def deconstruct_keys(_keys)
|
3364
|
+
{ calldata: calldata }
|
3365
|
+
end
|
3366
|
+
|
3367
|
+
def ==(other)
|
3368
|
+
other.is_a?(OptEq) && other.calldata == calldata
|
3369
|
+
end
|
3370
|
+
|
2955
3371
|
def length
|
2956
3372
|
2
|
2957
3373
|
end
|
@@ -3001,6 +3417,14 @@ module SyntaxTree
|
|
3001
3417
|
[:opt_ge, calldata.to_h]
|
3002
3418
|
end
|
3003
3419
|
|
3420
|
+
def deconstruct_keys(_keys)
|
3421
|
+
{ calldata: calldata }
|
3422
|
+
end
|
3423
|
+
|
3424
|
+
def ==(other)
|
3425
|
+
other.is_a?(OptGE) && other.calldata == calldata
|
3426
|
+
end
|
3427
|
+
|
3004
3428
|
def length
|
3005
3429
|
2
|
3006
3430
|
end
|
@@ -3050,6 +3474,14 @@ module SyntaxTree
|
|
3050
3474
|
[:opt_getconstant_path, names]
|
3051
3475
|
end
|
3052
3476
|
|
3477
|
+
def deconstruct_keys(_keys)
|
3478
|
+
{ names: names }
|
3479
|
+
end
|
3480
|
+
|
3481
|
+
def ==(other)
|
3482
|
+
other.is_a?(OptGetConstantPath) && other.names == names
|
3483
|
+
end
|
3484
|
+
|
3053
3485
|
def length
|
3054
3486
|
2
|
3055
3487
|
end
|
@@ -3106,6 +3538,14 @@ module SyntaxTree
|
|
3106
3538
|
[:opt_gt, calldata.to_h]
|
3107
3539
|
end
|
3108
3540
|
|
3541
|
+
def deconstruct_keys(_keys)
|
3542
|
+
{ calldata: calldata }
|
3543
|
+
end
|
3544
|
+
|
3545
|
+
def ==(other)
|
3546
|
+
other.is_a?(OptGT) && other.calldata == calldata
|
3547
|
+
end
|
3548
|
+
|
3109
3549
|
def length
|
3110
3550
|
2
|
3111
3551
|
end
|
@@ -3155,6 +3595,14 @@ module SyntaxTree
|
|
3155
3595
|
[:opt_le, calldata.to_h]
|
3156
3596
|
end
|
3157
3597
|
|
3598
|
+
def deconstruct_keys(_keys)
|
3599
|
+
{ calldata: calldata }
|
3600
|
+
end
|
3601
|
+
|
3602
|
+
def ==(other)
|
3603
|
+
other.is_a?(OptLE) && other.calldata == calldata
|
3604
|
+
end
|
3605
|
+
|
3158
3606
|
def length
|
3159
3607
|
2
|
3160
3608
|
end
|
@@ -3204,6 +3652,14 @@ module SyntaxTree
|
|
3204
3652
|
[:opt_length, calldata.to_h]
|
3205
3653
|
end
|
3206
3654
|
|
3655
|
+
def deconstruct_keys(_keys)
|
3656
|
+
{ calldata: calldata }
|
3657
|
+
end
|
3658
|
+
|
3659
|
+
def ==(other)
|
3660
|
+
other.is_a?(OptLength) && other.calldata == calldata
|
3661
|
+
end
|
3662
|
+
|
3207
3663
|
def length
|
3208
3664
|
2
|
3209
3665
|
end
|
@@ -3253,6 +3709,14 @@ module SyntaxTree
|
|
3253
3709
|
[:opt_lt, calldata.to_h]
|
3254
3710
|
end
|
3255
3711
|
|
3712
|
+
def deconstruct_keys(_keys)
|
3713
|
+
{ calldata: calldata }
|
3714
|
+
end
|
3715
|
+
|
3716
|
+
def ==(other)
|
3717
|
+
other.is_a?(OptLT) && other.calldata == calldata
|
3718
|
+
end
|
3719
|
+
|
3256
3720
|
def length
|
3257
3721
|
2
|
3258
3722
|
end
|
@@ -3302,6 +3766,14 @@ module SyntaxTree
|
|
3302
3766
|
[:opt_ltlt, calldata.to_h]
|
3303
3767
|
end
|
3304
3768
|
|
3769
|
+
def deconstruct_keys(_keys)
|
3770
|
+
{ calldata: calldata }
|
3771
|
+
end
|
3772
|
+
|
3773
|
+
def ==(other)
|
3774
|
+
other.is_a?(OptLTLT) && other.calldata == calldata
|
3775
|
+
end
|
3776
|
+
|
3305
3777
|
def length
|
3306
3778
|
2
|
3307
3779
|
end
|
@@ -3352,6 +3824,14 @@ module SyntaxTree
|
|
3352
3824
|
[:opt_minus, calldata.to_h]
|
3353
3825
|
end
|
3354
3826
|
|
3827
|
+
def deconstruct_keys(_keys)
|
3828
|
+
{ calldata: calldata }
|
3829
|
+
end
|
3830
|
+
|
3831
|
+
def ==(other)
|
3832
|
+
other.is_a?(OptMinus) && other.calldata == calldata
|
3833
|
+
end
|
3834
|
+
|
3355
3835
|
def length
|
3356
3836
|
2
|
3357
3837
|
end
|
@@ -3401,6 +3881,14 @@ module SyntaxTree
|
|
3401
3881
|
[:opt_mod, calldata.to_h]
|
3402
3882
|
end
|
3403
3883
|
|
3884
|
+
def deconstruct_keys(_keys)
|
3885
|
+
{ calldata: calldata }
|
3886
|
+
end
|
3887
|
+
|
3888
|
+
def ==(other)
|
3889
|
+
other.is_a?(OptMod) && other.calldata == calldata
|
3890
|
+
end
|
3891
|
+
|
3404
3892
|
def length
|
3405
3893
|
2
|
3406
3894
|
end
|
@@ -3450,6 +3938,14 @@ module SyntaxTree
|
|
3450
3938
|
[:opt_mult, calldata.to_h]
|
3451
3939
|
end
|
3452
3940
|
|
3941
|
+
def deconstruct_keys(_keys)
|
3942
|
+
{ calldata: calldata }
|
3943
|
+
end
|
3944
|
+
|
3945
|
+
def ==(other)
|
3946
|
+
other.is_a?(OptMult) && other.calldata == calldata
|
3947
|
+
end
|
3948
|
+
|
3453
3949
|
def length
|
3454
3950
|
2
|
3455
3951
|
end
|
@@ -3505,6 +4001,15 @@ module SyntaxTree
|
|
3505
4001
|
[:opt_neq, eq_calldata.to_h, neq_calldata.to_h]
|
3506
4002
|
end
|
3507
4003
|
|
4004
|
+
def deconstruct_keys(_keys)
|
4005
|
+
{ eq_calldata: eq_calldata, neq_calldata: neq_calldata }
|
4006
|
+
end
|
4007
|
+
|
4008
|
+
def ==(other)
|
4009
|
+
other.is_a?(OptNEq) && other.eq_calldata == eq_calldata &&
|
4010
|
+
other.neq_calldata == neq_calldata
|
4011
|
+
end
|
4012
|
+
|
3508
4013
|
def length
|
3509
4014
|
3
|
3510
4015
|
end
|
@@ -3554,6 +4059,14 @@ module SyntaxTree
|
|
3554
4059
|
[:opt_newarray_max, number]
|
3555
4060
|
end
|
3556
4061
|
|
4062
|
+
def deconstruct_keys(_keys)
|
4063
|
+
{ number: number }
|
4064
|
+
end
|
4065
|
+
|
4066
|
+
def ==(other)
|
4067
|
+
other.is_a?(OptNewArrayMax) && other.number == number
|
4068
|
+
end
|
4069
|
+
|
3557
4070
|
def length
|
3558
4071
|
2
|
3559
4072
|
end
|
@@ -3602,6 +4115,14 @@ module SyntaxTree
|
|
3602
4115
|
[:opt_newarray_min, number]
|
3603
4116
|
end
|
3604
4117
|
|
4118
|
+
def deconstruct_keys(_keys)
|
4119
|
+
{ number: number }
|
4120
|
+
end
|
4121
|
+
|
4122
|
+
def ==(other)
|
4123
|
+
other.is_a?(OptNewArrayMin) && other.number == number
|
4124
|
+
end
|
4125
|
+
|
3605
4126
|
def length
|
3606
4127
|
2
|
3607
4128
|
end
|
@@ -3651,6 +4172,14 @@ module SyntaxTree
|
|
3651
4172
|
[:opt_nil_p, calldata.to_h]
|
3652
4173
|
end
|
3653
4174
|
|
4175
|
+
def deconstruct_keys(_keys)
|
4176
|
+
{ calldata: calldata }
|
4177
|
+
end
|
4178
|
+
|
4179
|
+
def ==(other)
|
4180
|
+
other.is_a?(OptNilP) && other.calldata == calldata
|
4181
|
+
end
|
4182
|
+
|
3654
4183
|
def length
|
3655
4184
|
2
|
3656
4185
|
end
|
@@ -3698,6 +4227,14 @@ module SyntaxTree
|
|
3698
4227
|
[:opt_not, calldata.to_h]
|
3699
4228
|
end
|
3700
4229
|
|
4230
|
+
def deconstruct_keys(_keys)
|
4231
|
+
{ calldata: calldata }
|
4232
|
+
end
|
4233
|
+
|
4234
|
+
def ==(other)
|
4235
|
+
other.is_a?(OptNot) && other.calldata == calldata
|
4236
|
+
end
|
4237
|
+
|
3701
4238
|
def length
|
3702
4239
|
2
|
3703
4240
|
end
|
@@ -3747,6 +4284,14 @@ module SyntaxTree
|
|
3747
4284
|
[:opt_or, calldata.to_h]
|
3748
4285
|
end
|
3749
4286
|
|
4287
|
+
def deconstruct_keys(_keys)
|
4288
|
+
{ calldata: calldata }
|
4289
|
+
end
|
4290
|
+
|
4291
|
+
def ==(other)
|
4292
|
+
other.is_a?(OptOr) && other.calldata == calldata
|
4293
|
+
end
|
4294
|
+
|
3750
4295
|
def length
|
3751
4296
|
2
|
3752
4297
|
end
|
@@ -3796,6 +4341,14 @@ module SyntaxTree
|
|
3796
4341
|
[:opt_plus, calldata.to_h]
|
3797
4342
|
end
|
3798
4343
|
|
4344
|
+
def deconstruct_keys(_keys)
|
4345
|
+
{ calldata: calldata }
|
4346
|
+
end
|
4347
|
+
|
4348
|
+
def ==(other)
|
4349
|
+
other.is_a?(OptPlus) && other.calldata == calldata
|
4350
|
+
end
|
4351
|
+
|
3799
4352
|
def length
|
3800
4353
|
2
|
3801
4354
|
end
|
@@ -3844,6 +4397,14 @@ module SyntaxTree
|
|
3844
4397
|
[:opt_regexpmatch2, calldata.to_h]
|
3845
4398
|
end
|
3846
4399
|
|
4400
|
+
def deconstruct_keys(_keys)
|
4401
|
+
{ calldata: calldata }
|
4402
|
+
end
|
4403
|
+
|
4404
|
+
def ==(other)
|
4405
|
+
other.is_a?(OptRegExpMatch2) && other.calldata == calldata
|
4406
|
+
end
|
4407
|
+
|
3847
4408
|
def length
|
3848
4409
|
2
|
3849
4410
|
end
|
@@ -3892,6 +4453,14 @@ module SyntaxTree
|
|
3892
4453
|
[:opt_send_without_block, calldata.to_h]
|
3893
4454
|
end
|
3894
4455
|
|
4456
|
+
def deconstruct_keys(_keys)
|
4457
|
+
{ calldata: calldata }
|
4458
|
+
end
|
4459
|
+
|
4460
|
+
def ==(other)
|
4461
|
+
other.is_a?(OptSendWithoutBlock) && other.calldata == calldata
|
4462
|
+
end
|
4463
|
+
|
3895
4464
|
def length
|
3896
4465
|
2
|
3897
4466
|
end
|
@@ -3941,6 +4510,14 @@ module SyntaxTree
|
|
3941
4510
|
[:opt_size, calldata.to_h]
|
3942
4511
|
end
|
3943
4512
|
|
4513
|
+
def deconstruct_keys(_keys)
|
4514
|
+
{ calldata: calldata }
|
4515
|
+
end
|
4516
|
+
|
4517
|
+
def ==(other)
|
4518
|
+
other.is_a?(OptSize) && other.calldata == calldata
|
4519
|
+
end
|
4520
|
+
|
3944
4521
|
def length
|
3945
4522
|
2
|
3946
4523
|
end
|
@@ -3993,6 +4570,15 @@ module SyntaxTree
|
|
3993
4570
|
[:opt_str_freeze, object, calldata.to_h]
|
3994
4571
|
end
|
3995
4572
|
|
4573
|
+
def deconstruct_keys(_keys)
|
4574
|
+
{ object: object, calldata: calldata }
|
4575
|
+
end
|
4576
|
+
|
4577
|
+
def ==(other)
|
4578
|
+
other.is_a?(OptStrFreeze) && other.object == object &&
|
4579
|
+
other.calldata == calldata
|
4580
|
+
end
|
4581
|
+
|
3996
4582
|
def length
|
3997
4583
|
3
|
3998
4584
|
end
|
@@ -4045,6 +4631,15 @@ module SyntaxTree
|
|
4045
4631
|
[:opt_str_uminus, object, calldata.to_h]
|
4046
4632
|
end
|
4047
4633
|
|
4634
|
+
def deconstruct_keys(_keys)
|
4635
|
+
{ object: object, calldata: calldata }
|
4636
|
+
end
|
4637
|
+
|
4638
|
+
def ==(other)
|
4639
|
+
other.is_a?(OptStrUMinus) && other.object == object &&
|
4640
|
+
other.calldata == calldata
|
4641
|
+
end
|
4642
|
+
|
4048
4643
|
def length
|
4049
4644
|
3
|
4050
4645
|
end
|
@@ -4094,6 +4689,14 @@ module SyntaxTree
|
|
4094
4689
|
[:opt_succ, calldata.to_h]
|
4095
4690
|
end
|
4096
4691
|
|
4692
|
+
def deconstruct_keys(_keys)
|
4693
|
+
{ calldata: calldata }
|
4694
|
+
end
|
4695
|
+
|
4696
|
+
def ==(other)
|
4697
|
+
other.is_a?(OptSucc) && other.calldata == calldata
|
4698
|
+
end
|
4699
|
+
|
4097
4700
|
def length
|
4098
4701
|
2
|
4099
4702
|
end
|
@@ -4134,6 +4737,14 @@ module SyntaxTree
|
|
4134
4737
|
[:pop]
|
4135
4738
|
end
|
4136
4739
|
|
4740
|
+
def deconstruct_keys(_keys)
|
4741
|
+
{}
|
4742
|
+
end
|
4743
|
+
|
4744
|
+
def ==(other)
|
4745
|
+
other.is_a?(Pop)
|
4746
|
+
end
|
4747
|
+
|
4137
4748
|
def length
|
4138
4749
|
1
|
4139
4750
|
end
|
@@ -4174,6 +4785,14 @@ module SyntaxTree
|
|
4174
4785
|
[:putnil]
|
4175
4786
|
end
|
4176
4787
|
|
4788
|
+
def deconstruct_keys(_keys)
|
4789
|
+
{}
|
4790
|
+
end
|
4791
|
+
|
4792
|
+
def ==(other)
|
4793
|
+
other.is_a?(PutNil)
|
4794
|
+
end
|
4795
|
+
|
4177
4796
|
def length
|
4178
4797
|
1
|
4179
4798
|
end
|
@@ -4220,6 +4839,14 @@ module SyntaxTree
|
|
4220
4839
|
[:putobject, object]
|
4221
4840
|
end
|
4222
4841
|
|
4842
|
+
def deconstruct_keys(_keys)
|
4843
|
+
{ object: object }
|
4844
|
+
end
|
4845
|
+
|
4846
|
+
def ==(other)
|
4847
|
+
other.is_a?(PutObject) && other.object == object
|
4848
|
+
end
|
4849
|
+
|
4223
4850
|
def length
|
4224
4851
|
2
|
4225
4852
|
end
|
@@ -4262,6 +4889,14 @@ module SyntaxTree
|
|
4262
4889
|
[:putobject_INT2FIX_0_]
|
4263
4890
|
end
|
4264
4891
|
|
4892
|
+
def deconstruct_keys(_keys)
|
4893
|
+
{}
|
4894
|
+
end
|
4895
|
+
|
4896
|
+
def ==(other)
|
4897
|
+
other.is_a?(PutObjectInt2Fix0)
|
4898
|
+
end
|
4899
|
+
|
4265
4900
|
def length
|
4266
4901
|
1
|
4267
4902
|
end
|
@@ -4304,6 +4939,14 @@ module SyntaxTree
|
|
4304
4939
|
[:putobject_INT2FIX_1_]
|
4305
4940
|
end
|
4306
4941
|
|
4942
|
+
def deconstruct_keys(_keys)
|
4943
|
+
{}
|
4944
|
+
end
|
4945
|
+
|
4946
|
+
def ==(other)
|
4947
|
+
other.is_a?(PutObjectInt2Fix1)
|
4948
|
+
end
|
4949
|
+
|
4307
4950
|
def length
|
4308
4951
|
1
|
4309
4952
|
end
|
@@ -4344,6 +4987,14 @@ module SyntaxTree
|
|
4344
4987
|
[:putself]
|
4345
4988
|
end
|
4346
4989
|
|
4990
|
+
def deconstruct_keys(_keys)
|
4991
|
+
{}
|
4992
|
+
end
|
4993
|
+
|
4994
|
+
def ==(other)
|
4995
|
+
other.is_a?(PutSelf)
|
4996
|
+
end
|
4997
|
+
|
4347
4998
|
def length
|
4348
4999
|
1
|
4349
5000
|
end
|
@@ -4396,6 +5047,14 @@ module SyntaxTree
|
|
4396
5047
|
[:putspecialobject, object]
|
4397
5048
|
end
|
4398
5049
|
|
5050
|
+
def deconstruct_keys(_keys)
|
5051
|
+
{ object: object }
|
5052
|
+
end
|
5053
|
+
|
5054
|
+
def ==(other)
|
5055
|
+
other.is_a?(PutSpecialObject) && other.object == object
|
5056
|
+
end
|
5057
|
+
|
4399
5058
|
def length
|
4400
5059
|
2
|
4401
5060
|
end
|
@@ -4451,6 +5110,14 @@ module SyntaxTree
|
|
4451
5110
|
[:putstring, object]
|
4452
5111
|
end
|
4453
5112
|
|
5113
|
+
def deconstruct_keys(_keys)
|
5114
|
+
{ object: object }
|
5115
|
+
end
|
5116
|
+
|
5117
|
+
def ==(other)
|
5118
|
+
other.is_a?(PutString) && other.object == object
|
5119
|
+
end
|
5120
|
+
|
4454
5121
|
def length
|
4455
5122
|
2
|
4456
5123
|
end
|
@@ -4505,6 +5172,15 @@ module SyntaxTree
|
|
4505
5172
|
[:send, calldata.to_h, block_iseq&.to_a]
|
4506
5173
|
end
|
4507
5174
|
|
5175
|
+
def deconstruct_keys(_keys)
|
5176
|
+
{ calldata: calldata, block_iseq: block_iseq }
|
5177
|
+
end
|
5178
|
+
|
5179
|
+
def ==(other)
|
5180
|
+
other.is_a?(Send) && other.calldata == calldata &&
|
5181
|
+
other.block_iseq == block_iseq
|
5182
|
+
end
|
5183
|
+
|
4508
5184
|
def length
|
4509
5185
|
3
|
4510
5186
|
end
|
@@ -4582,6 +5258,15 @@ module SyntaxTree
|
|
4582
5258
|
[:setblockparam, current.local_table.offset(index), level]
|
4583
5259
|
end
|
4584
5260
|
|
5261
|
+
def deconstruct_keys(_keys)
|
5262
|
+
{ index: index, level: level }
|
5263
|
+
end
|
5264
|
+
|
5265
|
+
def ==(other)
|
5266
|
+
other.is_a?(SetBlockParam) && other.index == index &&
|
5267
|
+
other.level == level
|
5268
|
+
end
|
5269
|
+
|
4585
5270
|
def length
|
4586
5271
|
3
|
4587
5272
|
end
|
@@ -4635,6 +5320,15 @@ module SyntaxTree
|
|
4635
5320
|
[:setclassvariable, name, cache]
|
4636
5321
|
end
|
4637
5322
|
|
5323
|
+
def deconstruct_keys(_keys)
|
5324
|
+
{ name: name, cache: cache }
|
5325
|
+
end
|
5326
|
+
|
5327
|
+
def ==(other)
|
5328
|
+
other.is_a?(SetClassVariable) && other.name == name &&
|
5329
|
+
other.cache == cache
|
5330
|
+
end
|
5331
|
+
|
4638
5332
|
def length
|
4639
5333
|
3
|
4640
5334
|
end
|
@@ -4684,6 +5378,14 @@ module SyntaxTree
|
|
4684
5378
|
[:setconstant, name]
|
4685
5379
|
end
|
4686
5380
|
|
5381
|
+
def deconstruct_keys(_keys)
|
5382
|
+
{ name: name }
|
5383
|
+
end
|
5384
|
+
|
5385
|
+
def ==(other)
|
5386
|
+
other.is_a?(SetConstant) && other.name == name
|
5387
|
+
end
|
5388
|
+
|
4687
5389
|
def length
|
4688
5390
|
2
|
4689
5391
|
end
|
@@ -4732,6 +5434,14 @@ module SyntaxTree
|
|
4732
5434
|
[:setglobal, name]
|
4733
5435
|
end
|
4734
5436
|
|
5437
|
+
def deconstruct_keys(_keys)
|
5438
|
+
{ name: name }
|
5439
|
+
end
|
5440
|
+
|
5441
|
+
def ==(other)
|
5442
|
+
other.is_a?(SetGlobal) && other.name == name
|
5443
|
+
end
|
5444
|
+
|
4735
5445
|
def length
|
4736
5446
|
2
|
4737
5447
|
end
|
@@ -4790,6 +5500,15 @@ module SyntaxTree
|
|
4790
5500
|
[:setinstancevariable, name, cache]
|
4791
5501
|
end
|
4792
5502
|
|
5503
|
+
def deconstruct_keys(_keys)
|
5504
|
+
{ name: name, cache: cache }
|
5505
|
+
end
|
5506
|
+
|
5507
|
+
def ==(other)
|
5508
|
+
other.is_a?(SetInstanceVariable) && other.name == name &&
|
5509
|
+
other.cache == cache
|
5510
|
+
end
|
5511
|
+
|
4793
5512
|
def length
|
4794
5513
|
3
|
4795
5514
|
end
|
@@ -4844,6 +5563,14 @@ module SyntaxTree
|
|
4844
5563
|
[:setlocal, current.local_table.offset(index), level]
|
4845
5564
|
end
|
4846
5565
|
|
5566
|
+
def deconstruct_keys(_keys)
|
5567
|
+
{ index: index, level: level }
|
5568
|
+
end
|
5569
|
+
|
5570
|
+
def ==(other)
|
5571
|
+
other.is_a?(SetLocal) && other.index == index && other.level == level
|
5572
|
+
end
|
5573
|
+
|
4847
5574
|
def length
|
4848
5575
|
3
|
4849
5576
|
end
|
@@ -4893,6 +5620,14 @@ module SyntaxTree
|
|
4893
5620
|
[:setlocal_WC_0, iseq.local_table.offset(index)]
|
4894
5621
|
end
|
4895
5622
|
|
5623
|
+
def deconstruct_keys(_keys)
|
5624
|
+
{ index: index }
|
5625
|
+
end
|
5626
|
+
|
5627
|
+
def ==(other)
|
5628
|
+
other.is_a?(SetLocalWC0) && other.index == index
|
5629
|
+
end
|
5630
|
+
|
4896
5631
|
def length
|
4897
5632
|
2
|
4898
5633
|
end
|
@@ -4942,6 +5677,14 @@ module SyntaxTree
|
|
4942
5677
|
[:setlocal_WC_1, iseq.parent_iseq.local_table.offset(index)]
|
4943
5678
|
end
|
4944
5679
|
|
5680
|
+
def deconstruct_keys(_keys)
|
5681
|
+
{ index: index }
|
5682
|
+
end
|
5683
|
+
|
5684
|
+
def ==(other)
|
5685
|
+
other.is_a?(SetLocalWC1) && other.index == index
|
5686
|
+
end
|
5687
|
+
|
4945
5688
|
def length
|
4946
5689
|
2
|
4947
5690
|
end
|
@@ -4989,6 +5732,14 @@ module SyntaxTree
|
|
4989
5732
|
[:setn, number]
|
4990
5733
|
end
|
4991
5734
|
|
5735
|
+
def deconstruct_keys(_keys)
|
5736
|
+
{ number: number }
|
5737
|
+
end
|
5738
|
+
|
5739
|
+
def ==(other)
|
5740
|
+
other.is_a?(SetN) && other.number == number
|
5741
|
+
end
|
5742
|
+
|
4992
5743
|
def length
|
4993
5744
|
2
|
4994
5745
|
end
|
@@ -5037,6 +5788,14 @@ module SyntaxTree
|
|
5037
5788
|
[:setspecial, key]
|
5038
5789
|
end
|
5039
5790
|
|
5791
|
+
def deconstruct_keys(_keys)
|
5792
|
+
{ key: key }
|
5793
|
+
end
|
5794
|
+
|
5795
|
+
def ==(other)
|
5796
|
+
other.is_a?(SetSpecial) && other.key == key
|
5797
|
+
end
|
5798
|
+
|
5040
5799
|
def length
|
5041
5800
|
2
|
5042
5801
|
end
|
@@ -5092,6 +5851,14 @@ module SyntaxTree
|
|
5092
5851
|
[:splatarray, flag]
|
5093
5852
|
end
|
5094
5853
|
|
5854
|
+
def deconstruct_keys(_keys)
|
5855
|
+
{ flag: flag }
|
5856
|
+
end
|
5857
|
+
|
5858
|
+
def ==(other)
|
5859
|
+
other.is_a?(SplatArray) && other.flag == flag
|
5860
|
+
end
|
5861
|
+
|
5095
5862
|
def length
|
5096
5863
|
2
|
5097
5864
|
end
|
@@ -5156,6 +5923,14 @@ module SyntaxTree
|
|
5156
5923
|
[:swap]
|
5157
5924
|
end
|
5158
5925
|
|
5926
|
+
def deconstruct_keys(_keys)
|
5927
|
+
{}
|
5928
|
+
end
|
5929
|
+
|
5930
|
+
def ==(other)
|
5931
|
+
other.is_a?(Swap)
|
5932
|
+
end
|
5933
|
+
|
5159
5934
|
def length
|
5160
5935
|
1
|
5161
5936
|
end
|
@@ -5218,6 +5993,14 @@ module SyntaxTree
|
|
5218
5993
|
[:throw, type]
|
5219
5994
|
end
|
5220
5995
|
|
5996
|
+
def deconstruct_keys(_keys)
|
5997
|
+
{ type: type }
|
5998
|
+
end
|
5999
|
+
|
6000
|
+
def ==(other)
|
6001
|
+
other.is_a?(Throw) && other.type == type
|
6002
|
+
end
|
6003
|
+
|
5221
6004
|
def length
|
5222
6005
|
2
|
5223
6006
|
end
|
@@ -5304,6 +6087,14 @@ module SyntaxTree
|
|
5304
6087
|
[:topn, number]
|
5305
6088
|
end
|
5306
6089
|
|
6090
|
+
def deconstruct_keys(_keys)
|
6091
|
+
{ number: number }
|
6092
|
+
end
|
6093
|
+
|
6094
|
+
def ==(other)
|
6095
|
+
other.is_a?(TopN) && other.number == number
|
6096
|
+
end
|
6097
|
+
|
5307
6098
|
def length
|
5308
6099
|
2
|
5309
6100
|
end
|
@@ -5352,6 +6143,15 @@ module SyntaxTree
|
|
5352
6143
|
[:toregexp, options, length]
|
5353
6144
|
end
|
5354
6145
|
|
6146
|
+
def deconstruct_keys(_keys)
|
6147
|
+
{ options: options, length: length }
|
6148
|
+
end
|
6149
|
+
|
6150
|
+
def ==(other)
|
6151
|
+
other.is_a?(ToRegExp) && other.options == options &&
|
6152
|
+
other.length == length
|
6153
|
+
end
|
6154
|
+
|
5355
6155
|
def pops
|
5356
6156
|
length
|
5357
6157
|
end
|