prism 1.4.0 → 1.7.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/CHANGELOG.md +73 -1
- data/Makefile +7 -5
- data/README.md +3 -1
- data/config.yml +294 -41
- data/docs/build_system.md +2 -2
- data/docs/cruby_compilation.md +1 -1
- data/docs/design.md +2 -2
- data/docs/parser_translation.md +8 -23
- data/docs/releasing.md +6 -25
- data/docs/ripper_translation.md +1 -1
- data/ext/prism/api_node.c +9 -3
- data/ext/prism/extconf.rb +1 -1
- data/ext/prism/extension.c +24 -3
- data/ext/prism/extension.h +1 -1
- data/include/prism/ast.h +360 -70
- data/include/prism/diagnostic.h +7 -0
- data/include/prism/options.h +49 -3
- data/include/prism/parser.h +3 -0
- data/include/prism/regexp.h +2 -2
- data/include/prism/util/pm_buffer.h +8 -0
- data/include/prism/util/pm_integer.h +4 -0
- data/include/prism/util/pm_list.h +6 -0
- data/include/prism/util/pm_string.h +12 -2
- data/include/prism/version.h +2 -2
- data/include/prism.h +40 -15
- data/lib/prism/compiler.rb +456 -151
- data/lib/prism/desugar_compiler.rb +1 -0
- data/lib/prism/dispatcher.rb +16 -0
- data/lib/prism/dot_visitor.rb +10 -1
- data/lib/prism/dsl.rb +5 -2
- data/lib/prism/ffi.rb +28 -10
- data/lib/prism/inspect_visitor.rb +4 -0
- data/lib/prism/lex_compat.rb +1 -0
- data/lib/prism/mutation_compiler.rb +3 -0
- data/lib/prism/node.rb +559 -349
- data/lib/prism/node_ext.rb +4 -1
- data/lib/prism/pack.rb +2 -0
- data/lib/prism/parse_result/comments.rb +1 -0
- data/lib/prism/parse_result/errors.rb +1 -0
- data/lib/prism/parse_result/newlines.rb +1 -0
- data/lib/prism/parse_result.rb +3 -15
- data/lib/prism/pattern.rb +1 -0
- data/lib/prism/polyfill/scan_byte.rb +14 -0
- data/lib/prism/polyfill/warn.rb +36 -0
- data/lib/prism/reflection.rb +4 -1
- data/lib/prism/relocation.rb +1 -0
- data/lib/prism/serialize.rb +30 -22
- data/lib/prism/string_query.rb +1 -0
- data/lib/prism/translation/parser/builder.rb +1 -0
- data/lib/prism/translation/parser/compiler.rb +63 -41
- data/lib/prism/translation/parser/lexer.rb +29 -21
- data/lib/prism/translation/parser.rb +25 -4
- data/lib/prism/translation/parser33.rb +1 -0
- data/lib/prism/translation/parser34.rb +1 -0
- data/lib/prism/translation/parser35.rb +2 -6
- data/lib/prism/translation/parser40.rb +13 -0
- data/lib/prism/translation/parser41.rb +13 -0
- data/lib/prism/translation/parser_current.rb +26 -0
- data/lib/prism/translation/ripper/sexp.rb +1 -0
- data/lib/prism/translation/ripper.rb +19 -3
- data/lib/prism/translation/ruby_parser.rb +340 -22
- data/lib/prism/translation.rb +4 -0
- data/lib/prism/visitor.rb +457 -152
- data/lib/prism.rb +22 -0
- data/prism.gemspec +9 -1
- data/rbi/prism/dsl.rbi +6 -6
- data/rbi/prism/node.rbi +42 -17
- data/rbi/prism/translation/parser35.rbi +0 -2
- data/rbi/prism/translation/parser40.rbi +6 -0
- data/rbi/prism/translation/parser41.rbi +6 -0
- data/sig/prism/dispatcher.rbs +3 -0
- data/sig/prism/dsl.rbs +5 -5
- data/sig/prism/node.rbs +462 -38
- data/sig/prism/node_ext.rbs +84 -17
- data/sig/prism/parse_result/comments.rbs +38 -0
- data/sig/prism/parse_result.rbs +4 -0
- data/sig/prism/reflection.rbs +1 -1
- data/sig/prism.rbs +4 -0
- data/src/diagnostic.c +13 -1
- data/src/encoding.c +172 -67
- data/src/node.c +11 -0
- data/src/options.c +17 -7
- data/src/prettyprint.c +18 -0
- data/src/prism.c +1495 -2021
- data/src/serialize.c +9 -1
- data/src/token_type.c +38 -36
- data/src/util/pm_constant_pool.c +1 -1
- data/src/util/pm_string.c +6 -8
- metadata +11 -3
data/lib/prism/node.rb
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
# :markup: markdown
|
|
2
3
|
|
|
3
4
|
=begin
|
|
5
|
+
--
|
|
4
6
|
This file is generated by the templates/template.rb script and should not be
|
|
5
7
|
modified manually. See templates/lib/prism/node.rb.erb
|
|
6
8
|
if you are looking to modify the template
|
|
9
|
+
++
|
|
7
10
|
=end
|
|
8
11
|
|
|
9
12
|
module Prism
|
|
@@ -330,7 +333,7 @@ module Prism
|
|
|
330
333
|
visitor.visit_alias_global_variable_node(self)
|
|
331
334
|
end
|
|
332
335
|
|
|
333
|
-
# def child_nodes: () -> Array[
|
|
336
|
+
# def child_nodes: () -> Array[Node?]
|
|
334
337
|
def child_nodes
|
|
335
338
|
[new_name, old_name]
|
|
336
339
|
end
|
|
@@ -350,7 +353,7 @@ module Prism
|
|
|
350
353
|
AliasGlobalVariableNode.new(source, node_id, location, flags, new_name, old_name, keyword_loc)
|
|
351
354
|
end
|
|
352
355
|
|
|
353
|
-
# def deconstruct: () -> Array[
|
|
356
|
+
# def deconstruct: () -> Array[Node?]
|
|
354
357
|
alias deconstruct child_nodes
|
|
355
358
|
|
|
356
359
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, keyword_loc: Location }
|
|
@@ -437,7 +440,7 @@ module Prism
|
|
|
437
440
|
visitor.visit_alias_method_node(self)
|
|
438
441
|
end
|
|
439
442
|
|
|
440
|
-
# def child_nodes: () -> Array[
|
|
443
|
+
# def child_nodes: () -> Array[Node?]
|
|
441
444
|
def child_nodes
|
|
442
445
|
[new_name, old_name]
|
|
443
446
|
end
|
|
@@ -457,7 +460,7 @@ module Prism
|
|
|
457
460
|
AliasMethodNode.new(source, node_id, location, flags, new_name, old_name, keyword_loc)
|
|
458
461
|
end
|
|
459
462
|
|
|
460
|
-
# def deconstruct: () -> Array[
|
|
463
|
+
# def deconstruct: () -> Array[Node?]
|
|
461
464
|
alias deconstruct child_nodes
|
|
462
465
|
|
|
463
466
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: SymbolNode | InterpolatedSymbolNode, old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, keyword_loc: Location }
|
|
@@ -556,7 +559,7 @@ module Prism
|
|
|
556
559
|
visitor.visit_alternation_pattern_node(self)
|
|
557
560
|
end
|
|
558
561
|
|
|
559
|
-
# def child_nodes: () -> Array[
|
|
562
|
+
# def child_nodes: () -> Array[Node?]
|
|
560
563
|
def child_nodes
|
|
561
564
|
[left, right]
|
|
562
565
|
end
|
|
@@ -576,7 +579,7 @@ module Prism
|
|
|
576
579
|
AlternationPatternNode.new(source, node_id, location, flags, left, right, operator_loc)
|
|
577
580
|
end
|
|
578
581
|
|
|
579
|
-
# def deconstruct: () -> Array[
|
|
582
|
+
# def deconstruct: () -> Array[Node?]
|
|
580
583
|
alias deconstruct child_nodes
|
|
581
584
|
|
|
582
585
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location }
|
|
@@ -663,7 +666,7 @@ module Prism
|
|
|
663
666
|
visitor.visit_and_node(self)
|
|
664
667
|
end
|
|
665
668
|
|
|
666
|
-
# def child_nodes: () -> Array[
|
|
669
|
+
# def child_nodes: () -> Array[Node?]
|
|
667
670
|
def child_nodes
|
|
668
671
|
[left, right]
|
|
669
672
|
end
|
|
@@ -683,7 +686,7 @@ module Prism
|
|
|
683
686
|
AndNode.new(source, node_id, location, flags, left, right, operator_loc)
|
|
684
687
|
end
|
|
685
688
|
|
|
686
|
-
# def deconstruct: () -> Array[
|
|
689
|
+
# def deconstruct: () -> Array[Node?]
|
|
687
690
|
alias deconstruct child_nodes
|
|
688
691
|
|
|
689
692
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location }
|
|
@@ -774,7 +777,7 @@ module Prism
|
|
|
774
777
|
visitor.visit_arguments_node(self)
|
|
775
778
|
end
|
|
776
779
|
|
|
777
|
-
# def child_nodes: () -> Array[
|
|
780
|
+
# def child_nodes: () -> Array[Node?]
|
|
778
781
|
def child_nodes
|
|
779
782
|
[*arguments]
|
|
780
783
|
end
|
|
@@ -794,7 +797,7 @@ module Prism
|
|
|
794
797
|
ArgumentsNode.new(source, node_id, location, flags, arguments)
|
|
795
798
|
end
|
|
796
799
|
|
|
797
|
-
# def deconstruct: () -> Array[
|
|
800
|
+
# def deconstruct: () -> Array[Node?]
|
|
798
801
|
alias deconstruct child_nodes
|
|
799
802
|
|
|
800
803
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: Array[Prism::node] }
|
|
@@ -879,7 +882,7 @@ module Prism
|
|
|
879
882
|
visitor.visit_array_node(self)
|
|
880
883
|
end
|
|
881
884
|
|
|
882
|
-
# def child_nodes: () -> Array[
|
|
885
|
+
# def child_nodes: () -> Array[Node?]
|
|
883
886
|
def child_nodes
|
|
884
887
|
[*elements]
|
|
885
888
|
end
|
|
@@ -899,7 +902,7 @@ module Prism
|
|
|
899
902
|
ArrayNode.new(source, node_id, location, flags, elements, opening_loc, closing_loc)
|
|
900
903
|
end
|
|
901
904
|
|
|
902
|
-
# def deconstruct: () -> Array[
|
|
905
|
+
# def deconstruct: () -> Array[Node?]
|
|
903
906
|
alias deconstruct child_nodes
|
|
904
907
|
|
|
905
908
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location? }
|
|
@@ -1036,7 +1039,7 @@ module Prism
|
|
|
1036
1039
|
visitor.visit_array_pattern_node(self)
|
|
1037
1040
|
end
|
|
1038
1041
|
|
|
1039
|
-
# def child_nodes: () -> Array[
|
|
1042
|
+
# def child_nodes: () -> Array[Node?]
|
|
1040
1043
|
def child_nodes
|
|
1041
1044
|
[constant, *requireds, rest, *posts]
|
|
1042
1045
|
end
|
|
@@ -1056,20 +1059,29 @@ module Prism
|
|
|
1056
1059
|
[*constant, *requireds, *rest, *posts, *opening_loc, *closing_loc] #: Array[Prism::node | Location]
|
|
1057
1060
|
end
|
|
1058
1061
|
|
|
1059
|
-
# def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant:
|
|
1062
|
+
# def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayPatternNode
|
|
1060
1063
|
def copy(node_id: self.node_id, location: self.location, flags: self.flags, constant: self.constant, requireds: self.requireds, rest: self.rest, posts: self.posts, opening_loc: self.opening_loc, closing_loc: self.closing_loc)
|
|
1061
1064
|
ArrayPatternNode.new(source, node_id, location, flags, constant, requireds, rest, posts, opening_loc, closing_loc)
|
|
1062
1065
|
end
|
|
1063
1066
|
|
|
1064
|
-
# def deconstruct: () -> Array[
|
|
1067
|
+
# def deconstruct: () -> Array[Node?]
|
|
1065
1068
|
alias deconstruct child_nodes
|
|
1066
1069
|
|
|
1067
|
-
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant:
|
|
1070
|
+
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location? }
|
|
1068
1071
|
def deconstruct_keys(keys)
|
|
1069
1072
|
{ node_id: node_id, location: location, constant: constant, requireds: requireds, rest: rest, posts: posts, opening_loc: opening_loc, closing_loc: closing_loc }
|
|
1070
1073
|
end
|
|
1071
1074
|
|
|
1072
|
-
#
|
|
1075
|
+
# Represents the optional constant preceding the Array
|
|
1076
|
+
#
|
|
1077
|
+
# foo in Bar[]
|
|
1078
|
+
# ^^^
|
|
1079
|
+
#
|
|
1080
|
+
# foo in Bar[1, 2, 3]
|
|
1081
|
+
# ^^^
|
|
1082
|
+
#
|
|
1083
|
+
# foo in Bar::Baz[1, 2, 3]
|
|
1084
|
+
# ^^^^^^^^
|
|
1073
1085
|
attr_reader :constant
|
|
1074
1086
|
|
|
1075
1087
|
# Represents the required elements of the array pattern.
|
|
@@ -1195,7 +1207,7 @@ module Prism
|
|
|
1195
1207
|
visitor.visit_assoc_node(self)
|
|
1196
1208
|
end
|
|
1197
1209
|
|
|
1198
|
-
# def child_nodes: () -> Array[
|
|
1210
|
+
# def child_nodes: () -> Array[Node?]
|
|
1199
1211
|
def child_nodes
|
|
1200
1212
|
[key, value]
|
|
1201
1213
|
end
|
|
@@ -1215,7 +1227,7 @@ module Prism
|
|
|
1215
1227
|
AssocNode.new(source, node_id, location, flags, key, value, operator_loc)
|
|
1216
1228
|
end
|
|
1217
1229
|
|
|
1218
|
-
# def deconstruct: () -> Array[
|
|
1230
|
+
# def deconstruct: () -> Array[Node?]
|
|
1219
1231
|
alias deconstruct child_nodes
|
|
1220
1232
|
|
|
1221
1233
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, key: Prism::node, value: Prism::node, operator_loc: Location? }
|
|
@@ -1316,7 +1328,7 @@ module Prism
|
|
|
1316
1328
|
visitor.visit_assoc_splat_node(self)
|
|
1317
1329
|
end
|
|
1318
1330
|
|
|
1319
|
-
# def child_nodes: () -> Array[
|
|
1331
|
+
# def child_nodes: () -> Array[Node?]
|
|
1320
1332
|
def child_nodes
|
|
1321
1333
|
[value]
|
|
1322
1334
|
end
|
|
@@ -1338,7 +1350,7 @@ module Prism
|
|
|
1338
1350
|
AssocSplatNode.new(source, node_id, location, flags, value, operator_loc)
|
|
1339
1351
|
end
|
|
1340
1352
|
|
|
1341
|
-
# def deconstruct: () -> Array[
|
|
1353
|
+
# def deconstruct: () -> Array[Node?]
|
|
1342
1354
|
alias deconstruct child_nodes
|
|
1343
1355
|
|
|
1344
1356
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node?, operator_loc: Location }
|
|
@@ -1416,7 +1428,7 @@ module Prism
|
|
|
1416
1428
|
visitor.visit_back_reference_read_node(self)
|
|
1417
1429
|
end
|
|
1418
1430
|
|
|
1419
|
-
# def child_nodes: () -> Array[
|
|
1431
|
+
# def child_nodes: () -> Array[Node?]
|
|
1420
1432
|
def child_nodes
|
|
1421
1433
|
[]
|
|
1422
1434
|
end
|
|
@@ -1436,7 +1448,7 @@ module Prism
|
|
|
1436
1448
|
BackReferenceReadNode.new(source, node_id, location, flags, name)
|
|
1437
1449
|
end
|
|
1438
1450
|
|
|
1439
|
-
# def deconstruct: () -> Array[
|
|
1451
|
+
# def deconstruct: () -> Array[Node?]
|
|
1440
1452
|
alias deconstruct child_nodes
|
|
1441
1453
|
|
|
1442
1454
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
|
@@ -1500,7 +1512,7 @@ module Prism
|
|
|
1500
1512
|
visitor.visit_begin_node(self)
|
|
1501
1513
|
end
|
|
1502
1514
|
|
|
1503
|
-
# def child_nodes: () -> Array[
|
|
1515
|
+
# def child_nodes: () -> Array[Node?]
|
|
1504
1516
|
def child_nodes
|
|
1505
1517
|
[statements, rescue_clause, else_clause, ensure_clause]
|
|
1506
1518
|
end
|
|
@@ -1525,7 +1537,7 @@ module Prism
|
|
|
1525
1537
|
BeginNode.new(source, node_id, location, flags, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc)
|
|
1526
1538
|
end
|
|
1527
1539
|
|
|
1528
|
-
# def deconstruct: () -> Array[
|
|
1540
|
+
# def deconstruct: () -> Array[Node?]
|
|
1529
1541
|
alias deconstruct child_nodes
|
|
1530
1542
|
|
|
1531
1543
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location? }
|
|
@@ -1659,7 +1671,7 @@ module Prism
|
|
|
1659
1671
|
visitor.visit_block_argument_node(self)
|
|
1660
1672
|
end
|
|
1661
1673
|
|
|
1662
|
-
# def child_nodes: () -> Array[
|
|
1674
|
+
# def child_nodes: () -> Array[Node?]
|
|
1663
1675
|
def child_nodes
|
|
1664
1676
|
[expression]
|
|
1665
1677
|
end
|
|
@@ -1681,7 +1693,7 @@ module Prism
|
|
|
1681
1693
|
BlockArgumentNode.new(source, node_id, location, flags, expression, operator_loc)
|
|
1682
1694
|
end
|
|
1683
1695
|
|
|
1684
|
-
# def deconstruct: () -> Array[
|
|
1696
|
+
# def deconstruct: () -> Array[Node?]
|
|
1685
1697
|
alias deconstruct child_nodes
|
|
1686
1698
|
|
|
1687
1699
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node?, operator_loc: Location }
|
|
@@ -1759,7 +1771,7 @@ module Prism
|
|
|
1759
1771
|
visitor.visit_block_local_variable_node(self)
|
|
1760
1772
|
end
|
|
1761
1773
|
|
|
1762
|
-
# def child_nodes: () -> Array[
|
|
1774
|
+
# def child_nodes: () -> Array[Node?]
|
|
1763
1775
|
def child_nodes
|
|
1764
1776
|
[]
|
|
1765
1777
|
end
|
|
@@ -1779,7 +1791,7 @@ module Prism
|
|
|
1779
1791
|
BlockLocalVariableNode.new(source, node_id, location, flags, name)
|
|
1780
1792
|
end
|
|
1781
1793
|
|
|
1782
|
-
# def deconstruct: () -> Array[
|
|
1794
|
+
# def deconstruct: () -> Array[Node?]
|
|
1783
1795
|
alias deconstruct child_nodes
|
|
1784
1796
|
|
|
1785
1797
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
|
@@ -1845,7 +1857,7 @@ module Prism
|
|
|
1845
1857
|
visitor.visit_block_node(self)
|
|
1846
1858
|
end
|
|
1847
1859
|
|
|
1848
|
-
# def child_nodes: () -> Array[
|
|
1860
|
+
# def child_nodes: () -> Array[Node?]
|
|
1849
1861
|
def child_nodes
|
|
1850
1862
|
[parameters, body]
|
|
1851
1863
|
end
|
|
@@ -1868,7 +1880,7 @@ module Prism
|
|
|
1868
1880
|
BlockNode.new(source, node_id, location, flags, locals, parameters, body, opening_loc, closing_loc)
|
|
1869
1881
|
end
|
|
1870
1882
|
|
|
1871
|
-
# def deconstruct: () -> Array[
|
|
1883
|
+
# def deconstruct: () -> Array[Node?]
|
|
1872
1884
|
alias deconstruct child_nodes
|
|
1873
1885
|
|
|
1874
1886
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil, opening_loc: Location, closing_loc: Location }
|
|
@@ -1990,7 +2002,7 @@ module Prism
|
|
|
1990
2002
|
visitor.visit_block_parameter_node(self)
|
|
1991
2003
|
end
|
|
1992
2004
|
|
|
1993
|
-
# def child_nodes: () -> Array[
|
|
2005
|
+
# def child_nodes: () -> Array[Node?]
|
|
1994
2006
|
def child_nodes
|
|
1995
2007
|
[]
|
|
1996
2008
|
end
|
|
@@ -2010,7 +2022,7 @@ module Prism
|
|
|
2010
2022
|
BlockParameterNode.new(source, node_id, location, flags, name, name_loc, operator_loc)
|
|
2011
2023
|
end
|
|
2012
2024
|
|
|
2013
|
-
# def deconstruct: () -> Array[
|
|
2025
|
+
# def deconstruct: () -> Array[Node?]
|
|
2014
2026
|
alias deconstruct child_nodes
|
|
2015
2027
|
|
|
2016
2028
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location }
|
|
@@ -2126,7 +2138,7 @@ module Prism
|
|
|
2126
2138
|
visitor.visit_block_parameters_node(self)
|
|
2127
2139
|
end
|
|
2128
2140
|
|
|
2129
|
-
# def child_nodes: () -> Array[
|
|
2141
|
+
# def child_nodes: () -> Array[Node?]
|
|
2130
2142
|
def child_nodes
|
|
2131
2143
|
[parameters, *locals]
|
|
2132
2144
|
end
|
|
@@ -2149,7 +2161,7 @@ module Prism
|
|
|
2149
2161
|
BlockParametersNode.new(source, node_id, location, flags, parameters, locals, opening_loc, closing_loc)
|
|
2150
2162
|
end
|
|
2151
2163
|
|
|
2152
|
-
# def deconstruct: () -> Array[
|
|
2164
|
+
# def deconstruct: () -> Array[Node?]
|
|
2153
2165
|
alias deconstruct child_nodes
|
|
2154
2166
|
|
|
2155
2167
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location? }
|
|
@@ -2286,7 +2298,7 @@ module Prism
|
|
|
2286
2298
|
visitor.visit_break_node(self)
|
|
2287
2299
|
end
|
|
2288
2300
|
|
|
2289
|
-
# def child_nodes: () -> Array[
|
|
2301
|
+
# def child_nodes: () -> Array[Node?]
|
|
2290
2302
|
def child_nodes
|
|
2291
2303
|
[arguments]
|
|
2292
2304
|
end
|
|
@@ -2308,7 +2320,7 @@ module Prism
|
|
|
2308
2320
|
BreakNode.new(source, node_id, location, flags, arguments, keyword_loc)
|
|
2309
2321
|
end
|
|
2310
2322
|
|
|
2311
|
-
# def deconstruct: () -> Array[
|
|
2323
|
+
# def deconstruct: () -> Array[Node?]
|
|
2312
2324
|
alias deconstruct child_nodes
|
|
2313
2325
|
|
|
2314
2326
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location }
|
|
@@ -2392,7 +2404,7 @@ module Prism
|
|
|
2392
2404
|
visitor.visit_call_and_write_node(self)
|
|
2393
2405
|
end
|
|
2394
2406
|
|
|
2395
|
-
# def child_nodes: () -> Array[
|
|
2407
|
+
# def child_nodes: () -> Array[Node?]
|
|
2396
2408
|
def child_nodes
|
|
2397
2409
|
[receiver, value]
|
|
2398
2410
|
end
|
|
@@ -2415,7 +2427,7 @@ module Prism
|
|
|
2415
2427
|
CallAndWriteNode.new(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value)
|
|
2416
2428
|
end
|
|
2417
2429
|
|
|
2418
|
-
# def deconstruct: () -> Array[
|
|
2430
|
+
# def deconstruct: () -> Array[Node?]
|
|
2419
2431
|
alias deconstruct child_nodes
|
|
2420
2432
|
|
|
2421
2433
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node }
|
|
@@ -2593,7 +2605,7 @@ module Prism
|
|
|
2593
2605
|
# ^^^^^^^^
|
|
2594
2606
|
class CallNode < Node
|
|
2595
2607
|
# Initialize a new CallNode node.
|
|
2596
|
-
def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block)
|
|
2608
|
+
def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, equal_loc, block)
|
|
2597
2609
|
@source = source
|
|
2598
2610
|
@node_id = node_id
|
|
2599
2611
|
@location = location
|
|
@@ -2605,6 +2617,7 @@ module Prism
|
|
|
2605
2617
|
@opening_loc = opening_loc
|
|
2606
2618
|
@arguments = arguments
|
|
2607
2619
|
@closing_loc = closing_loc
|
|
2620
|
+
@equal_loc = equal_loc
|
|
2608
2621
|
@block = block
|
|
2609
2622
|
end
|
|
2610
2623
|
|
|
@@ -2613,7 +2626,7 @@ module Prism
|
|
|
2613
2626
|
visitor.visit_call_node(self)
|
|
2614
2627
|
end
|
|
2615
2628
|
|
|
2616
|
-
# def child_nodes: () -> Array[
|
|
2629
|
+
# def child_nodes: () -> Array[Node?]
|
|
2617
2630
|
def child_nodes
|
|
2618
2631
|
[receiver, arguments, block]
|
|
2619
2632
|
end
|
|
@@ -2629,20 +2642,20 @@ module Prism
|
|
|
2629
2642
|
|
|
2630
2643
|
# def comment_targets: () -> Array[Node | Location]
|
|
2631
2644
|
def comment_targets
|
|
2632
|
-
[*receiver, *call_operator_loc, *message_loc, *opening_loc, *arguments, *closing_loc, *block] #: Array[Prism::node | Location]
|
|
2645
|
+
[*receiver, *call_operator_loc, *message_loc, *opening_loc, *arguments, *closing_loc, *equal_loc, *block] #: Array[Prism::node | Location]
|
|
2633
2646
|
end
|
|
2634
2647
|
|
|
2635
|
-
# def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> CallNode
|
|
2636
|
-
def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, name: self.name, message_loc: self.message_loc, opening_loc: self.opening_loc, arguments: self.arguments, closing_loc: self.closing_loc, block: self.block)
|
|
2637
|
-
CallNode.new(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block)
|
|
2648
|
+
# def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?equal_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> CallNode
|
|
2649
|
+
def copy(node_id: self.node_id, location: self.location, flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, name: self.name, message_loc: self.message_loc, opening_loc: self.opening_loc, arguments: self.arguments, closing_loc: self.closing_loc, equal_loc: self.equal_loc, block: self.block)
|
|
2650
|
+
CallNode.new(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, equal_loc, block)
|
|
2638
2651
|
end
|
|
2639
2652
|
|
|
2640
|
-
# def deconstruct: () -> Array[
|
|
2653
|
+
# def deconstruct: () -> Array[Node?]
|
|
2641
2654
|
alias deconstruct child_nodes
|
|
2642
2655
|
|
|
2643
|
-
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: BlockNode | BlockArgumentNode | nil }
|
|
2656
|
+
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, equal_loc: Location?, block: BlockNode | BlockArgumentNode | nil }
|
|
2644
2657
|
def deconstruct_keys(keys)
|
|
2645
|
-
{ node_id: node_id, location: location, receiver: receiver, call_operator_loc: call_operator_loc, name: name, message_loc: message_loc, opening_loc: opening_loc, arguments: arguments, closing_loc: closing_loc, block: block }
|
|
2658
|
+
{ node_id: node_id, location: location, receiver: receiver, call_operator_loc: call_operator_loc, name: name, message_loc: message_loc, opening_loc: opening_loc, arguments: arguments, closing_loc: closing_loc, equal_loc: equal_loc, block: block }
|
|
2646
2659
|
end
|
|
2647
2660
|
|
|
2648
2661
|
# def safe_navigation?: () -> bool
|
|
@@ -2779,6 +2792,31 @@ module Prism
|
|
|
2779
2792
|
repository.enter(node_id, :closing_loc) unless @closing_loc.nil?
|
|
2780
2793
|
end
|
|
2781
2794
|
|
|
2795
|
+
# Represents the location of the equal sign, in the case that this is an attribute write.
|
|
2796
|
+
#
|
|
2797
|
+
# foo.bar = value
|
|
2798
|
+
# ^
|
|
2799
|
+
#
|
|
2800
|
+
# foo[bar] = value
|
|
2801
|
+
# ^
|
|
2802
|
+
def equal_loc
|
|
2803
|
+
location = @equal_loc
|
|
2804
|
+
case location
|
|
2805
|
+
when nil
|
|
2806
|
+
nil
|
|
2807
|
+
when Location
|
|
2808
|
+
location
|
|
2809
|
+
else
|
|
2810
|
+
@equal_loc = Location.new(source, location >> 32, location & 0xFFFFFFFF)
|
|
2811
|
+
end
|
|
2812
|
+
end
|
|
2813
|
+
|
|
2814
|
+
# Save the equal_loc location using the given saved source so that
|
|
2815
|
+
# it can be retrieved later.
|
|
2816
|
+
def save_equal_loc(repository)
|
|
2817
|
+
repository.enter(node_id, :equal_loc) unless @equal_loc.nil?
|
|
2818
|
+
end
|
|
2819
|
+
|
|
2782
2820
|
# Represents the block that is being passed to the method.
|
|
2783
2821
|
#
|
|
2784
2822
|
# foo { |a| a }
|
|
@@ -2805,6 +2843,11 @@ module Prism
|
|
|
2805
2843
|
closing_loc&.slice
|
|
2806
2844
|
end
|
|
2807
2845
|
|
|
2846
|
+
# def equal: () -> String?
|
|
2847
|
+
def equal
|
|
2848
|
+
equal_loc&.slice
|
|
2849
|
+
end
|
|
2850
|
+
|
|
2808
2851
|
# def inspect -> String
|
|
2809
2852
|
def inspect
|
|
2810
2853
|
InspectVisitor.compose(self)
|
|
@@ -2832,6 +2875,7 @@ module Prism
|
|
|
2832
2875
|
(opening_loc.nil? == other.opening_loc.nil?) &&
|
|
2833
2876
|
(arguments === other.arguments) &&
|
|
2834
2877
|
(closing_loc.nil? == other.closing_loc.nil?) &&
|
|
2878
|
+
(equal_loc.nil? == other.equal_loc.nil?) &&
|
|
2835
2879
|
(block === other.block)
|
|
2836
2880
|
end
|
|
2837
2881
|
end
|
|
@@ -2862,7 +2906,7 @@ module Prism
|
|
|
2862
2906
|
visitor.visit_call_operator_write_node(self)
|
|
2863
2907
|
end
|
|
2864
2908
|
|
|
2865
|
-
# def child_nodes: () -> Array[
|
|
2909
|
+
# def child_nodes: () -> Array[Node?]
|
|
2866
2910
|
def child_nodes
|
|
2867
2911
|
[receiver, value]
|
|
2868
2912
|
end
|
|
@@ -2885,7 +2929,7 @@ module Prism
|
|
|
2885
2929
|
CallOperatorWriteNode.new(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value)
|
|
2886
2930
|
end
|
|
2887
2931
|
|
|
2888
|
-
# def deconstruct: () -> Array[
|
|
2932
|
+
# def deconstruct: () -> Array[Node?]
|
|
2889
2933
|
alias deconstruct child_nodes
|
|
2890
2934
|
|
|
2891
2935
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node }
|
|
@@ -3069,7 +3113,7 @@ module Prism
|
|
|
3069
3113
|
visitor.visit_call_or_write_node(self)
|
|
3070
3114
|
end
|
|
3071
3115
|
|
|
3072
|
-
# def child_nodes: () -> Array[
|
|
3116
|
+
# def child_nodes: () -> Array[Node?]
|
|
3073
3117
|
def child_nodes
|
|
3074
3118
|
[receiver, value]
|
|
3075
3119
|
end
|
|
@@ -3092,7 +3136,7 @@ module Prism
|
|
|
3092
3136
|
CallOrWriteNode.new(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value)
|
|
3093
3137
|
end
|
|
3094
3138
|
|
|
3095
|
-
# def deconstruct: () -> Array[
|
|
3139
|
+
# def deconstruct: () -> Array[Node?]
|
|
3096
3140
|
alias deconstruct child_nodes
|
|
3097
3141
|
|
|
3098
3142
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node }
|
|
@@ -3279,7 +3323,7 @@ module Prism
|
|
|
3279
3323
|
visitor.visit_call_target_node(self)
|
|
3280
3324
|
end
|
|
3281
3325
|
|
|
3282
|
-
# def child_nodes: () -> Array[
|
|
3326
|
+
# def child_nodes: () -> Array[Node?]
|
|
3283
3327
|
def child_nodes
|
|
3284
3328
|
[receiver]
|
|
3285
3329
|
end
|
|
@@ -3299,7 +3343,7 @@ module Prism
|
|
|
3299
3343
|
CallTargetNode.new(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc)
|
|
3300
3344
|
end
|
|
3301
3345
|
|
|
3302
|
-
# def deconstruct: () -> Array[
|
|
3346
|
+
# def deconstruct: () -> Array[Node?]
|
|
3303
3347
|
alias deconstruct child_nodes
|
|
3304
3348
|
|
|
3305
3349
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location }
|
|
@@ -3429,7 +3473,7 @@ module Prism
|
|
|
3429
3473
|
visitor.visit_capture_pattern_node(self)
|
|
3430
3474
|
end
|
|
3431
3475
|
|
|
3432
|
-
# def child_nodes: () -> Array[
|
|
3476
|
+
# def child_nodes: () -> Array[Node?]
|
|
3433
3477
|
def child_nodes
|
|
3434
3478
|
[value, target]
|
|
3435
3479
|
end
|
|
@@ -3449,7 +3493,7 @@ module Prism
|
|
|
3449
3493
|
CapturePatternNode.new(source, node_id, location, flags, value, target, operator_loc)
|
|
3450
3494
|
end
|
|
3451
3495
|
|
|
3452
|
-
# def deconstruct: () -> Array[
|
|
3496
|
+
# def deconstruct: () -> Array[Node?]
|
|
3453
3497
|
alias deconstruct child_nodes
|
|
3454
3498
|
|
|
3455
3499
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, target: LocalVariableTargetNode, operator_loc: Location }
|
|
@@ -3540,7 +3584,7 @@ module Prism
|
|
|
3540
3584
|
visitor.visit_case_match_node(self)
|
|
3541
3585
|
end
|
|
3542
3586
|
|
|
3543
|
-
# def child_nodes: () -> Array[
|
|
3587
|
+
# def child_nodes: () -> Array[Node?]
|
|
3544
3588
|
def child_nodes
|
|
3545
3589
|
[predicate, *conditions, else_clause]
|
|
3546
3590
|
end
|
|
@@ -3564,7 +3608,7 @@ module Prism
|
|
|
3564
3608
|
CaseMatchNode.new(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc)
|
|
3565
3609
|
end
|
|
3566
3610
|
|
|
3567
|
-
# def deconstruct: () -> Array[
|
|
3611
|
+
# def deconstruct: () -> Array[Node?]
|
|
3568
3612
|
alias deconstruct child_nodes
|
|
3569
3613
|
|
|
3570
3614
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[InNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location }
|
|
@@ -3685,7 +3729,7 @@ module Prism
|
|
|
3685
3729
|
visitor.visit_case_node(self)
|
|
3686
3730
|
end
|
|
3687
3731
|
|
|
3688
|
-
# def child_nodes: () -> Array[
|
|
3732
|
+
# def child_nodes: () -> Array[Node?]
|
|
3689
3733
|
def child_nodes
|
|
3690
3734
|
[predicate, *conditions, else_clause]
|
|
3691
3735
|
end
|
|
@@ -3709,7 +3753,7 @@ module Prism
|
|
|
3709
3753
|
CaseNode.new(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc)
|
|
3710
3754
|
end
|
|
3711
3755
|
|
|
3712
|
-
# def deconstruct: () -> Array[
|
|
3756
|
+
# def deconstruct: () -> Array[Node?]
|
|
3713
3757
|
alias deconstruct child_nodes
|
|
3714
3758
|
|
|
3715
3759
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[WhenNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location }
|
|
@@ -3720,7 +3764,7 @@ module Prism
|
|
|
3720
3764
|
# Represents the predicate of the case statement. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
|
|
3721
3765
|
#
|
|
3722
3766
|
# case true; when false; end
|
|
3723
|
-
#
|
|
3767
|
+
# ^^^^
|
|
3724
3768
|
attr_reader :predicate
|
|
3725
3769
|
|
|
3726
3770
|
# Represents the conditions of the case statement.
|
|
@@ -3831,7 +3875,7 @@ module Prism
|
|
|
3831
3875
|
visitor.visit_class_node(self)
|
|
3832
3876
|
end
|
|
3833
3877
|
|
|
3834
|
-
# def child_nodes: () -> Array[
|
|
3878
|
+
# def child_nodes: () -> Array[Node?]
|
|
3835
3879
|
def child_nodes
|
|
3836
3880
|
[constant_path, superclass, body]
|
|
3837
3881
|
end
|
|
@@ -3855,7 +3899,7 @@ module Prism
|
|
|
3855
3899
|
ClassNode.new(source, node_id, location, flags, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name)
|
|
3856
3900
|
end
|
|
3857
3901
|
|
|
3858
|
-
# def deconstruct: () -> Array[
|
|
3902
|
+
# def deconstruct: () -> Array[Node?]
|
|
3859
3903
|
alias deconstruct child_nodes
|
|
3860
3904
|
|
|
3861
3905
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | CallNode, inheritance_operator_loc: Location?, superclass: Prism::node?, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol }
|
|
@@ -3866,7 +3910,10 @@ module Prism
|
|
|
3866
3910
|
# attr_reader locals: Array[Symbol]
|
|
3867
3911
|
attr_reader :locals
|
|
3868
3912
|
|
|
3869
|
-
#
|
|
3913
|
+
# Represents the location of the `class` keyword.
|
|
3914
|
+
#
|
|
3915
|
+
# class Foo end
|
|
3916
|
+
# ^^^^^
|
|
3870
3917
|
def class_keyword_loc
|
|
3871
3918
|
location = @class_keyword_loc
|
|
3872
3919
|
return location if location.is_a?(Location)
|
|
@@ -3882,7 +3929,10 @@ module Prism
|
|
|
3882
3929
|
# attr_reader constant_path: ConstantReadNode | ConstantPathNode | CallNode
|
|
3883
3930
|
attr_reader :constant_path
|
|
3884
3931
|
|
|
3885
|
-
#
|
|
3932
|
+
# Represents the location of the `<` operator.
|
|
3933
|
+
#
|
|
3934
|
+
# class Foo < Bar
|
|
3935
|
+
# ^
|
|
3886
3936
|
def inheritance_operator_loc
|
|
3887
3937
|
location = @inheritance_operator_loc
|
|
3888
3938
|
case location
|
|
@@ -3901,13 +3951,23 @@ module Prism
|
|
|
3901
3951
|
repository.enter(node_id, :inheritance_operator_loc) unless @inheritance_operator_loc.nil?
|
|
3902
3952
|
end
|
|
3903
3953
|
|
|
3904
|
-
#
|
|
3954
|
+
# Represents the superclass of the class.
|
|
3955
|
+
#
|
|
3956
|
+
# class Foo < Bar
|
|
3957
|
+
# ^^^
|
|
3905
3958
|
attr_reader :superclass
|
|
3906
3959
|
|
|
3907
|
-
#
|
|
3960
|
+
# Represents the body of the class.
|
|
3961
|
+
#
|
|
3962
|
+
# class Foo
|
|
3963
|
+
# foo
|
|
3964
|
+
# ^^^
|
|
3908
3965
|
attr_reader :body
|
|
3909
3966
|
|
|
3910
|
-
#
|
|
3967
|
+
# Represents the location of the `end` keyword.
|
|
3968
|
+
#
|
|
3969
|
+
# class Foo end
|
|
3970
|
+
# ^^^
|
|
3911
3971
|
def end_keyword_loc
|
|
3912
3972
|
location = @end_keyword_loc
|
|
3913
3973
|
return location if location.is_a?(Location)
|
|
@@ -3920,7 +3980,9 @@ module Prism
|
|
|
3920
3980
|
repository.enter(node_id, :end_keyword_loc)
|
|
3921
3981
|
end
|
|
3922
3982
|
|
|
3923
|
-
#
|
|
3983
|
+
# The name of the class.
|
|
3984
|
+
#
|
|
3985
|
+
# class Foo end # name `:Foo`
|
|
3924
3986
|
attr_reader :name
|
|
3925
3987
|
|
|
3926
3988
|
# def class_keyword: () -> String
|
|
@@ -3991,7 +4053,7 @@ module Prism
|
|
|
3991
4053
|
visitor.visit_class_variable_and_write_node(self)
|
|
3992
4054
|
end
|
|
3993
4055
|
|
|
3994
|
-
# def child_nodes: () -> Array[
|
|
4056
|
+
# def child_nodes: () -> Array[Node?]
|
|
3995
4057
|
def child_nodes
|
|
3996
4058
|
[value]
|
|
3997
4059
|
end
|
|
@@ -4011,7 +4073,7 @@ module Prism
|
|
|
4011
4073
|
ClassVariableAndWriteNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
|
4012
4074
|
end
|
|
4013
4075
|
|
|
4014
|
-
# def deconstruct: () -> Array[
|
|
4076
|
+
# def deconstruct: () -> Array[Node?]
|
|
4015
4077
|
alias deconstruct child_nodes
|
|
4016
4078
|
|
|
4017
4079
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
|
@@ -4117,7 +4179,7 @@ module Prism
|
|
|
4117
4179
|
visitor.visit_class_variable_operator_write_node(self)
|
|
4118
4180
|
end
|
|
4119
4181
|
|
|
4120
|
-
# def child_nodes: () -> Array[
|
|
4182
|
+
# def child_nodes: () -> Array[Node?]
|
|
4121
4183
|
def child_nodes
|
|
4122
4184
|
[value]
|
|
4123
4185
|
end
|
|
@@ -4137,7 +4199,7 @@ module Prism
|
|
|
4137
4199
|
ClassVariableOperatorWriteNode.new(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator)
|
|
4138
4200
|
end
|
|
4139
4201
|
|
|
4140
|
-
# def deconstruct: () -> Array[
|
|
4202
|
+
# def deconstruct: () -> Array[Node?]
|
|
4141
4203
|
alias deconstruct child_nodes
|
|
4142
4204
|
|
|
4143
4205
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol }
|
|
@@ -4229,7 +4291,7 @@ module Prism
|
|
|
4229
4291
|
visitor.visit_class_variable_or_write_node(self)
|
|
4230
4292
|
end
|
|
4231
4293
|
|
|
4232
|
-
# def child_nodes: () -> Array[
|
|
4294
|
+
# def child_nodes: () -> Array[Node?]
|
|
4233
4295
|
def child_nodes
|
|
4234
4296
|
[value]
|
|
4235
4297
|
end
|
|
@@ -4249,7 +4311,7 @@ module Prism
|
|
|
4249
4311
|
ClassVariableOrWriteNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
|
4250
4312
|
end
|
|
4251
4313
|
|
|
4252
|
-
# def deconstruct: () -> Array[
|
|
4314
|
+
# def deconstruct: () -> Array[Node?]
|
|
4253
4315
|
alias deconstruct child_nodes
|
|
4254
4316
|
|
|
4255
4317
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
|
@@ -4339,7 +4401,7 @@ module Prism
|
|
|
4339
4401
|
visitor.visit_class_variable_read_node(self)
|
|
4340
4402
|
end
|
|
4341
4403
|
|
|
4342
|
-
# def child_nodes: () -> Array[
|
|
4404
|
+
# def child_nodes: () -> Array[Node?]
|
|
4343
4405
|
def child_nodes
|
|
4344
4406
|
[]
|
|
4345
4407
|
end
|
|
@@ -4359,7 +4421,7 @@ module Prism
|
|
|
4359
4421
|
ClassVariableReadNode.new(source, node_id, location, flags, name)
|
|
4360
4422
|
end
|
|
4361
4423
|
|
|
4362
|
-
# def deconstruct: () -> Array[
|
|
4424
|
+
# def deconstruct: () -> Array[Node?]
|
|
4363
4425
|
alias deconstruct child_nodes
|
|
4364
4426
|
|
|
4365
4427
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
|
@@ -4416,7 +4478,7 @@ module Prism
|
|
|
4416
4478
|
visitor.visit_class_variable_target_node(self)
|
|
4417
4479
|
end
|
|
4418
4480
|
|
|
4419
|
-
# def child_nodes: () -> Array[
|
|
4481
|
+
# def child_nodes: () -> Array[Node?]
|
|
4420
4482
|
def child_nodes
|
|
4421
4483
|
[]
|
|
4422
4484
|
end
|
|
@@ -4436,7 +4498,7 @@ module Prism
|
|
|
4436
4498
|
ClassVariableTargetNode.new(source, node_id, location, flags, name)
|
|
4437
4499
|
end
|
|
4438
4500
|
|
|
4439
|
-
# def deconstruct: () -> Array[
|
|
4501
|
+
# def deconstruct: () -> Array[Node?]
|
|
4440
4502
|
alias deconstruct child_nodes
|
|
4441
4503
|
|
|
4442
4504
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
|
@@ -4492,7 +4554,7 @@ module Prism
|
|
|
4492
4554
|
visitor.visit_class_variable_write_node(self)
|
|
4493
4555
|
end
|
|
4494
4556
|
|
|
4495
|
-
# def child_nodes: () -> Array[
|
|
4557
|
+
# def child_nodes: () -> Array[Node?]
|
|
4496
4558
|
def child_nodes
|
|
4497
4559
|
[value]
|
|
4498
4560
|
end
|
|
@@ -4512,7 +4574,7 @@ module Prism
|
|
|
4512
4574
|
ClassVariableWriteNode.new(source, node_id, location, flags, name, name_loc, value, operator_loc)
|
|
4513
4575
|
end
|
|
4514
4576
|
|
|
4515
|
-
# def deconstruct: () -> Array[
|
|
4577
|
+
# def deconstruct: () -> Array[Node?]
|
|
4516
4578
|
alias deconstruct child_nodes
|
|
4517
4579
|
|
|
4518
4580
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location }
|
|
@@ -4621,7 +4683,7 @@ module Prism
|
|
|
4621
4683
|
visitor.visit_constant_and_write_node(self)
|
|
4622
4684
|
end
|
|
4623
4685
|
|
|
4624
|
-
# def child_nodes: () -> Array[
|
|
4686
|
+
# def child_nodes: () -> Array[Node?]
|
|
4625
4687
|
def child_nodes
|
|
4626
4688
|
[value]
|
|
4627
4689
|
end
|
|
@@ -4641,7 +4703,7 @@ module Prism
|
|
|
4641
4703
|
ConstantAndWriteNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
|
4642
4704
|
end
|
|
4643
4705
|
|
|
4644
|
-
# def deconstruct: () -> Array[
|
|
4706
|
+
# def deconstruct: () -> Array[Node?]
|
|
4645
4707
|
alias deconstruct child_nodes
|
|
4646
4708
|
|
|
4647
4709
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
|
@@ -4735,7 +4797,7 @@ module Prism
|
|
|
4735
4797
|
visitor.visit_constant_operator_write_node(self)
|
|
4736
4798
|
end
|
|
4737
4799
|
|
|
4738
|
-
# def child_nodes: () -> Array[
|
|
4800
|
+
# def child_nodes: () -> Array[Node?]
|
|
4739
4801
|
def child_nodes
|
|
4740
4802
|
[value]
|
|
4741
4803
|
end
|
|
@@ -4755,7 +4817,7 @@ module Prism
|
|
|
4755
4817
|
ConstantOperatorWriteNode.new(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator)
|
|
4756
4818
|
end
|
|
4757
4819
|
|
|
4758
|
-
# def deconstruct: () -> Array[
|
|
4820
|
+
# def deconstruct: () -> Array[Node?]
|
|
4759
4821
|
alias deconstruct child_nodes
|
|
4760
4822
|
|
|
4761
4823
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol }
|
|
@@ -4847,7 +4909,7 @@ module Prism
|
|
|
4847
4909
|
visitor.visit_constant_or_write_node(self)
|
|
4848
4910
|
end
|
|
4849
4911
|
|
|
4850
|
-
# def child_nodes: () -> Array[
|
|
4912
|
+
# def child_nodes: () -> Array[Node?]
|
|
4851
4913
|
def child_nodes
|
|
4852
4914
|
[value]
|
|
4853
4915
|
end
|
|
@@ -4867,7 +4929,7 @@ module Prism
|
|
|
4867
4929
|
ConstantOrWriteNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
|
4868
4930
|
end
|
|
4869
4931
|
|
|
4870
|
-
# def deconstruct: () -> Array[
|
|
4932
|
+
# def deconstruct: () -> Array[Node?]
|
|
4871
4933
|
alias deconstruct child_nodes
|
|
4872
4934
|
|
|
4873
4935
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
|
@@ -4959,7 +5021,7 @@ module Prism
|
|
|
4959
5021
|
visitor.visit_constant_path_and_write_node(self)
|
|
4960
5022
|
end
|
|
4961
5023
|
|
|
4962
|
-
# def child_nodes: () -> Array[
|
|
5024
|
+
# def child_nodes: () -> Array[Node?]
|
|
4963
5025
|
def child_nodes
|
|
4964
5026
|
[target, value]
|
|
4965
5027
|
end
|
|
@@ -4979,7 +5041,7 @@ module Prism
|
|
|
4979
5041
|
ConstantPathAndWriteNode.new(source, node_id, location, flags, target, operator_loc, value)
|
|
4980
5042
|
end
|
|
4981
5043
|
|
|
4982
|
-
# def deconstruct: () -> Array[
|
|
5044
|
+
# def deconstruct: () -> Array[Node?]
|
|
4983
5045
|
alias deconstruct child_nodes
|
|
4984
5046
|
|
|
4985
5047
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node }
|
|
@@ -5058,7 +5120,7 @@ module Prism
|
|
|
5058
5120
|
visitor.visit_constant_path_node(self)
|
|
5059
5121
|
end
|
|
5060
5122
|
|
|
5061
|
-
# def child_nodes: () -> Array[
|
|
5123
|
+
# def child_nodes: () -> Array[Node?]
|
|
5062
5124
|
def child_nodes
|
|
5063
5125
|
[parent]
|
|
5064
5126
|
end
|
|
@@ -5080,7 +5142,7 @@ module Prism
|
|
|
5080
5142
|
ConstantPathNode.new(source, node_id, location, flags, parent, name, delimiter_loc, name_loc)
|
|
5081
5143
|
end
|
|
5082
5144
|
|
|
5083
|
-
# def deconstruct: () -> Array[
|
|
5145
|
+
# def deconstruct: () -> Array[Node?]
|
|
5084
5146
|
alias deconstruct child_nodes
|
|
5085
5147
|
|
|
5086
5148
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location }
|
|
@@ -5194,7 +5256,7 @@ module Prism
|
|
|
5194
5256
|
visitor.visit_constant_path_operator_write_node(self)
|
|
5195
5257
|
end
|
|
5196
5258
|
|
|
5197
|
-
# def child_nodes: () -> Array[
|
|
5259
|
+
# def child_nodes: () -> Array[Node?]
|
|
5198
5260
|
def child_nodes
|
|
5199
5261
|
[target, value]
|
|
5200
5262
|
end
|
|
@@ -5214,7 +5276,7 @@ module Prism
|
|
|
5214
5276
|
ConstantPathOperatorWriteNode.new(source, node_id, location, flags, target, binary_operator_loc, value, binary_operator)
|
|
5215
5277
|
end
|
|
5216
5278
|
|
|
5217
|
-
# def deconstruct: () -> Array[
|
|
5279
|
+
# def deconstruct: () -> Array[Node?]
|
|
5218
5280
|
alias deconstruct child_nodes
|
|
5219
5281
|
|
|
5220
5282
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol }
|
|
@@ -5291,7 +5353,7 @@ module Prism
|
|
|
5291
5353
|
visitor.visit_constant_path_or_write_node(self)
|
|
5292
5354
|
end
|
|
5293
5355
|
|
|
5294
|
-
# def child_nodes: () -> Array[
|
|
5356
|
+
# def child_nodes: () -> Array[Node?]
|
|
5295
5357
|
def child_nodes
|
|
5296
5358
|
[target, value]
|
|
5297
5359
|
end
|
|
@@ -5311,7 +5373,7 @@ module Prism
|
|
|
5311
5373
|
ConstantPathOrWriteNode.new(source, node_id, location, flags, target, operator_loc, value)
|
|
5312
5374
|
end
|
|
5313
5375
|
|
|
5314
|
-
# def deconstruct: () -> Array[
|
|
5376
|
+
# def deconstruct: () -> Array[Node?]
|
|
5315
5377
|
alias deconstruct child_nodes
|
|
5316
5378
|
|
|
5317
5379
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node }
|
|
@@ -5390,7 +5452,7 @@ module Prism
|
|
|
5390
5452
|
visitor.visit_constant_path_target_node(self)
|
|
5391
5453
|
end
|
|
5392
5454
|
|
|
5393
|
-
# def child_nodes: () -> Array[
|
|
5455
|
+
# def child_nodes: () -> Array[Node?]
|
|
5394
5456
|
def child_nodes
|
|
5395
5457
|
[parent]
|
|
5396
5458
|
end
|
|
@@ -5412,7 +5474,7 @@ module Prism
|
|
|
5412
5474
|
ConstantPathTargetNode.new(source, node_id, location, flags, parent, name, delimiter_loc, name_loc)
|
|
5413
5475
|
end
|
|
5414
5476
|
|
|
5415
|
-
# def deconstruct: () -> Array[
|
|
5477
|
+
# def deconstruct: () -> Array[Node?]
|
|
5416
5478
|
alias deconstruct child_nodes
|
|
5417
5479
|
|
|
5418
5480
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location }
|
|
@@ -5510,7 +5572,7 @@ module Prism
|
|
|
5510
5572
|
visitor.visit_constant_path_write_node(self)
|
|
5511
5573
|
end
|
|
5512
5574
|
|
|
5513
|
-
# def child_nodes: () -> Array[
|
|
5575
|
+
# def child_nodes: () -> Array[Node?]
|
|
5514
5576
|
def child_nodes
|
|
5515
5577
|
[target, value]
|
|
5516
5578
|
end
|
|
@@ -5530,7 +5592,7 @@ module Prism
|
|
|
5530
5592
|
ConstantPathWriteNode.new(source, node_id, location, flags, target, operator_loc, value)
|
|
5531
5593
|
end
|
|
5532
5594
|
|
|
5533
|
-
# def deconstruct: () -> Array[
|
|
5595
|
+
# def deconstruct: () -> Array[Node?]
|
|
5534
5596
|
alias deconstruct child_nodes
|
|
5535
5597
|
|
|
5536
5598
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node }
|
|
@@ -5618,7 +5680,7 @@ module Prism
|
|
|
5618
5680
|
visitor.visit_constant_read_node(self)
|
|
5619
5681
|
end
|
|
5620
5682
|
|
|
5621
|
-
# def child_nodes: () -> Array[
|
|
5683
|
+
# def child_nodes: () -> Array[Node?]
|
|
5622
5684
|
def child_nodes
|
|
5623
5685
|
[]
|
|
5624
5686
|
end
|
|
@@ -5638,7 +5700,7 @@ module Prism
|
|
|
5638
5700
|
ConstantReadNode.new(source, node_id, location, flags, name)
|
|
5639
5701
|
end
|
|
5640
5702
|
|
|
5641
|
-
# def deconstruct: () -> Array[
|
|
5703
|
+
# def deconstruct: () -> Array[Node?]
|
|
5642
5704
|
alias deconstruct child_nodes
|
|
5643
5705
|
|
|
5644
5706
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
|
@@ -5695,7 +5757,7 @@ module Prism
|
|
|
5695
5757
|
visitor.visit_constant_target_node(self)
|
|
5696
5758
|
end
|
|
5697
5759
|
|
|
5698
|
-
# def child_nodes: () -> Array[
|
|
5760
|
+
# def child_nodes: () -> Array[Node?]
|
|
5699
5761
|
def child_nodes
|
|
5700
5762
|
[]
|
|
5701
5763
|
end
|
|
@@ -5715,7 +5777,7 @@ module Prism
|
|
|
5715
5777
|
ConstantTargetNode.new(source, node_id, location, flags, name)
|
|
5716
5778
|
end
|
|
5717
5779
|
|
|
5718
|
-
# def deconstruct: () -> Array[
|
|
5780
|
+
# def deconstruct: () -> Array[Node?]
|
|
5719
5781
|
alias deconstruct child_nodes
|
|
5720
5782
|
|
|
5721
5783
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
|
@@ -5771,7 +5833,7 @@ module Prism
|
|
|
5771
5833
|
visitor.visit_constant_write_node(self)
|
|
5772
5834
|
end
|
|
5773
5835
|
|
|
5774
|
-
# def child_nodes: () -> Array[
|
|
5836
|
+
# def child_nodes: () -> Array[Node?]
|
|
5775
5837
|
def child_nodes
|
|
5776
5838
|
[value]
|
|
5777
5839
|
end
|
|
@@ -5791,7 +5853,7 @@ module Prism
|
|
|
5791
5853
|
ConstantWriteNode.new(source, node_id, location, flags, name, name_loc, value, operator_loc)
|
|
5792
5854
|
end
|
|
5793
5855
|
|
|
5794
|
-
# def deconstruct: () -> Array[
|
|
5856
|
+
# def deconstruct: () -> Array[Node?]
|
|
5795
5857
|
alias deconstruct child_nodes
|
|
5796
5858
|
|
|
5797
5859
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location }
|
|
@@ -5909,7 +5971,7 @@ module Prism
|
|
|
5909
5971
|
visitor.visit_def_node(self)
|
|
5910
5972
|
end
|
|
5911
5973
|
|
|
5912
|
-
# def child_nodes: () -> Array[
|
|
5974
|
+
# def child_nodes: () -> Array[Node?]
|
|
5913
5975
|
def child_nodes
|
|
5914
5976
|
[receiver, parameters, body]
|
|
5915
5977
|
end
|
|
@@ -5933,7 +5995,7 @@ module Prism
|
|
|
5933
5995
|
DefNode.new(source, node_id, location, flags, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc)
|
|
5934
5996
|
end
|
|
5935
5997
|
|
|
5936
|
-
# def deconstruct: () -> Array[
|
|
5998
|
+
# def deconstruct: () -> Array[Node?]
|
|
5937
5999
|
alias deconstruct child_nodes
|
|
5938
6000
|
|
|
5939
6001
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: StatementsNode | BeginNode | nil, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location? }
|
|
@@ -6164,7 +6226,7 @@ module Prism
|
|
|
6164
6226
|
visitor.visit_defined_node(self)
|
|
6165
6227
|
end
|
|
6166
6228
|
|
|
6167
|
-
# def child_nodes: () -> Array[
|
|
6229
|
+
# def child_nodes: () -> Array[Node?]
|
|
6168
6230
|
def child_nodes
|
|
6169
6231
|
[value]
|
|
6170
6232
|
end
|
|
@@ -6184,7 +6246,7 @@ module Prism
|
|
|
6184
6246
|
DefinedNode.new(source, node_id, location, flags, lparen_loc, value, rparen_loc, keyword_loc)
|
|
6185
6247
|
end
|
|
6186
6248
|
|
|
6187
|
-
# def deconstruct: () -> Array[
|
|
6249
|
+
# def deconstruct: () -> Array[Node?]
|
|
6188
6250
|
alias deconstruct child_nodes
|
|
6189
6251
|
|
|
6190
6252
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location }
|
|
@@ -6308,7 +6370,7 @@ module Prism
|
|
|
6308
6370
|
visitor.visit_else_node(self)
|
|
6309
6371
|
end
|
|
6310
6372
|
|
|
6311
|
-
# def child_nodes: () -> Array[
|
|
6373
|
+
# def child_nodes: () -> Array[Node?]
|
|
6312
6374
|
def child_nodes
|
|
6313
6375
|
[statements]
|
|
6314
6376
|
end
|
|
@@ -6330,7 +6392,7 @@ module Prism
|
|
|
6330
6392
|
ElseNode.new(source, node_id, location, flags, else_keyword_loc, statements, end_keyword_loc)
|
|
6331
6393
|
end
|
|
6332
6394
|
|
|
6333
|
-
# def deconstruct: () -> Array[
|
|
6395
|
+
# def deconstruct: () -> Array[Node?]
|
|
6334
6396
|
alias deconstruct child_nodes
|
|
6335
6397
|
|
|
6336
6398
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location? }
|
|
@@ -6429,7 +6491,7 @@ module Prism
|
|
|
6429
6491
|
visitor.visit_embedded_statements_node(self)
|
|
6430
6492
|
end
|
|
6431
6493
|
|
|
6432
|
-
# def child_nodes: () -> Array[
|
|
6494
|
+
# def child_nodes: () -> Array[Node?]
|
|
6433
6495
|
def child_nodes
|
|
6434
6496
|
[statements]
|
|
6435
6497
|
end
|
|
@@ -6451,7 +6513,7 @@ module Prism
|
|
|
6451
6513
|
EmbeddedStatementsNode.new(source, node_id, location, flags, opening_loc, statements, closing_loc)
|
|
6452
6514
|
end
|
|
6453
6515
|
|
|
6454
|
-
# def deconstruct: () -> Array[
|
|
6516
|
+
# def deconstruct: () -> Array[Node?]
|
|
6455
6517
|
alias deconstruct child_nodes
|
|
6456
6518
|
|
|
6457
6519
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, statements: StatementsNode?, closing_loc: Location }
|
|
@@ -6543,7 +6605,7 @@ module Prism
|
|
|
6543
6605
|
visitor.visit_embedded_variable_node(self)
|
|
6544
6606
|
end
|
|
6545
6607
|
|
|
6546
|
-
# def child_nodes: () -> Array[
|
|
6608
|
+
# def child_nodes: () -> Array[Node?]
|
|
6547
6609
|
def child_nodes
|
|
6548
6610
|
[variable]
|
|
6549
6611
|
end
|
|
@@ -6563,7 +6625,7 @@ module Prism
|
|
|
6563
6625
|
EmbeddedVariableNode.new(source, node_id, location, flags, operator_loc, variable)
|
|
6564
6626
|
end
|
|
6565
6627
|
|
|
6566
|
-
# def deconstruct: () -> Array[
|
|
6628
|
+
# def deconstruct: () -> Array[Node?]
|
|
6567
6629
|
alias deconstruct child_nodes
|
|
6568
6630
|
|
|
6569
6631
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode }
|
|
@@ -6641,7 +6703,7 @@ module Prism
|
|
|
6641
6703
|
visitor.visit_ensure_node(self)
|
|
6642
6704
|
end
|
|
6643
6705
|
|
|
6644
|
-
# def child_nodes: () -> Array[
|
|
6706
|
+
# def child_nodes: () -> Array[Node?]
|
|
6645
6707
|
def child_nodes
|
|
6646
6708
|
[statements]
|
|
6647
6709
|
end
|
|
@@ -6663,7 +6725,7 @@ module Prism
|
|
|
6663
6725
|
EnsureNode.new(source, node_id, location, flags, ensure_keyword_loc, statements, end_keyword_loc)
|
|
6664
6726
|
end
|
|
6665
6727
|
|
|
6666
|
-
# def deconstruct: () -> Array[
|
|
6728
|
+
# def deconstruct: () -> Array[Node?]
|
|
6667
6729
|
alias deconstruct child_nodes
|
|
6668
6730
|
|
|
6669
6731
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location }
|
|
@@ -6753,7 +6815,7 @@ module Prism
|
|
|
6753
6815
|
visitor.visit_false_node(self)
|
|
6754
6816
|
end
|
|
6755
6817
|
|
|
6756
|
-
# def child_nodes: () -> Array[
|
|
6818
|
+
# def child_nodes: () -> Array[Node?]
|
|
6757
6819
|
def child_nodes
|
|
6758
6820
|
[]
|
|
6759
6821
|
end
|
|
@@ -6773,7 +6835,7 @@ module Prism
|
|
|
6773
6835
|
FalseNode.new(source, node_id, location, flags)
|
|
6774
6836
|
end
|
|
6775
6837
|
|
|
6776
|
-
# def deconstruct: () -> Array[
|
|
6838
|
+
# def deconstruct: () -> Array[Node?]
|
|
6777
6839
|
alias deconstruct child_nodes
|
|
6778
6840
|
|
|
6779
6841
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
|
@@ -6813,6 +6875,9 @@ module Prism
|
|
|
6813
6875
|
#
|
|
6814
6876
|
# foo in Foo(*bar, baz, *qux)
|
|
6815
6877
|
# ^^^^^^^^^^^^^^^^^^^^
|
|
6878
|
+
#
|
|
6879
|
+
# foo => *bar, baz, *qux
|
|
6880
|
+
# ^^^^^^^^^^^^^^^
|
|
6816
6881
|
class FindPatternNode < Node
|
|
6817
6882
|
# Initialize a new FindPatternNode node.
|
|
6818
6883
|
def initialize(source, node_id, location, flags, constant, left, requireds, right, opening_loc, closing_loc)
|
|
@@ -6833,7 +6898,7 @@ module Prism
|
|
|
6833
6898
|
visitor.visit_find_pattern_node(self)
|
|
6834
6899
|
end
|
|
6835
6900
|
|
|
6836
|
-
# def child_nodes: () -> Array[
|
|
6901
|
+
# def child_nodes: () -> Array[Node?]
|
|
6837
6902
|
def child_nodes
|
|
6838
6903
|
[constant, left, *requireds, right]
|
|
6839
6904
|
end
|
|
@@ -6853,32 +6918,59 @@ module Prism
|
|
|
6853
6918
|
[*constant, left, *requireds, right, *opening_loc, *closing_loc] #: Array[Prism::node | Location]
|
|
6854
6919
|
end
|
|
6855
6920
|
|
|
6856
|
-
# def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant:
|
|
6921
|
+
# def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?left: SplatNode, ?requireds: Array[Prism::node], ?right: SplatNode | MissingNode, ?opening_loc: Location?, ?closing_loc: Location?) -> FindPatternNode
|
|
6857
6922
|
def copy(node_id: self.node_id, location: self.location, flags: self.flags, constant: self.constant, left: self.left, requireds: self.requireds, right: self.right, opening_loc: self.opening_loc, closing_loc: self.closing_loc)
|
|
6858
6923
|
FindPatternNode.new(source, node_id, location, flags, constant, left, requireds, right, opening_loc, closing_loc)
|
|
6859
6924
|
end
|
|
6860
6925
|
|
|
6861
|
-
# def deconstruct: () -> Array[
|
|
6926
|
+
# def deconstruct: () -> Array[Node?]
|
|
6862
6927
|
alias deconstruct child_nodes
|
|
6863
6928
|
|
|
6864
|
-
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant:
|
|
6929
|
+
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, left: SplatNode, requireds: Array[Prism::node], right: SplatNode | MissingNode, opening_loc: Location?, closing_loc: Location? }
|
|
6865
6930
|
def deconstruct_keys(keys)
|
|
6866
6931
|
{ node_id: node_id, location: location, constant: constant, left: left, requireds: requireds, right: right, opening_loc: opening_loc, closing_loc: closing_loc }
|
|
6867
6932
|
end
|
|
6868
6933
|
|
|
6869
|
-
#
|
|
6934
|
+
# Represents the optional constant preceding the pattern
|
|
6935
|
+
#
|
|
6936
|
+
# foo in Foo(*bar, baz, *qux)
|
|
6937
|
+
# ^^^
|
|
6870
6938
|
attr_reader :constant
|
|
6871
6939
|
|
|
6872
|
-
#
|
|
6940
|
+
# Represents the first wildcard node in the pattern.
|
|
6941
|
+
#
|
|
6942
|
+
# foo in *bar, baz, *qux
|
|
6943
|
+
# ^^^^
|
|
6944
|
+
#
|
|
6945
|
+
# foo in Foo(*bar, baz, *qux)
|
|
6946
|
+
# ^^^^
|
|
6873
6947
|
attr_reader :left
|
|
6874
6948
|
|
|
6875
|
-
#
|
|
6949
|
+
# Represents the nodes in between the wildcards.
|
|
6950
|
+
#
|
|
6951
|
+
# foo in *bar, baz, *qux
|
|
6952
|
+
# ^^^
|
|
6953
|
+
#
|
|
6954
|
+
# foo in Foo(*bar, baz, 1, *qux)
|
|
6955
|
+
# ^^^^^^
|
|
6876
6956
|
attr_reader :requireds
|
|
6877
6957
|
|
|
6878
|
-
#
|
|
6958
|
+
# Represents the second wildcard node in the pattern.
|
|
6959
|
+
#
|
|
6960
|
+
# foo in *bar, baz, *qux
|
|
6961
|
+
# ^^^^
|
|
6962
|
+
#
|
|
6963
|
+
# foo in Foo(*bar, baz, *qux)
|
|
6964
|
+
# ^^^^
|
|
6879
6965
|
attr_reader :right
|
|
6880
6966
|
|
|
6881
|
-
#
|
|
6967
|
+
# The location of the opening brace.
|
|
6968
|
+
#
|
|
6969
|
+
# foo in [*bar, baz, *qux]
|
|
6970
|
+
# ^
|
|
6971
|
+
#
|
|
6972
|
+
# foo in Foo(*bar, baz, *qux)
|
|
6973
|
+
# ^
|
|
6882
6974
|
def opening_loc
|
|
6883
6975
|
location = @opening_loc
|
|
6884
6976
|
case location
|
|
@@ -6897,7 +6989,13 @@ module Prism
|
|
|
6897
6989
|
repository.enter(node_id, :opening_loc) unless @opening_loc.nil?
|
|
6898
6990
|
end
|
|
6899
6991
|
|
|
6900
|
-
#
|
|
6992
|
+
# The location of the closing brace.
|
|
6993
|
+
#
|
|
6994
|
+
# foo in [*bar, baz, *qux]
|
|
6995
|
+
# ^
|
|
6996
|
+
#
|
|
6997
|
+
# foo in Foo(*bar, baz, *qux)
|
|
6998
|
+
# ^
|
|
6901
6999
|
def closing_loc
|
|
6902
7000
|
location = @closing_loc
|
|
6903
7001
|
case location
|
|
@@ -6976,7 +7074,7 @@ module Prism
|
|
|
6976
7074
|
visitor.visit_flip_flop_node(self)
|
|
6977
7075
|
end
|
|
6978
7076
|
|
|
6979
|
-
# def child_nodes: () -> Array[
|
|
7077
|
+
# def child_nodes: () -> Array[Node?]
|
|
6980
7078
|
def child_nodes
|
|
6981
7079
|
[left, right]
|
|
6982
7080
|
end
|
|
@@ -6999,7 +7097,7 @@ module Prism
|
|
|
6999
7097
|
FlipFlopNode.new(source, node_id, location, flags, left, right, operator_loc)
|
|
7000
7098
|
end
|
|
7001
7099
|
|
|
7002
|
-
# def deconstruct: () -> Array[
|
|
7100
|
+
# def deconstruct: () -> Array[Node?]
|
|
7003
7101
|
alias deconstruct child_nodes
|
|
7004
7102
|
|
|
7005
7103
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location }
|
|
@@ -7081,7 +7179,7 @@ module Prism
|
|
|
7081
7179
|
visitor.visit_float_node(self)
|
|
7082
7180
|
end
|
|
7083
7181
|
|
|
7084
|
-
# def child_nodes: () -> Array[
|
|
7182
|
+
# def child_nodes: () -> Array[Node?]
|
|
7085
7183
|
def child_nodes
|
|
7086
7184
|
[]
|
|
7087
7185
|
end
|
|
@@ -7101,7 +7199,7 @@ module Prism
|
|
|
7101
7199
|
FloatNode.new(source, node_id, location, flags, value)
|
|
7102
7200
|
end
|
|
7103
7201
|
|
|
7104
|
-
# def deconstruct: () -> Array[
|
|
7202
|
+
# def deconstruct: () -> Array[Node?]
|
|
7105
7203
|
alias deconstruct child_nodes
|
|
7106
7204
|
|
|
7107
7205
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Float }
|
|
@@ -7160,7 +7258,7 @@ module Prism
|
|
|
7160
7258
|
visitor.visit_for_node(self)
|
|
7161
7259
|
end
|
|
7162
7260
|
|
|
7163
|
-
# def child_nodes: () -> Array[
|
|
7261
|
+
# def child_nodes: () -> Array[Node?]
|
|
7164
7262
|
def child_nodes
|
|
7165
7263
|
[index, collection, statements]
|
|
7166
7264
|
end
|
|
@@ -7184,7 +7282,7 @@ module Prism
|
|
|
7184
7282
|
ForNode.new(source, node_id, location, flags, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc)
|
|
7185
7283
|
end
|
|
7186
7284
|
|
|
7187
|
-
# def deconstruct: () -> Array[
|
|
7285
|
+
# def deconstruct: () -> Array[Node?]
|
|
7188
7286
|
alias deconstruct child_nodes
|
|
7189
7287
|
|
|
7190
7288
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location }
|
|
@@ -7351,7 +7449,7 @@ module Prism
|
|
|
7351
7449
|
visitor.visit_forwarding_arguments_node(self)
|
|
7352
7450
|
end
|
|
7353
7451
|
|
|
7354
|
-
# def child_nodes: () -> Array[
|
|
7452
|
+
# def child_nodes: () -> Array[Node?]
|
|
7355
7453
|
def child_nodes
|
|
7356
7454
|
[]
|
|
7357
7455
|
end
|
|
@@ -7371,7 +7469,7 @@ module Prism
|
|
|
7371
7469
|
ForwardingArgumentsNode.new(source, node_id, location, flags)
|
|
7372
7470
|
end
|
|
7373
7471
|
|
|
7374
|
-
# def deconstruct: () -> Array[
|
|
7472
|
+
# def deconstruct: () -> Array[Node?]
|
|
7375
7473
|
alias deconstruct child_nodes
|
|
7376
7474
|
|
|
7377
7475
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
|
@@ -7420,7 +7518,7 @@ module Prism
|
|
|
7420
7518
|
visitor.visit_forwarding_parameter_node(self)
|
|
7421
7519
|
end
|
|
7422
7520
|
|
|
7423
|
-
# def child_nodes: () -> Array[
|
|
7521
|
+
# def child_nodes: () -> Array[Node?]
|
|
7424
7522
|
def child_nodes
|
|
7425
7523
|
[]
|
|
7426
7524
|
end
|
|
@@ -7440,7 +7538,7 @@ module Prism
|
|
|
7440
7538
|
ForwardingParameterNode.new(source, node_id, location, flags)
|
|
7441
7539
|
end
|
|
7442
7540
|
|
|
7443
|
-
# def deconstruct: () -> Array[
|
|
7541
|
+
# def deconstruct: () -> Array[Node?]
|
|
7444
7542
|
alias deconstruct child_nodes
|
|
7445
7543
|
|
|
7446
7544
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
|
@@ -7470,10 +7568,15 @@ module Prism
|
|
|
7470
7568
|
end
|
|
7471
7569
|
end
|
|
7472
7570
|
|
|
7473
|
-
# Represents the use of the `super` keyword without parentheses or arguments.
|
|
7571
|
+
# Represents the use of the `super` keyword without parentheses or arguments, but which might have a block.
|
|
7474
7572
|
#
|
|
7475
7573
|
# super
|
|
7476
7574
|
# ^^^^^
|
|
7575
|
+
#
|
|
7576
|
+
# super { 123 }
|
|
7577
|
+
# ^^^^^^^^^^^^^
|
|
7578
|
+
#
|
|
7579
|
+
# If it has any other arguments, it would be a `SuperNode` instead.
|
|
7477
7580
|
class ForwardingSuperNode < Node
|
|
7478
7581
|
# Initialize a new ForwardingSuperNode node.
|
|
7479
7582
|
def initialize(source, node_id, location, flags, block)
|
|
@@ -7489,7 +7592,7 @@ module Prism
|
|
|
7489
7592
|
visitor.visit_forwarding_super_node(self)
|
|
7490
7593
|
end
|
|
7491
7594
|
|
|
7492
|
-
# def child_nodes: () -> Array[
|
|
7595
|
+
# def child_nodes: () -> Array[Node?]
|
|
7493
7596
|
def child_nodes
|
|
7494
7597
|
[block]
|
|
7495
7598
|
end
|
|
@@ -7511,7 +7614,7 @@ module Prism
|
|
|
7511
7614
|
ForwardingSuperNode.new(source, node_id, location, flags, block)
|
|
7512
7615
|
end
|
|
7513
7616
|
|
|
7514
|
-
# def deconstruct: () -> Array[
|
|
7617
|
+
# def deconstruct: () -> Array[Node?]
|
|
7515
7618
|
alias deconstruct child_nodes
|
|
7516
7619
|
|
|
7517
7620
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, block: BlockNode? }
|
|
@@ -7519,7 +7622,7 @@ module Prism
|
|
|
7519
7622
|
{ node_id: node_id, location: location, block: block }
|
|
7520
7623
|
end
|
|
7521
7624
|
|
|
7522
|
-
#
|
|
7625
|
+
# All other arguments are forwarded as normal, except the original block is replaced with the new block.
|
|
7523
7626
|
attr_reader :block
|
|
7524
7627
|
|
|
7525
7628
|
# def inspect -> String
|
|
@@ -7567,7 +7670,7 @@ module Prism
|
|
|
7567
7670
|
visitor.visit_global_variable_and_write_node(self)
|
|
7568
7671
|
end
|
|
7569
7672
|
|
|
7570
|
-
# def child_nodes: () -> Array[
|
|
7673
|
+
# def child_nodes: () -> Array[Node?]
|
|
7571
7674
|
def child_nodes
|
|
7572
7675
|
[value]
|
|
7573
7676
|
end
|
|
@@ -7587,7 +7690,7 @@ module Prism
|
|
|
7587
7690
|
GlobalVariableAndWriteNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
|
7588
7691
|
end
|
|
7589
7692
|
|
|
7590
|
-
# def deconstruct: () -> Array[
|
|
7693
|
+
# def deconstruct: () -> Array[Node?]
|
|
7591
7694
|
alias deconstruct child_nodes
|
|
7592
7695
|
|
|
7593
7696
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
|
@@ -7681,7 +7784,7 @@ module Prism
|
|
|
7681
7784
|
visitor.visit_global_variable_operator_write_node(self)
|
|
7682
7785
|
end
|
|
7683
7786
|
|
|
7684
|
-
# def child_nodes: () -> Array[
|
|
7787
|
+
# def child_nodes: () -> Array[Node?]
|
|
7685
7788
|
def child_nodes
|
|
7686
7789
|
[value]
|
|
7687
7790
|
end
|
|
@@ -7701,7 +7804,7 @@ module Prism
|
|
|
7701
7804
|
GlobalVariableOperatorWriteNode.new(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator)
|
|
7702
7805
|
end
|
|
7703
7806
|
|
|
7704
|
-
# def deconstruct: () -> Array[
|
|
7807
|
+
# def deconstruct: () -> Array[Node?]
|
|
7705
7808
|
alias deconstruct child_nodes
|
|
7706
7809
|
|
|
7707
7810
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol }
|
|
@@ -7793,7 +7896,7 @@ module Prism
|
|
|
7793
7896
|
visitor.visit_global_variable_or_write_node(self)
|
|
7794
7897
|
end
|
|
7795
7898
|
|
|
7796
|
-
# def child_nodes: () -> Array[
|
|
7899
|
+
# def child_nodes: () -> Array[Node?]
|
|
7797
7900
|
def child_nodes
|
|
7798
7901
|
[value]
|
|
7799
7902
|
end
|
|
@@ -7813,7 +7916,7 @@ module Prism
|
|
|
7813
7916
|
GlobalVariableOrWriteNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
|
7814
7917
|
end
|
|
7815
7918
|
|
|
7816
|
-
# def deconstruct: () -> Array[
|
|
7919
|
+
# def deconstruct: () -> Array[Node?]
|
|
7817
7920
|
alias deconstruct child_nodes
|
|
7818
7921
|
|
|
7819
7922
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
|
@@ -7903,7 +8006,7 @@ module Prism
|
|
|
7903
8006
|
visitor.visit_global_variable_read_node(self)
|
|
7904
8007
|
end
|
|
7905
8008
|
|
|
7906
|
-
# def child_nodes: () -> Array[
|
|
8009
|
+
# def child_nodes: () -> Array[Node?]
|
|
7907
8010
|
def child_nodes
|
|
7908
8011
|
[]
|
|
7909
8012
|
end
|
|
@@ -7923,7 +8026,7 @@ module Prism
|
|
|
7923
8026
|
GlobalVariableReadNode.new(source, node_id, location, flags, name)
|
|
7924
8027
|
end
|
|
7925
8028
|
|
|
7926
|
-
# def deconstruct: () -> Array[
|
|
8029
|
+
# def deconstruct: () -> Array[Node?]
|
|
7927
8030
|
alias deconstruct child_nodes
|
|
7928
8031
|
|
|
7929
8032
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
|
@@ -7980,7 +8083,7 @@ module Prism
|
|
|
7980
8083
|
visitor.visit_global_variable_target_node(self)
|
|
7981
8084
|
end
|
|
7982
8085
|
|
|
7983
|
-
# def child_nodes: () -> Array[
|
|
8086
|
+
# def child_nodes: () -> Array[Node?]
|
|
7984
8087
|
def child_nodes
|
|
7985
8088
|
[]
|
|
7986
8089
|
end
|
|
@@ -8000,7 +8103,7 @@ module Prism
|
|
|
8000
8103
|
GlobalVariableTargetNode.new(source, node_id, location, flags, name)
|
|
8001
8104
|
end
|
|
8002
8105
|
|
|
8003
|
-
# def deconstruct: () -> Array[
|
|
8106
|
+
# def deconstruct: () -> Array[Node?]
|
|
8004
8107
|
alias deconstruct child_nodes
|
|
8005
8108
|
|
|
8006
8109
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
|
@@ -8056,7 +8159,7 @@ module Prism
|
|
|
8056
8159
|
visitor.visit_global_variable_write_node(self)
|
|
8057
8160
|
end
|
|
8058
8161
|
|
|
8059
|
-
# def child_nodes: () -> Array[
|
|
8162
|
+
# def child_nodes: () -> Array[Node?]
|
|
8060
8163
|
def child_nodes
|
|
8061
8164
|
[value]
|
|
8062
8165
|
end
|
|
@@ -8076,7 +8179,7 @@ module Prism
|
|
|
8076
8179
|
GlobalVariableWriteNode.new(source, node_id, location, flags, name, name_loc, value, operator_loc)
|
|
8077
8180
|
end
|
|
8078
8181
|
|
|
8079
|
-
# def deconstruct: () -> Array[
|
|
8182
|
+
# def deconstruct: () -> Array[Node?]
|
|
8080
8183
|
alias deconstruct child_nodes
|
|
8081
8184
|
|
|
8082
8185
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location }
|
|
@@ -8184,7 +8287,7 @@ module Prism
|
|
|
8184
8287
|
visitor.visit_hash_node(self)
|
|
8185
8288
|
end
|
|
8186
8289
|
|
|
8187
|
-
# def child_nodes: () -> Array[
|
|
8290
|
+
# def child_nodes: () -> Array[Node?]
|
|
8188
8291
|
def child_nodes
|
|
8189
8292
|
[*elements]
|
|
8190
8293
|
end
|
|
@@ -8204,7 +8307,7 @@ module Prism
|
|
|
8204
8307
|
HashNode.new(source, node_id, location, flags, opening_loc, elements, closing_loc)
|
|
8205
8308
|
end
|
|
8206
8309
|
|
|
8207
|
-
# def deconstruct: () -> Array[
|
|
8310
|
+
# def deconstruct: () -> Array[Node?]
|
|
8208
8311
|
alias deconstruct child_nodes
|
|
8209
8312
|
|
|
8210
8313
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location }
|
|
@@ -8296,6 +8399,12 @@ module Prism
|
|
|
8296
8399
|
#
|
|
8297
8400
|
# foo => { a: 1, b: 2, **c }
|
|
8298
8401
|
# ^^^^^^^^^^^^^^^^^^^
|
|
8402
|
+
#
|
|
8403
|
+
# foo => Bar[a: 1, b: 2]
|
|
8404
|
+
# ^^^^^^^^^^^^^^^
|
|
8405
|
+
#
|
|
8406
|
+
# foo in { a: 1, b: 2 }
|
|
8407
|
+
# ^^^^^^^^^^^^^^
|
|
8299
8408
|
class HashPatternNode < Node
|
|
8300
8409
|
# Initialize a new HashPatternNode node.
|
|
8301
8410
|
def initialize(source, node_id, location, flags, constant, elements, rest, opening_loc, closing_loc)
|
|
@@ -8315,7 +8424,7 @@ module Prism
|
|
|
8315
8424
|
visitor.visit_hash_pattern_node(self)
|
|
8316
8425
|
end
|
|
8317
8426
|
|
|
8318
|
-
# def child_nodes: () -> Array[
|
|
8427
|
+
# def child_nodes: () -> Array[Node?]
|
|
8319
8428
|
def child_nodes
|
|
8320
8429
|
[constant, *elements, rest]
|
|
8321
8430
|
end
|
|
@@ -8334,29 +8443,53 @@ module Prism
|
|
|
8334
8443
|
[*constant, *elements, *rest, *opening_loc, *closing_loc] #: Array[Prism::node | Location]
|
|
8335
8444
|
end
|
|
8336
8445
|
|
|
8337
|
-
# def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant:
|
|
8446
|
+
# def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?) -> HashPatternNode
|
|
8338
8447
|
def copy(node_id: self.node_id, location: self.location, flags: self.flags, constant: self.constant, elements: self.elements, rest: self.rest, opening_loc: self.opening_loc, closing_loc: self.closing_loc)
|
|
8339
8448
|
HashPatternNode.new(source, node_id, location, flags, constant, elements, rest, opening_loc, closing_loc)
|
|
8340
8449
|
end
|
|
8341
8450
|
|
|
8342
|
-
# def deconstruct: () -> Array[
|
|
8451
|
+
# def deconstruct: () -> Array[Node?]
|
|
8343
8452
|
alias deconstruct child_nodes
|
|
8344
8453
|
|
|
8345
|
-
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant:
|
|
8454
|
+
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location? }
|
|
8346
8455
|
def deconstruct_keys(keys)
|
|
8347
8456
|
{ node_id: node_id, location: location, constant: constant, elements: elements, rest: rest, opening_loc: opening_loc, closing_loc: closing_loc }
|
|
8348
8457
|
end
|
|
8349
8458
|
|
|
8350
|
-
#
|
|
8459
|
+
# Represents the optional constant preceding the Hash.
|
|
8460
|
+
#
|
|
8461
|
+
# foo => Bar[a: 1, b: 2]
|
|
8462
|
+
# ^^^
|
|
8463
|
+
#
|
|
8464
|
+
# foo => Bar::Baz[a: 1, b: 2]
|
|
8465
|
+
# ^^^^^^^^
|
|
8351
8466
|
attr_reader :constant
|
|
8352
8467
|
|
|
8353
|
-
#
|
|
8468
|
+
# Represents the explicit named hash keys and values.
|
|
8469
|
+
#
|
|
8470
|
+
# foo => { a: 1, b:, ** }
|
|
8471
|
+
# ^^^^^^^^
|
|
8354
8472
|
attr_reader :elements
|
|
8355
8473
|
|
|
8356
|
-
#
|
|
8474
|
+
# Represents the rest of the Hash keys and values. This can be named, unnamed, or explicitly forbidden via `**nil`, this last one results in a `NoKeywordsParameterNode`.
|
|
8475
|
+
#
|
|
8476
|
+
# foo => { a: 1, b:, **c }
|
|
8477
|
+
# ^^^
|
|
8478
|
+
#
|
|
8479
|
+
# foo => { a: 1, b:, ** }
|
|
8480
|
+
# ^^
|
|
8481
|
+
#
|
|
8482
|
+
# foo => { a: 1, b:, **nil }
|
|
8483
|
+
# ^^^^^
|
|
8357
8484
|
attr_reader :rest
|
|
8358
8485
|
|
|
8359
|
-
#
|
|
8486
|
+
# The location of the opening brace.
|
|
8487
|
+
#
|
|
8488
|
+
# foo => { a: 1 }
|
|
8489
|
+
# ^
|
|
8490
|
+
#
|
|
8491
|
+
# foo => Bar[a: 1]
|
|
8492
|
+
# ^
|
|
8360
8493
|
def opening_loc
|
|
8361
8494
|
location = @opening_loc
|
|
8362
8495
|
case location
|
|
@@ -8375,7 +8508,13 @@ module Prism
|
|
|
8375
8508
|
repository.enter(node_id, :opening_loc) unless @opening_loc.nil?
|
|
8376
8509
|
end
|
|
8377
8510
|
|
|
8378
|
-
#
|
|
8511
|
+
# The location of the closing brace.
|
|
8512
|
+
#
|
|
8513
|
+
# foo => { a: 1 }
|
|
8514
|
+
# ^
|
|
8515
|
+
#
|
|
8516
|
+
# foo => Bar[a: 1]
|
|
8517
|
+
# ^
|
|
8379
8518
|
def closing_loc
|
|
8380
8519
|
location = @closing_loc
|
|
8381
8520
|
case location
|
|
@@ -8462,7 +8601,7 @@ module Prism
|
|
|
8462
8601
|
visitor.visit_if_node(self)
|
|
8463
8602
|
end
|
|
8464
8603
|
|
|
8465
|
-
# def child_nodes: () -> Array[
|
|
8604
|
+
# def child_nodes: () -> Array[Node?]
|
|
8466
8605
|
def child_nodes
|
|
8467
8606
|
[predicate, statements, subsequent]
|
|
8468
8607
|
end
|
|
@@ -8486,7 +8625,7 @@ module Prism
|
|
|
8486
8625
|
IfNode.new(source, node_id, location, flags, if_keyword_loc, predicate, then_keyword_loc, statements, subsequent, end_keyword_loc)
|
|
8487
8626
|
end
|
|
8488
8627
|
|
|
8489
|
-
# def deconstruct: () -> Array[
|
|
8628
|
+
# def deconstruct: () -> Array[Node?]
|
|
8490
8629
|
alias deconstruct child_nodes
|
|
8491
8630
|
|
|
8492
8631
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: ElseNode | IfNode | nil, end_keyword_loc: Location? }
|
|
@@ -8668,7 +8807,7 @@ module Prism
|
|
|
8668
8807
|
visitor.visit_imaginary_node(self)
|
|
8669
8808
|
end
|
|
8670
8809
|
|
|
8671
|
-
# def child_nodes: () -> Array[
|
|
8810
|
+
# def child_nodes: () -> Array[Node?]
|
|
8672
8811
|
def child_nodes
|
|
8673
8812
|
[numeric]
|
|
8674
8813
|
end
|
|
@@ -8688,7 +8827,7 @@ module Prism
|
|
|
8688
8827
|
ImaginaryNode.new(source, node_id, location, flags, numeric)
|
|
8689
8828
|
end
|
|
8690
8829
|
|
|
8691
|
-
# def deconstruct: () -> Array[
|
|
8830
|
+
# def deconstruct: () -> Array[Node?]
|
|
8692
8831
|
alias deconstruct child_nodes
|
|
8693
8832
|
|
|
8694
8833
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numeric: FloatNode | IntegerNode | RationalNode }
|
|
@@ -8747,7 +8886,7 @@ module Prism
|
|
|
8747
8886
|
visitor.visit_implicit_node(self)
|
|
8748
8887
|
end
|
|
8749
8888
|
|
|
8750
|
-
# def child_nodes: () -> Array[
|
|
8889
|
+
# def child_nodes: () -> Array[Node?]
|
|
8751
8890
|
def child_nodes
|
|
8752
8891
|
[value]
|
|
8753
8892
|
end
|
|
@@ -8767,7 +8906,7 @@ module Prism
|
|
|
8767
8906
|
ImplicitNode.new(source, node_id, location, flags, value)
|
|
8768
8907
|
end
|
|
8769
8908
|
|
|
8770
|
-
# def deconstruct: () -> Array[
|
|
8909
|
+
# def deconstruct: () -> Array[Node?]
|
|
8771
8910
|
alias deconstruct child_nodes
|
|
8772
8911
|
|
|
8773
8912
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode }
|
|
@@ -8828,7 +8967,7 @@ module Prism
|
|
|
8828
8967
|
visitor.visit_implicit_rest_node(self)
|
|
8829
8968
|
end
|
|
8830
8969
|
|
|
8831
|
-
# def child_nodes: () -> Array[
|
|
8970
|
+
# def child_nodes: () -> Array[Node?]
|
|
8832
8971
|
def child_nodes
|
|
8833
8972
|
[]
|
|
8834
8973
|
end
|
|
@@ -8848,7 +8987,7 @@ module Prism
|
|
|
8848
8987
|
ImplicitRestNode.new(source, node_id, location, flags)
|
|
8849
8988
|
end
|
|
8850
8989
|
|
|
8851
|
-
# def deconstruct: () -> Array[
|
|
8990
|
+
# def deconstruct: () -> Array[Node?]
|
|
8852
8991
|
alias deconstruct child_nodes
|
|
8853
8992
|
|
|
8854
8993
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
|
@@ -8900,7 +9039,7 @@ module Prism
|
|
|
8900
9039
|
visitor.visit_in_node(self)
|
|
8901
9040
|
end
|
|
8902
9041
|
|
|
8903
|
-
# def child_nodes: () -> Array[
|
|
9042
|
+
# def child_nodes: () -> Array[Node?]
|
|
8904
9043
|
def child_nodes
|
|
8905
9044
|
[pattern, statements]
|
|
8906
9045
|
end
|
|
@@ -8923,7 +9062,7 @@ module Prism
|
|
|
8923
9062
|
InNode.new(source, node_id, location, flags, pattern, statements, in_loc, then_loc)
|
|
8924
9063
|
end
|
|
8925
9064
|
|
|
8926
|
-
# def deconstruct: () -> Array[
|
|
9065
|
+
# def deconstruct: () -> Array[Node?]
|
|
8927
9066
|
alias deconstruct child_nodes
|
|
8928
9067
|
|
|
8929
9068
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location? }
|
|
@@ -9031,7 +9170,7 @@ module Prism
|
|
|
9031
9170
|
visitor.visit_index_and_write_node(self)
|
|
9032
9171
|
end
|
|
9033
9172
|
|
|
9034
|
-
# def child_nodes: () -> Array[
|
|
9173
|
+
# def child_nodes: () -> Array[Node?]
|
|
9035
9174
|
def child_nodes
|
|
9036
9175
|
[receiver, arguments, block, value]
|
|
9037
9176
|
end
|
|
@@ -9056,7 +9195,7 @@ module Prism
|
|
|
9056
9195
|
IndexAndWriteNode.new(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value)
|
|
9057
9196
|
end
|
|
9058
9197
|
|
|
9059
|
-
# def deconstruct: () -> Array[
|
|
9198
|
+
# def deconstruct: () -> Array[Node?]
|
|
9060
9199
|
alias deconstruct child_nodes
|
|
9061
9200
|
|
|
9062
9201
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node }
|
|
@@ -9232,7 +9371,7 @@ module Prism
|
|
|
9232
9371
|
visitor.visit_index_operator_write_node(self)
|
|
9233
9372
|
end
|
|
9234
9373
|
|
|
9235
|
-
# def child_nodes: () -> Array[
|
|
9374
|
+
# def child_nodes: () -> Array[Node?]
|
|
9236
9375
|
def child_nodes
|
|
9237
9376
|
[receiver, arguments, block, value]
|
|
9238
9377
|
end
|
|
@@ -9257,7 +9396,7 @@ module Prism
|
|
|
9257
9396
|
IndexOperatorWriteNode.new(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value)
|
|
9258
9397
|
end
|
|
9259
9398
|
|
|
9260
|
-
# def deconstruct: () -> Array[
|
|
9399
|
+
# def deconstruct: () -> Array[Node?]
|
|
9261
9400
|
alias deconstruct child_nodes
|
|
9262
9401
|
|
|
9263
9402
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node }
|
|
@@ -9431,7 +9570,7 @@ module Prism
|
|
|
9431
9570
|
visitor.visit_index_or_write_node(self)
|
|
9432
9571
|
end
|
|
9433
9572
|
|
|
9434
|
-
# def child_nodes: () -> Array[
|
|
9573
|
+
# def child_nodes: () -> Array[Node?]
|
|
9435
9574
|
def child_nodes
|
|
9436
9575
|
[receiver, arguments, block, value]
|
|
9437
9576
|
end
|
|
@@ -9456,7 +9595,7 @@ module Prism
|
|
|
9456
9595
|
IndexOrWriteNode.new(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value)
|
|
9457
9596
|
end
|
|
9458
9597
|
|
|
9459
|
-
# def deconstruct: () -> Array[
|
|
9598
|
+
# def deconstruct: () -> Array[Node?]
|
|
9460
9599
|
alias deconstruct child_nodes
|
|
9461
9600
|
|
|
9462
9601
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node }
|
|
@@ -9636,7 +9775,7 @@ module Prism
|
|
|
9636
9775
|
visitor.visit_index_target_node(self)
|
|
9637
9776
|
end
|
|
9638
9777
|
|
|
9639
|
-
# def child_nodes: () -> Array[
|
|
9778
|
+
# def child_nodes: () -> Array[Node?]
|
|
9640
9779
|
def child_nodes
|
|
9641
9780
|
[receiver, arguments, block]
|
|
9642
9781
|
end
|
|
@@ -9660,7 +9799,7 @@ module Prism
|
|
|
9660
9799
|
IndexTargetNode.new(source, node_id, location, flags, receiver, opening_loc, arguments, closing_loc, block)
|
|
9661
9800
|
end
|
|
9662
9801
|
|
|
9663
|
-
# def deconstruct: () -> Array[
|
|
9802
|
+
# def deconstruct: () -> Array[Node?]
|
|
9664
9803
|
alias deconstruct child_nodes
|
|
9665
9804
|
|
|
9666
9805
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode? }
|
|
@@ -9783,7 +9922,7 @@ module Prism
|
|
|
9783
9922
|
visitor.visit_instance_variable_and_write_node(self)
|
|
9784
9923
|
end
|
|
9785
9924
|
|
|
9786
|
-
# def child_nodes: () -> Array[
|
|
9925
|
+
# def child_nodes: () -> Array[Node?]
|
|
9787
9926
|
def child_nodes
|
|
9788
9927
|
[value]
|
|
9789
9928
|
end
|
|
@@ -9803,7 +9942,7 @@ module Prism
|
|
|
9803
9942
|
InstanceVariableAndWriteNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
|
9804
9943
|
end
|
|
9805
9944
|
|
|
9806
|
-
# def deconstruct: () -> Array[
|
|
9945
|
+
# def deconstruct: () -> Array[Node?]
|
|
9807
9946
|
alias deconstruct child_nodes
|
|
9808
9947
|
|
|
9809
9948
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
|
@@ -9897,7 +10036,7 @@ module Prism
|
|
|
9897
10036
|
visitor.visit_instance_variable_operator_write_node(self)
|
|
9898
10037
|
end
|
|
9899
10038
|
|
|
9900
|
-
# def child_nodes: () -> Array[
|
|
10039
|
+
# def child_nodes: () -> Array[Node?]
|
|
9901
10040
|
def child_nodes
|
|
9902
10041
|
[value]
|
|
9903
10042
|
end
|
|
@@ -9917,7 +10056,7 @@ module Prism
|
|
|
9917
10056
|
InstanceVariableOperatorWriteNode.new(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator)
|
|
9918
10057
|
end
|
|
9919
10058
|
|
|
9920
|
-
# def deconstruct: () -> Array[
|
|
10059
|
+
# def deconstruct: () -> Array[Node?]
|
|
9921
10060
|
alias deconstruct child_nodes
|
|
9922
10061
|
|
|
9923
10062
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol }
|
|
@@ -10009,7 +10148,7 @@ module Prism
|
|
|
10009
10148
|
visitor.visit_instance_variable_or_write_node(self)
|
|
10010
10149
|
end
|
|
10011
10150
|
|
|
10012
|
-
# def child_nodes: () -> Array[
|
|
10151
|
+
# def child_nodes: () -> Array[Node?]
|
|
10013
10152
|
def child_nodes
|
|
10014
10153
|
[value]
|
|
10015
10154
|
end
|
|
@@ -10029,7 +10168,7 @@ module Prism
|
|
|
10029
10168
|
InstanceVariableOrWriteNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
|
10030
10169
|
end
|
|
10031
10170
|
|
|
10032
|
-
# def deconstruct: () -> Array[
|
|
10171
|
+
# def deconstruct: () -> Array[Node?]
|
|
10033
10172
|
alias deconstruct child_nodes
|
|
10034
10173
|
|
|
10035
10174
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
|
@@ -10119,7 +10258,7 @@ module Prism
|
|
|
10119
10258
|
visitor.visit_instance_variable_read_node(self)
|
|
10120
10259
|
end
|
|
10121
10260
|
|
|
10122
|
-
# def child_nodes: () -> Array[
|
|
10261
|
+
# def child_nodes: () -> Array[Node?]
|
|
10123
10262
|
def child_nodes
|
|
10124
10263
|
[]
|
|
10125
10264
|
end
|
|
@@ -10139,7 +10278,7 @@ module Prism
|
|
|
10139
10278
|
InstanceVariableReadNode.new(source, node_id, location, flags, name)
|
|
10140
10279
|
end
|
|
10141
10280
|
|
|
10142
|
-
# def deconstruct: () -> Array[
|
|
10281
|
+
# def deconstruct: () -> Array[Node?]
|
|
10143
10282
|
alias deconstruct child_nodes
|
|
10144
10283
|
|
|
10145
10284
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
|
@@ -10196,7 +10335,7 @@ module Prism
|
|
|
10196
10335
|
visitor.visit_instance_variable_target_node(self)
|
|
10197
10336
|
end
|
|
10198
10337
|
|
|
10199
|
-
# def child_nodes: () -> Array[
|
|
10338
|
+
# def child_nodes: () -> Array[Node?]
|
|
10200
10339
|
def child_nodes
|
|
10201
10340
|
[]
|
|
10202
10341
|
end
|
|
@@ -10216,7 +10355,7 @@ module Prism
|
|
|
10216
10355
|
InstanceVariableTargetNode.new(source, node_id, location, flags, name)
|
|
10217
10356
|
end
|
|
10218
10357
|
|
|
10219
|
-
# def deconstruct: () -> Array[
|
|
10358
|
+
# def deconstruct: () -> Array[Node?]
|
|
10220
10359
|
alias deconstruct child_nodes
|
|
10221
10360
|
|
|
10222
10361
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
|
@@ -10272,7 +10411,7 @@ module Prism
|
|
|
10272
10411
|
visitor.visit_instance_variable_write_node(self)
|
|
10273
10412
|
end
|
|
10274
10413
|
|
|
10275
|
-
# def child_nodes: () -> Array[
|
|
10414
|
+
# def child_nodes: () -> Array[Node?]
|
|
10276
10415
|
def child_nodes
|
|
10277
10416
|
[value]
|
|
10278
10417
|
end
|
|
@@ -10292,7 +10431,7 @@ module Prism
|
|
|
10292
10431
|
InstanceVariableWriteNode.new(source, node_id, location, flags, name, name_loc, value, operator_loc)
|
|
10293
10432
|
end
|
|
10294
10433
|
|
|
10295
|
-
# def deconstruct: () -> Array[
|
|
10434
|
+
# def deconstruct: () -> Array[Node?]
|
|
10296
10435
|
alias deconstruct child_nodes
|
|
10297
10436
|
|
|
10298
10437
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location }
|
|
@@ -10398,7 +10537,7 @@ module Prism
|
|
|
10398
10537
|
visitor.visit_integer_node(self)
|
|
10399
10538
|
end
|
|
10400
10539
|
|
|
10401
|
-
# def child_nodes: () -> Array[
|
|
10540
|
+
# def child_nodes: () -> Array[Node?]
|
|
10402
10541
|
def child_nodes
|
|
10403
10542
|
[]
|
|
10404
10543
|
end
|
|
@@ -10418,7 +10557,7 @@ module Prism
|
|
|
10418
10557
|
IntegerNode.new(source, node_id, location, flags, value)
|
|
10419
10558
|
end
|
|
10420
10559
|
|
|
10421
|
-
# def deconstruct: () -> Array[
|
|
10560
|
+
# def deconstruct: () -> Array[Node?]
|
|
10422
10561
|
alias deconstruct child_nodes
|
|
10423
10562
|
|
|
10424
10563
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Integer }
|
|
@@ -10494,7 +10633,7 @@ module Prism
|
|
|
10494
10633
|
visitor.visit_interpolated_match_last_line_node(self)
|
|
10495
10634
|
end
|
|
10496
10635
|
|
|
10497
|
-
# def child_nodes: () -> Array[
|
|
10636
|
+
# def child_nodes: () -> Array[Node?]
|
|
10498
10637
|
def child_nodes
|
|
10499
10638
|
[*parts]
|
|
10500
10639
|
end
|
|
@@ -10514,7 +10653,7 @@ module Prism
|
|
|
10514
10653
|
InterpolatedMatchLastLineNode.new(source, node_id, location, flags, opening_loc, parts, closing_loc)
|
|
10515
10654
|
end
|
|
10516
10655
|
|
|
10517
|
-
# def deconstruct: () -> Array[
|
|
10656
|
+
# def deconstruct: () -> Array[Node?]
|
|
10518
10657
|
alias deconstruct child_nodes
|
|
10519
10658
|
|
|
10520
10659
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location }
|
|
@@ -10664,7 +10803,7 @@ module Prism
|
|
|
10664
10803
|
visitor.visit_interpolated_regular_expression_node(self)
|
|
10665
10804
|
end
|
|
10666
10805
|
|
|
10667
|
-
# def child_nodes: () -> Array[
|
|
10806
|
+
# def child_nodes: () -> Array[Node?]
|
|
10668
10807
|
def child_nodes
|
|
10669
10808
|
[*parts]
|
|
10670
10809
|
end
|
|
@@ -10684,7 +10823,7 @@ module Prism
|
|
|
10684
10823
|
InterpolatedRegularExpressionNode.new(source, node_id, location, flags, opening_loc, parts, closing_loc)
|
|
10685
10824
|
end
|
|
10686
10825
|
|
|
10687
|
-
# def deconstruct: () -> Array[
|
|
10826
|
+
# def deconstruct: () -> Array[Node?]
|
|
10688
10827
|
alias deconstruct child_nodes
|
|
10689
10828
|
|
|
10690
10829
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location }
|
|
@@ -10834,7 +10973,7 @@ module Prism
|
|
|
10834
10973
|
visitor.visit_interpolated_string_node(self)
|
|
10835
10974
|
end
|
|
10836
10975
|
|
|
10837
|
-
# def child_nodes: () -> Array[
|
|
10976
|
+
# def child_nodes: () -> Array[Node?]
|
|
10838
10977
|
def child_nodes
|
|
10839
10978
|
[*parts]
|
|
10840
10979
|
end
|
|
@@ -10849,15 +10988,15 @@ module Prism
|
|
|
10849
10988
|
[*opening_loc, *parts, *closing_loc] #: Array[Prism::node | Location]
|
|
10850
10989
|
end
|
|
10851
10990
|
|
|
10852
|
-
# def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode], ?closing_loc: Location?) -> InterpolatedStringNode
|
|
10991
|
+
# def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode], ?closing_loc: Location?) -> InterpolatedStringNode
|
|
10853
10992
|
def copy(node_id: self.node_id, location: self.location, flags: self.flags, opening_loc: self.opening_loc, parts: self.parts, closing_loc: self.closing_loc)
|
|
10854
10993
|
InterpolatedStringNode.new(source, node_id, location, flags, opening_loc, parts, closing_loc)
|
|
10855
10994
|
end
|
|
10856
10995
|
|
|
10857
|
-
# def deconstruct: () -> Array[
|
|
10996
|
+
# def deconstruct: () -> Array[Node?]
|
|
10858
10997
|
alias deconstruct child_nodes
|
|
10859
10998
|
|
|
10860
|
-
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode], closing_loc: Location? }
|
|
10999
|
+
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode], closing_loc: Location? }
|
|
10861
11000
|
def deconstruct_keys(keys)
|
|
10862
11001
|
{ node_id: node_id, location: location, opening_loc: opening_loc, parts: parts, closing_loc: closing_loc }
|
|
10863
11002
|
end
|
|
@@ -10891,7 +11030,7 @@ module Prism
|
|
|
10891
11030
|
repository.enter(node_id, :opening_loc) unless @opening_loc.nil?
|
|
10892
11031
|
end
|
|
10893
11032
|
|
|
10894
|
-
# attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode]
|
|
11033
|
+
# attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode]
|
|
10895
11034
|
attr_reader :parts
|
|
10896
11035
|
|
|
10897
11036
|
# attr_reader closing_loc: Location?
|
|
@@ -10971,7 +11110,7 @@ module Prism
|
|
|
10971
11110
|
visitor.visit_interpolated_symbol_node(self)
|
|
10972
11111
|
end
|
|
10973
11112
|
|
|
10974
|
-
# def child_nodes: () -> Array[
|
|
11113
|
+
# def child_nodes: () -> Array[Node?]
|
|
10975
11114
|
def child_nodes
|
|
10976
11115
|
[*parts]
|
|
10977
11116
|
end
|
|
@@ -10991,7 +11130,7 @@ module Prism
|
|
|
10991
11130
|
InterpolatedSymbolNode.new(source, node_id, location, flags, opening_loc, parts, closing_loc)
|
|
10992
11131
|
end
|
|
10993
11132
|
|
|
10994
|
-
# def deconstruct: () -> Array[
|
|
11133
|
+
# def deconstruct: () -> Array[Node?]
|
|
10995
11134
|
alias deconstruct child_nodes
|
|
10996
11135
|
|
|
10997
11136
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location? }
|
|
@@ -11097,7 +11236,7 @@ module Prism
|
|
|
11097
11236
|
visitor.visit_interpolated_x_string_node(self)
|
|
11098
11237
|
end
|
|
11099
11238
|
|
|
11100
|
-
# def child_nodes: () -> Array[
|
|
11239
|
+
# def child_nodes: () -> Array[Node?]
|
|
11101
11240
|
def child_nodes
|
|
11102
11241
|
[*parts]
|
|
11103
11242
|
end
|
|
@@ -11117,7 +11256,7 @@ module Prism
|
|
|
11117
11256
|
InterpolatedXStringNode.new(source, node_id, location, flags, opening_loc, parts, closing_loc)
|
|
11118
11257
|
end
|
|
11119
11258
|
|
|
11120
|
-
# def deconstruct: () -> Array[
|
|
11259
|
+
# def deconstruct: () -> Array[Node?]
|
|
11121
11260
|
alias deconstruct child_nodes
|
|
11122
11261
|
|
|
11123
11262
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location }
|
|
@@ -11208,7 +11347,7 @@ module Prism
|
|
|
11208
11347
|
visitor.visit_it_local_variable_read_node(self)
|
|
11209
11348
|
end
|
|
11210
11349
|
|
|
11211
|
-
# def child_nodes: () -> Array[
|
|
11350
|
+
# def child_nodes: () -> Array[Node?]
|
|
11212
11351
|
def child_nodes
|
|
11213
11352
|
[]
|
|
11214
11353
|
end
|
|
@@ -11228,7 +11367,7 @@ module Prism
|
|
|
11228
11367
|
ItLocalVariableReadNode.new(source, node_id, location, flags)
|
|
11229
11368
|
end
|
|
11230
11369
|
|
|
11231
|
-
# def deconstruct: () -> Array[
|
|
11370
|
+
# def deconstruct: () -> Array[Node?]
|
|
11232
11371
|
alias deconstruct child_nodes
|
|
11233
11372
|
|
|
11234
11373
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
|
@@ -11276,7 +11415,7 @@ module Prism
|
|
|
11276
11415
|
visitor.visit_it_parameters_node(self)
|
|
11277
11416
|
end
|
|
11278
11417
|
|
|
11279
|
-
# def child_nodes: () -> Array[
|
|
11418
|
+
# def child_nodes: () -> Array[Node?]
|
|
11280
11419
|
def child_nodes
|
|
11281
11420
|
[]
|
|
11282
11421
|
end
|
|
@@ -11296,7 +11435,7 @@ module Prism
|
|
|
11296
11435
|
ItParametersNode.new(source, node_id, location, flags)
|
|
11297
11436
|
end
|
|
11298
11437
|
|
|
11299
|
-
# def deconstruct: () -> Array[
|
|
11438
|
+
# def deconstruct: () -> Array[Node?]
|
|
11300
11439
|
alias deconstruct child_nodes
|
|
11301
11440
|
|
|
11302
11441
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
|
@@ -11345,7 +11484,7 @@ module Prism
|
|
|
11345
11484
|
visitor.visit_keyword_hash_node(self)
|
|
11346
11485
|
end
|
|
11347
11486
|
|
|
11348
|
-
# def child_nodes: () -> Array[
|
|
11487
|
+
# def child_nodes: () -> Array[Node?]
|
|
11349
11488
|
def child_nodes
|
|
11350
11489
|
[*elements]
|
|
11351
11490
|
end
|
|
@@ -11365,7 +11504,7 @@ module Prism
|
|
|
11365
11504
|
KeywordHashNode.new(source, node_id, location, flags, elements)
|
|
11366
11505
|
end
|
|
11367
11506
|
|
|
11368
|
-
# def deconstruct: () -> Array[
|
|
11507
|
+
# def deconstruct: () -> Array[Node?]
|
|
11369
11508
|
alias deconstruct child_nodes
|
|
11370
11509
|
|
|
11371
11510
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[AssocNode | AssocSplatNode] }
|
|
@@ -11428,7 +11567,7 @@ module Prism
|
|
|
11428
11567
|
visitor.visit_keyword_rest_parameter_node(self)
|
|
11429
11568
|
end
|
|
11430
11569
|
|
|
11431
|
-
# def child_nodes: () -> Array[
|
|
11570
|
+
# def child_nodes: () -> Array[Node?]
|
|
11432
11571
|
def child_nodes
|
|
11433
11572
|
[]
|
|
11434
11573
|
end
|
|
@@ -11448,7 +11587,7 @@ module Prism
|
|
|
11448
11587
|
KeywordRestParameterNode.new(source, node_id, location, flags, name, name_loc, operator_loc)
|
|
11449
11588
|
end
|
|
11450
11589
|
|
|
11451
|
-
# def deconstruct: () -> Array[
|
|
11590
|
+
# def deconstruct: () -> Array[Node?]
|
|
11452
11591
|
alias deconstruct child_nodes
|
|
11453
11592
|
|
|
11454
11593
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location }
|
|
@@ -11551,7 +11690,7 @@ module Prism
|
|
|
11551
11690
|
visitor.visit_lambda_node(self)
|
|
11552
11691
|
end
|
|
11553
11692
|
|
|
11554
|
-
# def child_nodes: () -> Array[
|
|
11693
|
+
# def child_nodes: () -> Array[Node?]
|
|
11555
11694
|
def child_nodes
|
|
11556
11695
|
[parameters, body]
|
|
11557
11696
|
end
|
|
@@ -11574,7 +11713,7 @@ module Prism
|
|
|
11574
11713
|
LambdaNode.new(source, node_id, location, flags, locals, operator_loc, opening_loc, closing_loc, parameters, body)
|
|
11575
11714
|
end
|
|
11576
11715
|
|
|
11577
|
-
# def deconstruct: () -> Array[
|
|
11716
|
+
# def deconstruct: () -> Array[Node?]
|
|
11578
11717
|
alias deconstruct child_nodes
|
|
11579
11718
|
|
|
11580
11719
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil }
|
|
@@ -11697,7 +11836,7 @@ module Prism
|
|
|
11697
11836
|
visitor.visit_local_variable_and_write_node(self)
|
|
11698
11837
|
end
|
|
11699
11838
|
|
|
11700
|
-
# def child_nodes: () -> Array[
|
|
11839
|
+
# def child_nodes: () -> Array[Node?]
|
|
11701
11840
|
def child_nodes
|
|
11702
11841
|
[value]
|
|
11703
11842
|
end
|
|
@@ -11717,7 +11856,7 @@ module Prism
|
|
|
11717
11856
|
LocalVariableAndWriteNode.new(source, node_id, location, flags, name_loc, operator_loc, value, name, depth)
|
|
11718
11857
|
end
|
|
11719
11858
|
|
|
11720
|
-
# def deconstruct: () -> Array[
|
|
11859
|
+
# def deconstruct: () -> Array[Node?]
|
|
11721
11860
|
alias deconstruct child_nodes
|
|
11722
11861
|
|
|
11723
11862
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer }
|
|
@@ -11816,7 +11955,7 @@ module Prism
|
|
|
11816
11955
|
visitor.visit_local_variable_operator_write_node(self)
|
|
11817
11956
|
end
|
|
11818
11957
|
|
|
11819
|
-
# def child_nodes: () -> Array[
|
|
11958
|
+
# def child_nodes: () -> Array[Node?]
|
|
11820
11959
|
def child_nodes
|
|
11821
11960
|
[value]
|
|
11822
11961
|
end
|
|
@@ -11836,7 +11975,7 @@ module Prism
|
|
|
11836
11975
|
LocalVariableOperatorWriteNode.new(source, node_id, location, flags, name_loc, binary_operator_loc, value, name, binary_operator, depth)
|
|
11837
11976
|
end
|
|
11838
11977
|
|
|
11839
|
-
# def deconstruct: () -> Array[
|
|
11978
|
+
# def deconstruct: () -> Array[Node?]
|
|
11840
11979
|
alias deconstruct child_nodes
|
|
11841
11980
|
|
|
11842
11981
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer }
|
|
@@ -11933,7 +12072,7 @@ module Prism
|
|
|
11933
12072
|
visitor.visit_local_variable_or_write_node(self)
|
|
11934
12073
|
end
|
|
11935
12074
|
|
|
11936
|
-
# def child_nodes: () -> Array[
|
|
12075
|
+
# def child_nodes: () -> Array[Node?]
|
|
11937
12076
|
def child_nodes
|
|
11938
12077
|
[value]
|
|
11939
12078
|
end
|
|
@@ -11953,7 +12092,7 @@ module Prism
|
|
|
11953
12092
|
LocalVariableOrWriteNode.new(source, node_id, location, flags, name_loc, operator_loc, value, name, depth)
|
|
11954
12093
|
end
|
|
11955
12094
|
|
|
11956
|
-
# def deconstruct: () -> Array[
|
|
12095
|
+
# def deconstruct: () -> Array[Node?]
|
|
11957
12096
|
alias deconstruct child_nodes
|
|
11958
12097
|
|
|
11959
12098
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer }
|
|
@@ -12048,7 +12187,7 @@ module Prism
|
|
|
12048
12187
|
visitor.visit_local_variable_read_node(self)
|
|
12049
12188
|
end
|
|
12050
12189
|
|
|
12051
|
-
# def child_nodes: () -> Array[
|
|
12190
|
+
# def child_nodes: () -> Array[Node?]
|
|
12052
12191
|
def child_nodes
|
|
12053
12192
|
[]
|
|
12054
12193
|
end
|
|
@@ -12068,7 +12207,7 @@ module Prism
|
|
|
12068
12207
|
LocalVariableReadNode.new(source, node_id, location, flags, name, depth)
|
|
12069
12208
|
end
|
|
12070
12209
|
|
|
12071
|
-
# def deconstruct: () -> Array[
|
|
12210
|
+
# def deconstruct: () -> Array[Node?]
|
|
12072
12211
|
alias deconstruct child_nodes
|
|
12073
12212
|
|
|
12074
12213
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer }
|
|
@@ -12124,6 +12263,9 @@ module Prism
|
|
|
12124
12263
|
#
|
|
12125
12264
|
# foo, bar = baz
|
|
12126
12265
|
# ^^^ ^^^
|
|
12266
|
+
#
|
|
12267
|
+
# foo => baz
|
|
12268
|
+
# ^^^
|
|
12127
12269
|
class LocalVariableTargetNode < Node
|
|
12128
12270
|
# Initialize a new LocalVariableTargetNode node.
|
|
12129
12271
|
def initialize(source, node_id, location, flags, name, depth)
|
|
@@ -12140,7 +12282,7 @@ module Prism
|
|
|
12140
12282
|
visitor.visit_local_variable_target_node(self)
|
|
12141
12283
|
end
|
|
12142
12284
|
|
|
12143
|
-
# def child_nodes: () -> Array[
|
|
12285
|
+
# def child_nodes: () -> Array[Node?]
|
|
12144
12286
|
def child_nodes
|
|
12145
12287
|
[]
|
|
12146
12288
|
end
|
|
@@ -12160,7 +12302,7 @@ module Prism
|
|
|
12160
12302
|
LocalVariableTargetNode.new(source, node_id, location, flags, name, depth)
|
|
12161
12303
|
end
|
|
12162
12304
|
|
|
12163
|
-
# def deconstruct: () -> Array[
|
|
12305
|
+
# def deconstruct: () -> Array[Node?]
|
|
12164
12306
|
alias deconstruct child_nodes
|
|
12165
12307
|
|
|
12166
12308
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer }
|
|
@@ -12221,7 +12363,7 @@ module Prism
|
|
|
12221
12363
|
visitor.visit_local_variable_write_node(self)
|
|
12222
12364
|
end
|
|
12223
12365
|
|
|
12224
|
-
# def child_nodes: () -> Array[
|
|
12366
|
+
# def child_nodes: () -> Array[Node?]
|
|
12225
12367
|
def child_nodes
|
|
12226
12368
|
[value]
|
|
12227
12369
|
end
|
|
@@ -12241,7 +12383,7 @@ module Prism
|
|
|
12241
12383
|
LocalVariableWriteNode.new(source, node_id, location, flags, name, depth, name_loc, value, operator_loc)
|
|
12242
12384
|
end
|
|
12243
12385
|
|
|
12244
|
-
# def deconstruct: () -> Array[
|
|
12386
|
+
# def deconstruct: () -> Array[Node?]
|
|
12245
12387
|
alias deconstruct child_nodes
|
|
12246
12388
|
|
|
12247
12389
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location }
|
|
@@ -12364,7 +12506,7 @@ module Prism
|
|
|
12364
12506
|
visitor.visit_match_last_line_node(self)
|
|
12365
12507
|
end
|
|
12366
12508
|
|
|
12367
|
-
# def child_nodes: () -> Array[
|
|
12509
|
+
# def child_nodes: () -> Array[Node?]
|
|
12368
12510
|
def child_nodes
|
|
12369
12511
|
[]
|
|
12370
12512
|
end
|
|
@@ -12384,7 +12526,7 @@ module Prism
|
|
|
12384
12526
|
MatchLastLineNode.new(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped)
|
|
12385
12527
|
end
|
|
12386
12528
|
|
|
12387
|
-
# def deconstruct: () -> Array[
|
|
12529
|
+
# def deconstruct: () -> Array[Node?]
|
|
12388
12530
|
alias deconstruct child_nodes
|
|
12389
12531
|
|
|
12390
12532
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String }
|
|
@@ -12552,7 +12694,7 @@ module Prism
|
|
|
12552
12694
|
visitor.visit_match_predicate_node(self)
|
|
12553
12695
|
end
|
|
12554
12696
|
|
|
12555
|
-
# def child_nodes: () -> Array[
|
|
12697
|
+
# def child_nodes: () -> Array[Node?]
|
|
12556
12698
|
def child_nodes
|
|
12557
12699
|
[value, pattern]
|
|
12558
12700
|
end
|
|
@@ -12572,7 +12714,7 @@ module Prism
|
|
|
12572
12714
|
MatchPredicateNode.new(source, node_id, location, flags, value, pattern, operator_loc)
|
|
12573
12715
|
end
|
|
12574
12716
|
|
|
12575
|
-
# def deconstruct: () -> Array[
|
|
12717
|
+
# def deconstruct: () -> Array[Node?]
|
|
12576
12718
|
alias deconstruct child_nodes
|
|
12577
12719
|
|
|
12578
12720
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location }
|
|
@@ -12650,7 +12792,7 @@ module Prism
|
|
|
12650
12792
|
visitor.visit_match_required_node(self)
|
|
12651
12793
|
end
|
|
12652
12794
|
|
|
12653
|
-
# def child_nodes: () -> Array[
|
|
12795
|
+
# def child_nodes: () -> Array[Node?]
|
|
12654
12796
|
def child_nodes
|
|
12655
12797
|
[value, pattern]
|
|
12656
12798
|
end
|
|
@@ -12670,7 +12812,7 @@ module Prism
|
|
|
12670
12812
|
MatchRequiredNode.new(source, node_id, location, flags, value, pattern, operator_loc)
|
|
12671
12813
|
end
|
|
12672
12814
|
|
|
12673
|
-
# def deconstruct: () -> Array[
|
|
12815
|
+
# def deconstruct: () -> Array[Node?]
|
|
12674
12816
|
alias deconstruct child_nodes
|
|
12675
12817
|
|
|
12676
12818
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location }
|
|
@@ -12678,13 +12820,61 @@ module Prism
|
|
|
12678
12820
|
{ node_id: node_id, location: location, value: value, pattern: pattern, operator_loc: operator_loc }
|
|
12679
12821
|
end
|
|
12680
12822
|
|
|
12681
|
-
#
|
|
12823
|
+
# Represents the left-hand side of the operator.
|
|
12824
|
+
#
|
|
12825
|
+
# foo => bar
|
|
12826
|
+
# ^^^
|
|
12682
12827
|
attr_reader :value
|
|
12683
12828
|
|
|
12684
|
-
#
|
|
12829
|
+
# Represents the right-hand side of the operator. The type of the node depends on the expression.
|
|
12830
|
+
#
|
|
12831
|
+
# Anything that looks like a local variable name (including `_`) will result in a `LocalVariableTargetNode`.
|
|
12832
|
+
#
|
|
12833
|
+
# foo => a # This is equivalent to writing `a = foo`
|
|
12834
|
+
# ^
|
|
12835
|
+
#
|
|
12836
|
+
# Using an explicit `Array` or combining expressions with `,` will result in a `ArrayPatternNode`. This can be preceded by a constant.
|
|
12837
|
+
#
|
|
12838
|
+
# foo => [a]
|
|
12839
|
+
# ^^^
|
|
12840
|
+
#
|
|
12841
|
+
# foo => a, b
|
|
12842
|
+
# ^^^^
|
|
12843
|
+
#
|
|
12844
|
+
# foo => Bar[a, b]
|
|
12845
|
+
# ^^^^^^^^^
|
|
12846
|
+
#
|
|
12847
|
+
# If the array pattern contains at least two wildcard matches, a `FindPatternNode` is created instead.
|
|
12848
|
+
#
|
|
12849
|
+
# foo => *, 1, *a
|
|
12850
|
+
# ^^^^^
|
|
12851
|
+
#
|
|
12852
|
+
# Using an explicit `Hash` or a constant with square brackets and hash keys in the square brackets will result in a `HashPatternNode`.
|
|
12853
|
+
#
|
|
12854
|
+
# foo => { a: 1, b: }
|
|
12855
|
+
#
|
|
12856
|
+
# foo => Bar[a: 1, b:]
|
|
12857
|
+
#
|
|
12858
|
+
# foo => Bar[**]
|
|
12859
|
+
#
|
|
12860
|
+
# To use any variable that needs run time evaluation, pinning is required. This results in a `PinnedVariableNode`
|
|
12861
|
+
#
|
|
12862
|
+
# foo => ^a
|
|
12863
|
+
# ^^
|
|
12864
|
+
#
|
|
12865
|
+
# Similar, any expression can be used with pinning. This results in a `PinnedExpressionNode`.
|
|
12866
|
+
#
|
|
12867
|
+
# foo => ^(a + 1)
|
|
12868
|
+
#
|
|
12869
|
+
# Anything else will result in the regular node for that expression, for example a `ConstantReadNode`.
|
|
12870
|
+
#
|
|
12871
|
+
# foo => CONST
|
|
12685
12872
|
attr_reader :pattern
|
|
12686
12873
|
|
|
12687
|
-
#
|
|
12874
|
+
# The location of the operator.
|
|
12875
|
+
#
|
|
12876
|
+
# foo => bar
|
|
12877
|
+
# ^^
|
|
12688
12878
|
def operator_loc
|
|
12689
12879
|
location = @operator_loc
|
|
12690
12880
|
return location if location.is_a?(Location)
|
|
@@ -12747,7 +12937,7 @@ module Prism
|
|
|
12747
12937
|
visitor.visit_match_write_node(self)
|
|
12748
12938
|
end
|
|
12749
12939
|
|
|
12750
|
-
# def child_nodes: () -> Array[
|
|
12940
|
+
# def child_nodes: () -> Array[Node?]
|
|
12751
12941
|
def child_nodes
|
|
12752
12942
|
[call, *targets]
|
|
12753
12943
|
end
|
|
@@ -12767,7 +12957,7 @@ module Prism
|
|
|
12767
12957
|
MatchWriteNode.new(source, node_id, location, flags, call, targets)
|
|
12768
12958
|
end
|
|
12769
12959
|
|
|
12770
|
-
# def deconstruct: () -> Array[
|
|
12960
|
+
# def deconstruct: () -> Array[Node?]
|
|
12771
12961
|
alias deconstruct child_nodes
|
|
12772
12962
|
|
|
12773
12963
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, call: CallNode, targets: Array[LocalVariableTargetNode] }
|
|
@@ -12821,7 +13011,7 @@ module Prism
|
|
|
12821
13011
|
visitor.visit_missing_node(self)
|
|
12822
13012
|
end
|
|
12823
13013
|
|
|
12824
|
-
# def child_nodes: () -> Array[
|
|
13014
|
+
# def child_nodes: () -> Array[Node?]
|
|
12825
13015
|
def child_nodes
|
|
12826
13016
|
[]
|
|
12827
13017
|
end
|
|
@@ -12841,7 +13031,7 @@ module Prism
|
|
|
12841
13031
|
MissingNode.new(source, node_id, location, flags)
|
|
12842
13032
|
end
|
|
12843
13033
|
|
|
12844
|
-
# def deconstruct: () -> Array[
|
|
13034
|
+
# def deconstruct: () -> Array[Node?]
|
|
12845
13035
|
alias deconstruct child_nodes
|
|
12846
13036
|
|
|
12847
13037
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
|
@@ -12895,7 +13085,7 @@ module Prism
|
|
|
12895
13085
|
visitor.visit_module_node(self)
|
|
12896
13086
|
end
|
|
12897
13087
|
|
|
12898
|
-
# def child_nodes: () -> Array[
|
|
13088
|
+
# def child_nodes: () -> Array[Node?]
|
|
12899
13089
|
def child_nodes
|
|
12900
13090
|
[constant_path, body]
|
|
12901
13091
|
end
|
|
@@ -12918,7 +13108,7 @@ module Prism
|
|
|
12918
13108
|
ModuleNode.new(source, node_id, location, flags, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name)
|
|
12919
13109
|
end
|
|
12920
13110
|
|
|
12921
|
-
# def deconstruct: () -> Array[
|
|
13111
|
+
# def deconstruct: () -> Array[Node?]
|
|
12922
13112
|
alias deconstruct child_nodes
|
|
12923
13113
|
|
|
12924
13114
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], module_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | MissingNode, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol }
|
|
@@ -13031,7 +13221,7 @@ module Prism
|
|
|
13031
13221
|
visitor.visit_multi_target_node(self)
|
|
13032
13222
|
end
|
|
13033
13223
|
|
|
13034
|
-
# def child_nodes: () -> Array[
|
|
13224
|
+
# def child_nodes: () -> Array[Node?]
|
|
13035
13225
|
def child_nodes
|
|
13036
13226
|
[*lefts, rest, *rights]
|
|
13037
13227
|
end
|
|
@@ -13055,7 +13245,7 @@ module Prism
|
|
|
13055
13245
|
MultiTargetNode.new(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc)
|
|
13056
13246
|
end
|
|
13057
13247
|
|
|
13058
|
-
# def deconstruct: () -> Array[
|
|
13248
|
+
# def deconstruct: () -> Array[Node?]
|
|
13059
13249
|
alias deconstruct child_nodes
|
|
13060
13250
|
|
|
13061
13251
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location? }
|
|
@@ -13204,7 +13394,7 @@ module Prism
|
|
|
13204
13394
|
visitor.visit_multi_write_node(self)
|
|
13205
13395
|
end
|
|
13206
13396
|
|
|
13207
|
-
# def child_nodes: () -> Array[
|
|
13397
|
+
# def child_nodes: () -> Array[Node?]
|
|
13208
13398
|
def child_nodes
|
|
13209
13399
|
[*lefts, rest, *rights, value]
|
|
13210
13400
|
end
|
|
@@ -13229,7 +13419,7 @@ module Prism
|
|
|
13229
13419
|
MultiWriteNode.new(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value)
|
|
13230
13420
|
end
|
|
13231
13421
|
|
|
13232
|
-
# def deconstruct: () -> Array[
|
|
13422
|
+
# def deconstruct: () -> Array[Node?]
|
|
13233
13423
|
alias deconstruct child_nodes
|
|
13234
13424
|
|
|
13235
13425
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node }
|
|
@@ -13402,7 +13592,7 @@ module Prism
|
|
|
13402
13592
|
visitor.visit_next_node(self)
|
|
13403
13593
|
end
|
|
13404
13594
|
|
|
13405
|
-
# def child_nodes: () -> Array[
|
|
13595
|
+
# def child_nodes: () -> Array[Node?]
|
|
13406
13596
|
def child_nodes
|
|
13407
13597
|
[arguments]
|
|
13408
13598
|
end
|
|
@@ -13424,7 +13614,7 @@ module Prism
|
|
|
13424
13614
|
NextNode.new(source, node_id, location, flags, arguments, keyword_loc)
|
|
13425
13615
|
end
|
|
13426
13616
|
|
|
13427
|
-
# def deconstruct: () -> Array[
|
|
13617
|
+
# def deconstruct: () -> Array[Node?]
|
|
13428
13618
|
alias deconstruct child_nodes
|
|
13429
13619
|
|
|
13430
13620
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location }
|
|
@@ -13495,7 +13685,7 @@ module Prism
|
|
|
13495
13685
|
visitor.visit_nil_node(self)
|
|
13496
13686
|
end
|
|
13497
13687
|
|
|
13498
|
-
# def child_nodes: () -> Array[
|
|
13688
|
+
# def child_nodes: () -> Array[Node?]
|
|
13499
13689
|
def child_nodes
|
|
13500
13690
|
[]
|
|
13501
13691
|
end
|
|
@@ -13515,7 +13705,7 @@ module Prism
|
|
|
13515
13705
|
NilNode.new(source, node_id, location, flags)
|
|
13516
13706
|
end
|
|
13517
13707
|
|
|
13518
|
-
# def deconstruct: () -> Array[
|
|
13708
|
+
# def deconstruct: () -> Array[Node?]
|
|
13519
13709
|
alias deconstruct child_nodes
|
|
13520
13710
|
|
|
13521
13711
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
|
@@ -13566,7 +13756,7 @@ module Prism
|
|
|
13566
13756
|
visitor.visit_no_keywords_parameter_node(self)
|
|
13567
13757
|
end
|
|
13568
13758
|
|
|
13569
|
-
# def child_nodes: () -> Array[
|
|
13759
|
+
# def child_nodes: () -> Array[Node?]
|
|
13570
13760
|
def child_nodes
|
|
13571
13761
|
[]
|
|
13572
13762
|
end
|
|
@@ -13586,7 +13776,7 @@ module Prism
|
|
|
13586
13776
|
NoKeywordsParameterNode.new(source, node_id, location, flags, operator_loc, keyword_loc)
|
|
13587
13777
|
end
|
|
13588
13778
|
|
|
13589
|
-
# def deconstruct: () -> Array[
|
|
13779
|
+
# def deconstruct: () -> Array[Node?]
|
|
13590
13780
|
alias deconstruct child_nodes
|
|
13591
13781
|
|
|
13592
13782
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, keyword_loc: Location }
|
|
@@ -13673,7 +13863,7 @@ module Prism
|
|
|
13673
13863
|
visitor.visit_numbered_parameters_node(self)
|
|
13674
13864
|
end
|
|
13675
13865
|
|
|
13676
|
-
# def child_nodes: () -> Array[
|
|
13866
|
+
# def child_nodes: () -> Array[Node?]
|
|
13677
13867
|
def child_nodes
|
|
13678
13868
|
[]
|
|
13679
13869
|
end
|
|
@@ -13693,7 +13883,7 @@ module Prism
|
|
|
13693
13883
|
NumberedParametersNode.new(source, node_id, location, flags, maximum)
|
|
13694
13884
|
end
|
|
13695
13885
|
|
|
13696
|
-
# def deconstruct: () -> Array[
|
|
13886
|
+
# def deconstruct: () -> Array[Node?]
|
|
13697
13887
|
alias deconstruct child_nodes
|
|
13698
13888
|
|
|
13699
13889
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, maximum: Integer }
|
|
@@ -13746,7 +13936,7 @@ module Prism
|
|
|
13746
13936
|
visitor.visit_numbered_reference_read_node(self)
|
|
13747
13937
|
end
|
|
13748
13938
|
|
|
13749
|
-
# def child_nodes: () -> Array[
|
|
13939
|
+
# def child_nodes: () -> Array[Node?]
|
|
13750
13940
|
def child_nodes
|
|
13751
13941
|
[]
|
|
13752
13942
|
end
|
|
@@ -13766,7 +13956,7 @@ module Prism
|
|
|
13766
13956
|
NumberedReferenceReadNode.new(source, node_id, location, flags, number)
|
|
13767
13957
|
end
|
|
13768
13958
|
|
|
13769
|
-
# def deconstruct: () -> Array[
|
|
13959
|
+
# def deconstruct: () -> Array[Node?]
|
|
13770
13960
|
alias deconstruct child_nodes
|
|
13771
13961
|
|
|
13772
13962
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, number: Integer }
|
|
@@ -13828,7 +14018,7 @@ module Prism
|
|
|
13828
14018
|
visitor.visit_optional_keyword_parameter_node(self)
|
|
13829
14019
|
end
|
|
13830
14020
|
|
|
13831
|
-
# def child_nodes: () -> Array[
|
|
14021
|
+
# def child_nodes: () -> Array[Node?]
|
|
13832
14022
|
def child_nodes
|
|
13833
14023
|
[value]
|
|
13834
14024
|
end
|
|
@@ -13848,7 +14038,7 @@ module Prism
|
|
|
13848
14038
|
OptionalKeywordParameterNode.new(source, node_id, location, flags, name, name_loc, value)
|
|
13849
14039
|
end
|
|
13850
14040
|
|
|
13851
|
-
# def deconstruct: () -> Array[
|
|
14041
|
+
# def deconstruct: () -> Array[Node?]
|
|
13852
14042
|
alias deconstruct child_nodes
|
|
13853
14043
|
|
|
13854
14044
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node }
|
|
@@ -13929,7 +14119,7 @@ module Prism
|
|
|
13929
14119
|
visitor.visit_optional_parameter_node(self)
|
|
13930
14120
|
end
|
|
13931
14121
|
|
|
13932
|
-
# def child_nodes: () -> Array[
|
|
14122
|
+
# def child_nodes: () -> Array[Node?]
|
|
13933
14123
|
def child_nodes
|
|
13934
14124
|
[value]
|
|
13935
14125
|
end
|
|
@@ -13949,7 +14139,7 @@ module Prism
|
|
|
13949
14139
|
OptionalParameterNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
|
13950
14140
|
end
|
|
13951
14141
|
|
|
13952
|
-
# def deconstruct: () -> Array[
|
|
14142
|
+
# def deconstruct: () -> Array[Node?]
|
|
13953
14143
|
alias deconstruct child_nodes
|
|
13954
14144
|
|
|
13955
14145
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
|
@@ -14047,7 +14237,7 @@ module Prism
|
|
|
14047
14237
|
visitor.visit_or_node(self)
|
|
14048
14238
|
end
|
|
14049
14239
|
|
|
14050
|
-
# def child_nodes: () -> Array[
|
|
14240
|
+
# def child_nodes: () -> Array[Node?]
|
|
14051
14241
|
def child_nodes
|
|
14052
14242
|
[left, right]
|
|
14053
14243
|
end
|
|
@@ -14067,7 +14257,7 @@ module Prism
|
|
|
14067
14257
|
OrNode.new(source, node_id, location, flags, left, right, operator_loc)
|
|
14068
14258
|
end
|
|
14069
14259
|
|
|
14070
|
-
# def deconstruct: () -> Array[
|
|
14260
|
+
# def deconstruct: () -> Array[Node?]
|
|
14071
14261
|
alias deconstruct child_nodes
|
|
14072
14262
|
|
|
14073
14263
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location }
|
|
@@ -14165,7 +14355,7 @@ module Prism
|
|
|
14165
14355
|
visitor.visit_parameters_node(self)
|
|
14166
14356
|
end
|
|
14167
14357
|
|
|
14168
|
-
# def child_nodes: () -> Array[
|
|
14358
|
+
# def child_nodes: () -> Array[Node?]
|
|
14169
14359
|
def child_nodes
|
|
14170
14360
|
[*requireds, *optionals, rest, *posts, *keywords, keyword_rest, block]
|
|
14171
14361
|
end
|
|
@@ -14193,7 +14383,7 @@ module Prism
|
|
|
14193
14383
|
ParametersNode.new(source, node_id, location, flags, requireds, optionals, rest, posts, keywords, keyword_rest, block)
|
|
14194
14384
|
end
|
|
14195
14385
|
|
|
14196
|
-
# def deconstruct: () -> Array[
|
|
14386
|
+
# def deconstruct: () -> Array[Node?]
|
|
14197
14387
|
alias deconstruct child_nodes
|
|
14198
14388
|
|
|
14199
14389
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, block: BlockParameterNode? }
|
|
@@ -14276,7 +14466,7 @@ module Prism
|
|
|
14276
14466
|
visitor.visit_parentheses_node(self)
|
|
14277
14467
|
end
|
|
14278
14468
|
|
|
14279
|
-
# def child_nodes: () -> Array[
|
|
14469
|
+
# def child_nodes: () -> Array[Node?]
|
|
14280
14470
|
def child_nodes
|
|
14281
14471
|
[body]
|
|
14282
14472
|
end
|
|
@@ -14298,7 +14488,7 @@ module Prism
|
|
|
14298
14488
|
ParenthesesNode.new(source, node_id, location, flags, body, opening_loc, closing_loc)
|
|
14299
14489
|
end
|
|
14300
14490
|
|
|
14301
|
-
# def deconstruct: () -> Array[
|
|
14491
|
+
# def deconstruct: () -> Array[Node?]
|
|
14302
14492
|
alias deconstruct child_nodes
|
|
14303
14493
|
|
|
14304
14494
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Prism::node?, opening_loc: Location, closing_loc: Location }
|
|
@@ -14398,7 +14588,7 @@ module Prism
|
|
|
14398
14588
|
visitor.visit_pinned_expression_node(self)
|
|
14399
14589
|
end
|
|
14400
14590
|
|
|
14401
|
-
# def child_nodes: () -> Array[
|
|
14591
|
+
# def child_nodes: () -> Array[Node?]
|
|
14402
14592
|
def child_nodes
|
|
14403
14593
|
[expression]
|
|
14404
14594
|
end
|
|
@@ -14418,7 +14608,7 @@ module Prism
|
|
|
14418
14608
|
PinnedExpressionNode.new(source, node_id, location, flags, expression, operator_loc, lparen_loc, rparen_loc)
|
|
14419
14609
|
end
|
|
14420
14610
|
|
|
14421
|
-
# def deconstruct: () -> Array[
|
|
14611
|
+
# def deconstruct: () -> Array[Node?]
|
|
14422
14612
|
alias deconstruct child_nodes
|
|
14423
14613
|
|
|
14424
14614
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location }
|
|
@@ -14426,10 +14616,16 @@ module Prism
|
|
|
14426
14616
|
{ node_id: node_id, location: location, expression: expression, operator_loc: operator_loc, lparen_loc: lparen_loc, rparen_loc: rparen_loc }
|
|
14427
14617
|
end
|
|
14428
14618
|
|
|
14429
|
-
#
|
|
14619
|
+
# The expression used in the pinned expression
|
|
14620
|
+
#
|
|
14621
|
+
# foo in ^(bar)
|
|
14622
|
+
# ^^^
|
|
14430
14623
|
attr_reader :expression
|
|
14431
14624
|
|
|
14432
|
-
#
|
|
14625
|
+
# The location of the `^` operator
|
|
14626
|
+
#
|
|
14627
|
+
# foo in ^(bar)
|
|
14628
|
+
# ^
|
|
14433
14629
|
def operator_loc
|
|
14434
14630
|
location = @operator_loc
|
|
14435
14631
|
return location if location.is_a?(Location)
|
|
@@ -14442,7 +14638,10 @@ module Prism
|
|
|
14442
14638
|
repository.enter(node_id, :operator_loc)
|
|
14443
14639
|
end
|
|
14444
14640
|
|
|
14445
|
-
#
|
|
14641
|
+
# The location of the opening parenthesis.
|
|
14642
|
+
#
|
|
14643
|
+
# foo in ^(bar)
|
|
14644
|
+
# ^
|
|
14446
14645
|
def lparen_loc
|
|
14447
14646
|
location = @lparen_loc
|
|
14448
14647
|
return location if location.is_a?(Location)
|
|
@@ -14455,7 +14654,10 @@ module Prism
|
|
|
14455
14654
|
repository.enter(node_id, :lparen_loc)
|
|
14456
14655
|
end
|
|
14457
14656
|
|
|
14458
|
-
#
|
|
14657
|
+
# The location of the closing parenthesis.
|
|
14658
|
+
#
|
|
14659
|
+
# foo in ^(bar)
|
|
14660
|
+
# ^
|
|
14459
14661
|
def rparen_loc
|
|
14460
14662
|
location = @rparen_loc
|
|
14461
14663
|
return location if location.is_a?(Location)
|
|
@@ -14529,7 +14731,7 @@ module Prism
|
|
|
14529
14731
|
visitor.visit_pinned_variable_node(self)
|
|
14530
14732
|
end
|
|
14531
14733
|
|
|
14532
|
-
# def child_nodes: () -> Array[
|
|
14734
|
+
# def child_nodes: () -> Array[Node?]
|
|
14533
14735
|
def child_nodes
|
|
14534
14736
|
[variable]
|
|
14535
14737
|
end
|
|
@@ -14549,7 +14751,7 @@ module Prism
|
|
|
14549
14751
|
PinnedVariableNode.new(source, node_id, location, flags, variable, operator_loc)
|
|
14550
14752
|
end
|
|
14551
14753
|
|
|
14552
|
-
# def deconstruct: () -> Array[
|
|
14754
|
+
# def deconstruct: () -> Array[Node?]
|
|
14553
14755
|
alias deconstruct child_nodes
|
|
14554
14756
|
|
|
14555
14757
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, operator_loc: Location }
|
|
@@ -14557,10 +14759,16 @@ module Prism
|
|
|
14557
14759
|
{ node_id: node_id, location: location, variable: variable, operator_loc: operator_loc }
|
|
14558
14760
|
end
|
|
14559
14761
|
|
|
14560
|
-
#
|
|
14762
|
+
# The variable used in the pinned expression
|
|
14763
|
+
#
|
|
14764
|
+
# foo in ^bar
|
|
14765
|
+
# ^^^
|
|
14561
14766
|
attr_reader :variable
|
|
14562
14767
|
|
|
14563
|
-
#
|
|
14768
|
+
# The location of the `^` operator
|
|
14769
|
+
#
|
|
14770
|
+
# foo in ^bar
|
|
14771
|
+
# ^
|
|
14564
14772
|
def operator_loc
|
|
14565
14773
|
location = @operator_loc
|
|
14566
14774
|
return location if location.is_a?(Location)
|
|
@@ -14624,7 +14832,7 @@ module Prism
|
|
|
14624
14832
|
visitor.visit_post_execution_node(self)
|
|
14625
14833
|
end
|
|
14626
14834
|
|
|
14627
|
-
# def child_nodes: () -> Array[
|
|
14835
|
+
# def child_nodes: () -> Array[Node?]
|
|
14628
14836
|
def child_nodes
|
|
14629
14837
|
[statements]
|
|
14630
14838
|
end
|
|
@@ -14646,7 +14854,7 @@ module Prism
|
|
|
14646
14854
|
PostExecutionNode.new(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc)
|
|
14647
14855
|
end
|
|
14648
14856
|
|
|
14649
|
-
# def deconstruct: () -> Array[
|
|
14857
|
+
# def deconstruct: () -> Array[Node?]
|
|
14650
14858
|
alias deconstruct child_nodes
|
|
14651
14859
|
|
|
14652
14860
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location }
|
|
@@ -14759,7 +14967,7 @@ module Prism
|
|
|
14759
14967
|
visitor.visit_pre_execution_node(self)
|
|
14760
14968
|
end
|
|
14761
14969
|
|
|
14762
|
-
# def child_nodes: () -> Array[
|
|
14970
|
+
# def child_nodes: () -> Array[Node?]
|
|
14763
14971
|
def child_nodes
|
|
14764
14972
|
[statements]
|
|
14765
14973
|
end
|
|
@@ -14781,7 +14989,7 @@ module Prism
|
|
|
14781
14989
|
PreExecutionNode.new(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc)
|
|
14782
14990
|
end
|
|
14783
14991
|
|
|
14784
|
-
# def deconstruct: () -> Array[
|
|
14992
|
+
# def deconstruct: () -> Array[Node?]
|
|
14785
14993
|
alias deconstruct child_nodes
|
|
14786
14994
|
|
|
14787
14995
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location }
|
|
@@ -14889,7 +15097,7 @@ module Prism
|
|
|
14889
15097
|
visitor.visit_program_node(self)
|
|
14890
15098
|
end
|
|
14891
15099
|
|
|
14892
|
-
# def child_nodes: () -> Array[
|
|
15100
|
+
# def child_nodes: () -> Array[Node?]
|
|
14893
15101
|
def child_nodes
|
|
14894
15102
|
[statements]
|
|
14895
15103
|
end
|
|
@@ -14909,7 +15117,7 @@ module Prism
|
|
|
14909
15117
|
ProgramNode.new(source, node_id, location, flags, locals, statements)
|
|
14910
15118
|
end
|
|
14911
15119
|
|
|
14912
|
-
# def deconstruct: () -> Array[
|
|
15120
|
+
# def deconstruct: () -> Array[Node?]
|
|
14913
15121
|
alias deconstruct child_nodes
|
|
14914
15122
|
|
|
14915
15123
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], statements: StatementsNode }
|
|
@@ -14972,7 +15180,7 @@ module Prism
|
|
|
14972
15180
|
visitor.visit_range_node(self)
|
|
14973
15181
|
end
|
|
14974
15182
|
|
|
14975
|
-
# def child_nodes: () -> Array[
|
|
15183
|
+
# def child_nodes: () -> Array[Node?]
|
|
14976
15184
|
def child_nodes
|
|
14977
15185
|
[left, right]
|
|
14978
15186
|
end
|
|
@@ -14995,7 +15203,7 @@ module Prism
|
|
|
14995
15203
|
RangeNode.new(source, node_id, location, flags, left, right, operator_loc)
|
|
14996
15204
|
end
|
|
14997
15205
|
|
|
14998
|
-
# def deconstruct: () -> Array[
|
|
15206
|
+
# def deconstruct: () -> Array[Node?]
|
|
14999
15207
|
alias deconstruct child_nodes
|
|
15000
15208
|
|
|
15001
15209
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location }
|
|
@@ -15091,7 +15299,7 @@ module Prism
|
|
|
15091
15299
|
visitor.visit_rational_node(self)
|
|
15092
15300
|
end
|
|
15093
15301
|
|
|
15094
|
-
# def child_nodes: () -> Array[
|
|
15302
|
+
# def child_nodes: () -> Array[Node?]
|
|
15095
15303
|
def child_nodes
|
|
15096
15304
|
[]
|
|
15097
15305
|
end
|
|
@@ -15111,7 +15319,7 @@ module Prism
|
|
|
15111
15319
|
RationalNode.new(source, node_id, location, flags, numerator, denominator)
|
|
15112
15320
|
end
|
|
15113
15321
|
|
|
15114
|
-
# def deconstruct: () -> Array[
|
|
15322
|
+
# def deconstruct: () -> Array[Node?]
|
|
15115
15323
|
alias deconstruct child_nodes
|
|
15116
15324
|
|
|
15117
15325
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numerator: Integer, denominator: Integer }
|
|
@@ -15192,7 +15400,7 @@ module Prism
|
|
|
15192
15400
|
visitor.visit_redo_node(self)
|
|
15193
15401
|
end
|
|
15194
15402
|
|
|
15195
|
-
# def child_nodes: () -> Array[
|
|
15403
|
+
# def child_nodes: () -> Array[Node?]
|
|
15196
15404
|
def child_nodes
|
|
15197
15405
|
[]
|
|
15198
15406
|
end
|
|
@@ -15212,7 +15420,7 @@ module Prism
|
|
|
15212
15420
|
RedoNode.new(source, node_id, location, flags)
|
|
15213
15421
|
end
|
|
15214
15422
|
|
|
15215
|
-
# def deconstruct: () -> Array[
|
|
15423
|
+
# def deconstruct: () -> Array[Node?]
|
|
15216
15424
|
alias deconstruct child_nodes
|
|
15217
15425
|
|
|
15218
15426
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
|
@@ -15264,7 +15472,7 @@ module Prism
|
|
|
15264
15472
|
visitor.visit_regular_expression_node(self)
|
|
15265
15473
|
end
|
|
15266
15474
|
|
|
15267
|
-
# def child_nodes: () -> Array[
|
|
15475
|
+
# def child_nodes: () -> Array[Node?]
|
|
15268
15476
|
def child_nodes
|
|
15269
15477
|
[]
|
|
15270
15478
|
end
|
|
@@ -15284,7 +15492,7 @@ module Prism
|
|
|
15284
15492
|
RegularExpressionNode.new(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped)
|
|
15285
15493
|
end
|
|
15286
15494
|
|
|
15287
|
-
# def deconstruct: () -> Array[
|
|
15495
|
+
# def deconstruct: () -> Array[Node?]
|
|
15288
15496
|
alias deconstruct child_nodes
|
|
15289
15497
|
|
|
15290
15498
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String }
|
|
@@ -15452,7 +15660,7 @@ module Prism
|
|
|
15452
15660
|
visitor.visit_required_keyword_parameter_node(self)
|
|
15453
15661
|
end
|
|
15454
15662
|
|
|
15455
|
-
# def child_nodes: () -> Array[
|
|
15663
|
+
# def child_nodes: () -> Array[Node?]
|
|
15456
15664
|
def child_nodes
|
|
15457
15665
|
[]
|
|
15458
15666
|
end
|
|
@@ -15472,7 +15680,7 @@ module Prism
|
|
|
15472
15680
|
RequiredKeywordParameterNode.new(source, node_id, location, flags, name, name_loc)
|
|
15473
15681
|
end
|
|
15474
15682
|
|
|
15475
|
-
# def deconstruct: () -> Array[
|
|
15683
|
+
# def deconstruct: () -> Array[Node?]
|
|
15476
15684
|
alias deconstruct child_nodes
|
|
15477
15685
|
|
|
15478
15686
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location }
|
|
@@ -15546,7 +15754,7 @@ module Prism
|
|
|
15546
15754
|
visitor.visit_required_parameter_node(self)
|
|
15547
15755
|
end
|
|
15548
15756
|
|
|
15549
|
-
# def child_nodes: () -> Array[
|
|
15757
|
+
# def child_nodes: () -> Array[Node?]
|
|
15550
15758
|
def child_nodes
|
|
15551
15759
|
[]
|
|
15552
15760
|
end
|
|
@@ -15566,7 +15774,7 @@ module Prism
|
|
|
15566
15774
|
RequiredParameterNode.new(source, node_id, location, flags, name)
|
|
15567
15775
|
end
|
|
15568
15776
|
|
|
15569
|
-
# def deconstruct: () -> Array[
|
|
15777
|
+
# def deconstruct: () -> Array[Node?]
|
|
15570
15778
|
alias deconstruct child_nodes
|
|
15571
15779
|
|
|
15572
15780
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
|
@@ -15627,7 +15835,7 @@ module Prism
|
|
|
15627
15835
|
visitor.visit_rescue_modifier_node(self)
|
|
15628
15836
|
end
|
|
15629
15837
|
|
|
15630
|
-
# def child_nodes: () -> Array[
|
|
15838
|
+
# def child_nodes: () -> Array[Node?]
|
|
15631
15839
|
def child_nodes
|
|
15632
15840
|
[expression, rescue_expression]
|
|
15633
15841
|
end
|
|
@@ -15647,7 +15855,7 @@ module Prism
|
|
|
15647
15855
|
RescueModifierNode.new(source, node_id, location, flags, expression, keyword_loc, rescue_expression)
|
|
15648
15856
|
end
|
|
15649
15857
|
|
|
15650
|
-
# def deconstruct: () -> Array[
|
|
15858
|
+
# def deconstruct: () -> Array[Node?]
|
|
15651
15859
|
alias deconstruct child_nodes
|
|
15652
15860
|
|
|
15653
15861
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node }
|
|
@@ -15734,7 +15942,7 @@ module Prism
|
|
|
15734
15942
|
visitor.visit_rescue_node(self)
|
|
15735
15943
|
end
|
|
15736
15944
|
|
|
15737
|
-
# def child_nodes: () -> Array[
|
|
15945
|
+
# def child_nodes: () -> Array[Node?]
|
|
15738
15946
|
def child_nodes
|
|
15739
15947
|
[*exceptions, reference, statements, subsequent]
|
|
15740
15948
|
end
|
|
@@ -15759,7 +15967,7 @@ module Prism
|
|
|
15759
15967
|
RescueNode.new(source, node_id, location, flags, keyword_loc, exceptions, operator_loc, reference, then_keyword_loc, statements, subsequent)
|
|
15760
15968
|
end
|
|
15761
15969
|
|
|
15762
|
-
# def deconstruct: () -> Array[
|
|
15970
|
+
# def deconstruct: () -> Array[Node?]
|
|
15763
15971
|
alias deconstruct child_nodes
|
|
15764
15972
|
|
|
15765
15973
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: RescueNode? }
|
|
@@ -15897,7 +16105,7 @@ module Prism
|
|
|
15897
16105
|
visitor.visit_rest_parameter_node(self)
|
|
15898
16106
|
end
|
|
15899
16107
|
|
|
15900
|
-
# def child_nodes: () -> Array[
|
|
16108
|
+
# def child_nodes: () -> Array[Node?]
|
|
15901
16109
|
def child_nodes
|
|
15902
16110
|
[]
|
|
15903
16111
|
end
|
|
@@ -15917,7 +16125,7 @@ module Prism
|
|
|
15917
16125
|
RestParameterNode.new(source, node_id, location, flags, name, name_loc, operator_loc)
|
|
15918
16126
|
end
|
|
15919
16127
|
|
|
15920
|
-
# def deconstruct: () -> Array[
|
|
16128
|
+
# def deconstruct: () -> Array[Node?]
|
|
15921
16129
|
alias deconstruct child_nodes
|
|
15922
16130
|
|
|
15923
16131
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location }
|
|
@@ -16014,7 +16222,7 @@ module Prism
|
|
|
16014
16222
|
visitor.visit_retry_node(self)
|
|
16015
16223
|
end
|
|
16016
16224
|
|
|
16017
|
-
# def child_nodes: () -> Array[
|
|
16225
|
+
# def child_nodes: () -> Array[Node?]
|
|
16018
16226
|
def child_nodes
|
|
16019
16227
|
[]
|
|
16020
16228
|
end
|
|
@@ -16034,7 +16242,7 @@ module Prism
|
|
|
16034
16242
|
RetryNode.new(source, node_id, location, flags)
|
|
16035
16243
|
end
|
|
16036
16244
|
|
|
16037
|
-
# def deconstruct: () -> Array[
|
|
16245
|
+
# def deconstruct: () -> Array[Node?]
|
|
16038
16246
|
alias deconstruct child_nodes
|
|
16039
16247
|
|
|
16040
16248
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
|
@@ -16084,7 +16292,7 @@ module Prism
|
|
|
16084
16292
|
visitor.visit_return_node(self)
|
|
16085
16293
|
end
|
|
16086
16294
|
|
|
16087
|
-
# def child_nodes: () -> Array[
|
|
16295
|
+
# def child_nodes: () -> Array[Node?]
|
|
16088
16296
|
def child_nodes
|
|
16089
16297
|
[arguments]
|
|
16090
16298
|
end
|
|
@@ -16106,7 +16314,7 @@ module Prism
|
|
|
16106
16314
|
ReturnNode.new(source, node_id, location, flags, keyword_loc, arguments)
|
|
16107
16315
|
end
|
|
16108
16316
|
|
|
16109
|
-
# def deconstruct: () -> Array[
|
|
16317
|
+
# def deconstruct: () -> Array[Node?]
|
|
16110
16318
|
alias deconstruct child_nodes
|
|
16111
16319
|
|
|
16112
16320
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, arguments: ArgumentsNode? }
|
|
@@ -16177,7 +16385,7 @@ module Prism
|
|
|
16177
16385
|
visitor.visit_self_node(self)
|
|
16178
16386
|
end
|
|
16179
16387
|
|
|
16180
|
-
# def child_nodes: () -> Array[
|
|
16388
|
+
# def child_nodes: () -> Array[Node?]
|
|
16181
16389
|
def child_nodes
|
|
16182
16390
|
[]
|
|
16183
16391
|
end
|
|
@@ -16197,7 +16405,7 @@ module Prism
|
|
|
16197
16405
|
SelfNode.new(source, node_id, location, flags)
|
|
16198
16406
|
end
|
|
16199
16407
|
|
|
16200
|
-
# def deconstruct: () -> Array[
|
|
16408
|
+
# def deconstruct: () -> Array[Node?]
|
|
16201
16409
|
alias deconstruct child_nodes
|
|
16202
16410
|
|
|
16203
16411
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
|
@@ -16247,7 +16455,7 @@ module Prism
|
|
|
16247
16455
|
visitor.visit_shareable_constant_node(self)
|
|
16248
16456
|
end
|
|
16249
16457
|
|
|
16250
|
-
# def child_nodes: () -> Array[
|
|
16458
|
+
# def child_nodes: () -> Array[Node?]
|
|
16251
16459
|
def child_nodes
|
|
16252
16460
|
[write]
|
|
16253
16461
|
end
|
|
@@ -16267,7 +16475,7 @@ module Prism
|
|
|
16267
16475
|
ShareableConstantNode.new(source, node_id, location, flags, write)
|
|
16268
16476
|
end
|
|
16269
16477
|
|
|
16270
|
-
# def deconstruct: () -> Array[
|
|
16478
|
+
# def deconstruct: () -> Array[Node?]
|
|
16271
16479
|
alias deconstruct child_nodes
|
|
16272
16480
|
|
|
16273
16481
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode }
|
|
@@ -16341,7 +16549,7 @@ module Prism
|
|
|
16341
16549
|
visitor.visit_singleton_class_node(self)
|
|
16342
16550
|
end
|
|
16343
16551
|
|
|
16344
|
-
# def child_nodes: () -> Array[
|
|
16552
|
+
# def child_nodes: () -> Array[Node?]
|
|
16345
16553
|
def child_nodes
|
|
16346
16554
|
[expression, body]
|
|
16347
16555
|
end
|
|
@@ -16364,7 +16572,7 @@ module Prism
|
|
|
16364
16572
|
SingletonClassNode.new(source, node_id, location, flags, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc)
|
|
16365
16573
|
end
|
|
16366
16574
|
|
|
16367
|
-
# def deconstruct: () -> Array[
|
|
16575
|
+
# def deconstruct: () -> Array[Node?]
|
|
16368
16576
|
alias deconstruct child_nodes
|
|
16369
16577
|
|
|
16370
16578
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location }
|
|
@@ -16482,7 +16690,7 @@ module Prism
|
|
|
16482
16690
|
visitor.visit_source_encoding_node(self)
|
|
16483
16691
|
end
|
|
16484
16692
|
|
|
16485
|
-
# def child_nodes: () -> Array[
|
|
16693
|
+
# def child_nodes: () -> Array[Node?]
|
|
16486
16694
|
def child_nodes
|
|
16487
16695
|
[]
|
|
16488
16696
|
end
|
|
@@ -16502,7 +16710,7 @@ module Prism
|
|
|
16502
16710
|
SourceEncodingNode.new(source, node_id, location, flags)
|
|
16503
16711
|
end
|
|
16504
16712
|
|
|
16505
|
-
# def deconstruct: () -> Array[
|
|
16713
|
+
# def deconstruct: () -> Array[Node?]
|
|
16506
16714
|
alias deconstruct child_nodes
|
|
16507
16715
|
|
|
16508
16716
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
|
@@ -16551,7 +16759,7 @@ module Prism
|
|
|
16551
16759
|
visitor.visit_source_file_node(self)
|
|
16552
16760
|
end
|
|
16553
16761
|
|
|
16554
|
-
# def child_nodes: () -> Array[
|
|
16762
|
+
# def child_nodes: () -> Array[Node?]
|
|
16555
16763
|
def child_nodes
|
|
16556
16764
|
[]
|
|
16557
16765
|
end
|
|
@@ -16571,7 +16779,7 @@ module Prism
|
|
|
16571
16779
|
SourceFileNode.new(source, node_id, location, flags, filepath)
|
|
16572
16780
|
end
|
|
16573
16781
|
|
|
16574
|
-
# def deconstruct: () -> Array[
|
|
16782
|
+
# def deconstruct: () -> Array[Node?]
|
|
16575
16783
|
alias deconstruct child_nodes
|
|
16576
16784
|
|
|
16577
16785
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, filepath: String }
|
|
@@ -16644,7 +16852,7 @@ module Prism
|
|
|
16644
16852
|
visitor.visit_source_line_node(self)
|
|
16645
16853
|
end
|
|
16646
16854
|
|
|
16647
|
-
# def child_nodes: () -> Array[
|
|
16855
|
+
# def child_nodes: () -> Array[Node?]
|
|
16648
16856
|
def child_nodes
|
|
16649
16857
|
[]
|
|
16650
16858
|
end
|
|
@@ -16664,7 +16872,7 @@ module Prism
|
|
|
16664
16872
|
SourceLineNode.new(source, node_id, location, flags)
|
|
16665
16873
|
end
|
|
16666
16874
|
|
|
16667
|
-
# def deconstruct: () -> Array[
|
|
16875
|
+
# def deconstruct: () -> Array[Node?]
|
|
16668
16876
|
alias deconstruct child_nodes
|
|
16669
16877
|
|
|
16670
16878
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
|
@@ -16714,7 +16922,7 @@ module Prism
|
|
|
16714
16922
|
visitor.visit_splat_node(self)
|
|
16715
16923
|
end
|
|
16716
16924
|
|
|
16717
|
-
# def child_nodes: () -> Array[
|
|
16925
|
+
# def child_nodes: () -> Array[Node?]
|
|
16718
16926
|
def child_nodes
|
|
16719
16927
|
[expression]
|
|
16720
16928
|
end
|
|
@@ -16736,7 +16944,7 @@ module Prism
|
|
|
16736
16944
|
SplatNode.new(source, node_id, location, flags, operator_loc, expression)
|
|
16737
16945
|
end
|
|
16738
16946
|
|
|
16739
|
-
# def deconstruct: () -> Array[
|
|
16947
|
+
# def deconstruct: () -> Array[Node?]
|
|
16740
16948
|
alias deconstruct child_nodes
|
|
16741
16949
|
|
|
16742
16950
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, expression: Prism::node? }
|
|
@@ -16808,7 +17016,7 @@ module Prism
|
|
|
16808
17016
|
visitor.visit_statements_node(self)
|
|
16809
17017
|
end
|
|
16810
17018
|
|
|
16811
|
-
# def child_nodes: () -> Array[
|
|
17019
|
+
# def child_nodes: () -> Array[Node?]
|
|
16812
17020
|
def child_nodes
|
|
16813
17021
|
[*body]
|
|
16814
17022
|
end
|
|
@@ -16828,7 +17036,7 @@ module Prism
|
|
|
16828
17036
|
StatementsNode.new(source, node_id, location, flags, body)
|
|
16829
17037
|
end
|
|
16830
17038
|
|
|
16831
|
-
# def deconstruct: () -> Array[
|
|
17039
|
+
# def deconstruct: () -> Array[Node?]
|
|
16832
17040
|
alias deconstruct child_nodes
|
|
16833
17041
|
|
|
16834
17042
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Array[Prism::node] }
|
|
@@ -16891,7 +17099,7 @@ module Prism
|
|
|
16891
17099
|
visitor.visit_string_node(self)
|
|
16892
17100
|
end
|
|
16893
17101
|
|
|
16894
|
-
# def child_nodes: () -> Array[
|
|
17102
|
+
# def child_nodes: () -> Array[Node?]
|
|
16895
17103
|
def child_nodes
|
|
16896
17104
|
[]
|
|
16897
17105
|
end
|
|
@@ -16911,7 +17119,7 @@ module Prism
|
|
|
16911
17119
|
StringNode.new(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped)
|
|
16912
17120
|
end
|
|
16913
17121
|
|
|
16914
|
-
# def deconstruct: () -> Array[
|
|
17122
|
+
# def deconstruct: () -> Array[Node?]
|
|
16915
17123
|
alias deconstruct child_nodes
|
|
16916
17124
|
|
|
16917
17125
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String }
|
|
@@ -17042,6 +17250,8 @@ module Prism
|
|
|
17042
17250
|
#
|
|
17043
17251
|
# super foo, bar
|
|
17044
17252
|
# ^^^^^^^^^^^^^^
|
|
17253
|
+
#
|
|
17254
|
+
# If no arguments are provided (except for a block), it would be a `ForwardingSuperNode` instead.
|
|
17045
17255
|
class SuperNode < Node
|
|
17046
17256
|
# Initialize a new SuperNode node.
|
|
17047
17257
|
def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc, block)
|
|
@@ -17061,7 +17271,7 @@ module Prism
|
|
|
17061
17271
|
visitor.visit_super_node(self)
|
|
17062
17272
|
end
|
|
17063
17273
|
|
|
17064
|
-
# def child_nodes: () -> Array[
|
|
17274
|
+
# def child_nodes: () -> Array[Node?]
|
|
17065
17275
|
def child_nodes
|
|
17066
17276
|
[arguments, block]
|
|
17067
17277
|
end
|
|
@@ -17084,7 +17294,7 @@ module Prism
|
|
|
17084
17294
|
SuperNode.new(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc, block)
|
|
17085
17295
|
end
|
|
17086
17296
|
|
|
17087
|
-
# def deconstruct: () -> Array[
|
|
17297
|
+
# def deconstruct: () -> Array[Node?]
|
|
17088
17298
|
alias deconstruct child_nodes
|
|
17089
17299
|
|
|
17090
17300
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: BlockNode | BlockArgumentNode | nil }
|
|
@@ -17124,7 +17334,7 @@ module Prism
|
|
|
17124
17334
|
repository.enter(node_id, :lparen_loc) unless @lparen_loc.nil?
|
|
17125
17335
|
end
|
|
17126
17336
|
|
|
17127
|
-
#
|
|
17337
|
+
# Can be only `nil` when there are empty parentheses, like `super()`.
|
|
17128
17338
|
attr_reader :arguments
|
|
17129
17339
|
|
|
17130
17340
|
# attr_reader rparen_loc: Location?
|
|
@@ -17216,7 +17426,7 @@ module Prism
|
|
|
17216
17426
|
visitor.visit_symbol_node(self)
|
|
17217
17427
|
end
|
|
17218
17428
|
|
|
17219
|
-
# def child_nodes: () -> Array[
|
|
17429
|
+
# def child_nodes: () -> Array[Node?]
|
|
17220
17430
|
def child_nodes
|
|
17221
17431
|
[]
|
|
17222
17432
|
end
|
|
@@ -17236,7 +17446,7 @@ module Prism
|
|
|
17236
17446
|
SymbolNode.new(source, node_id, location, flags, opening_loc, value_loc, closing_loc, unescaped)
|
|
17237
17447
|
end
|
|
17238
17448
|
|
|
17239
|
-
# def deconstruct: () -> Array[
|
|
17449
|
+
# def deconstruct: () -> Array[Node?]
|
|
17240
17450
|
alias deconstruct child_nodes
|
|
17241
17451
|
|
|
17242
17452
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String }
|
|
@@ -17379,7 +17589,7 @@ module Prism
|
|
|
17379
17589
|
visitor.visit_true_node(self)
|
|
17380
17590
|
end
|
|
17381
17591
|
|
|
17382
|
-
# def child_nodes: () -> Array[
|
|
17592
|
+
# def child_nodes: () -> Array[Node?]
|
|
17383
17593
|
def child_nodes
|
|
17384
17594
|
[]
|
|
17385
17595
|
end
|
|
@@ -17399,7 +17609,7 @@ module Prism
|
|
|
17399
17609
|
TrueNode.new(source, node_id, location, flags)
|
|
17400
17610
|
end
|
|
17401
17611
|
|
|
17402
|
-
# def deconstruct: () -> Array[
|
|
17612
|
+
# def deconstruct: () -> Array[Node?]
|
|
17403
17613
|
alias deconstruct child_nodes
|
|
17404
17614
|
|
|
17405
17615
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
|
@@ -17449,7 +17659,7 @@ module Prism
|
|
|
17449
17659
|
visitor.visit_undef_node(self)
|
|
17450
17660
|
end
|
|
17451
17661
|
|
|
17452
|
-
# def child_nodes: () -> Array[
|
|
17662
|
+
# def child_nodes: () -> Array[Node?]
|
|
17453
17663
|
def child_nodes
|
|
17454
17664
|
[*names]
|
|
17455
17665
|
end
|
|
@@ -17469,7 +17679,7 @@ module Prism
|
|
|
17469
17679
|
UndefNode.new(source, node_id, location, flags, names, keyword_loc)
|
|
17470
17680
|
end
|
|
17471
17681
|
|
|
17472
|
-
# def deconstruct: () -> Array[
|
|
17682
|
+
# def deconstruct: () -> Array[Node?]
|
|
17473
17683
|
alias deconstruct child_nodes
|
|
17474
17684
|
|
|
17475
17685
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location }
|
|
@@ -17550,7 +17760,7 @@ module Prism
|
|
|
17550
17760
|
visitor.visit_unless_node(self)
|
|
17551
17761
|
end
|
|
17552
17762
|
|
|
17553
|
-
# def child_nodes: () -> Array[
|
|
17763
|
+
# def child_nodes: () -> Array[Node?]
|
|
17554
17764
|
def child_nodes
|
|
17555
17765
|
[predicate, statements, else_clause]
|
|
17556
17766
|
end
|
|
@@ -17574,7 +17784,7 @@ module Prism
|
|
|
17574
17784
|
UnlessNode.new(source, node_id, location, flags, keyword_loc, predicate, then_keyword_loc, statements, else_clause, end_keyword_loc)
|
|
17575
17785
|
end
|
|
17576
17786
|
|
|
17577
|
-
# def deconstruct: () -> Array[
|
|
17787
|
+
# def deconstruct: () -> Array[Node?]
|
|
17578
17788
|
alias deconstruct child_nodes
|
|
17579
17789
|
|
|
17580
17790
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, else_clause: ElseNode?, end_keyword_loc: Location? }
|
|
@@ -17736,7 +17946,7 @@ module Prism
|
|
|
17736
17946
|
visitor.visit_until_node(self)
|
|
17737
17947
|
end
|
|
17738
17948
|
|
|
17739
|
-
# def child_nodes: () -> Array[
|
|
17949
|
+
# def child_nodes: () -> Array[Node?]
|
|
17740
17950
|
def child_nodes
|
|
17741
17951
|
[predicate, statements]
|
|
17742
17952
|
end
|
|
@@ -17759,7 +17969,7 @@ module Prism
|
|
|
17759
17969
|
UntilNode.new(source, node_id, location, flags, keyword_loc, do_keyword_loc, closing_loc, predicate, statements)
|
|
17760
17970
|
end
|
|
17761
17971
|
|
|
17762
|
-
# def deconstruct: () -> Array[
|
|
17972
|
+
# def deconstruct: () -> Array[Node?]
|
|
17763
17973
|
alias deconstruct child_nodes
|
|
17764
17974
|
|
|
17765
17975
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, do_keyword_loc: Location?, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? }
|
|
@@ -17896,7 +18106,7 @@ module Prism
|
|
|
17896
18106
|
visitor.visit_when_node(self)
|
|
17897
18107
|
end
|
|
17898
18108
|
|
|
17899
|
-
# def child_nodes: () -> Array[
|
|
18109
|
+
# def child_nodes: () -> Array[Node?]
|
|
17900
18110
|
def child_nodes
|
|
17901
18111
|
[*conditions, statements]
|
|
17902
18112
|
end
|
|
@@ -17919,7 +18129,7 @@ module Prism
|
|
|
17919
18129
|
WhenNode.new(source, node_id, location, flags, keyword_loc, conditions, then_keyword_loc, statements)
|
|
17920
18130
|
end
|
|
17921
18131
|
|
|
17922
|
-
# def deconstruct: () -> Array[
|
|
18132
|
+
# def deconstruct: () -> Array[Node?]
|
|
17923
18133
|
alias deconstruct child_nodes
|
|
17924
18134
|
|
|
17925
18135
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode? }
|
|
@@ -18028,7 +18238,7 @@ module Prism
|
|
|
18028
18238
|
visitor.visit_while_node(self)
|
|
18029
18239
|
end
|
|
18030
18240
|
|
|
18031
|
-
# def child_nodes: () -> Array[
|
|
18241
|
+
# def child_nodes: () -> Array[Node?]
|
|
18032
18242
|
def child_nodes
|
|
18033
18243
|
[predicate, statements]
|
|
18034
18244
|
end
|
|
@@ -18051,7 +18261,7 @@ module Prism
|
|
|
18051
18261
|
WhileNode.new(source, node_id, location, flags, keyword_loc, do_keyword_loc, closing_loc, predicate, statements)
|
|
18052
18262
|
end
|
|
18053
18263
|
|
|
18054
|
-
# def deconstruct: () -> Array[
|
|
18264
|
+
# def deconstruct: () -> Array[Node?]
|
|
18055
18265
|
alias deconstruct child_nodes
|
|
18056
18266
|
|
|
18057
18267
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, do_keyword_loc: Location?, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? }
|
|
@@ -18186,7 +18396,7 @@ module Prism
|
|
|
18186
18396
|
visitor.visit_x_string_node(self)
|
|
18187
18397
|
end
|
|
18188
18398
|
|
|
18189
|
-
# def child_nodes: () -> Array[
|
|
18399
|
+
# def child_nodes: () -> Array[Node?]
|
|
18190
18400
|
def child_nodes
|
|
18191
18401
|
[]
|
|
18192
18402
|
end
|
|
@@ -18206,7 +18416,7 @@ module Prism
|
|
|
18206
18416
|
XStringNode.new(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped)
|
|
18207
18417
|
end
|
|
18208
18418
|
|
|
18209
|
-
# def deconstruct: () -> Array[
|
|
18419
|
+
# def deconstruct: () -> Array[Node?]
|
|
18210
18420
|
alias deconstruct child_nodes
|
|
18211
18421
|
|
|
18212
18422
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String }
|
|
@@ -18330,7 +18540,7 @@ module Prism
|
|
|
18330
18540
|
visitor.visit_yield_node(self)
|
|
18331
18541
|
end
|
|
18332
18542
|
|
|
18333
|
-
# def child_nodes: () -> Array[
|
|
18543
|
+
# def child_nodes: () -> Array[Node?]
|
|
18334
18544
|
def child_nodes
|
|
18335
18545
|
[arguments]
|
|
18336
18546
|
end
|
|
@@ -18352,7 +18562,7 @@ module Prism
|
|
|
18352
18562
|
YieldNode.new(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc)
|
|
18353
18563
|
end
|
|
18354
18564
|
|
|
18355
|
-
# def deconstruct: () -> Array[
|
|
18565
|
+
# def deconstruct: () -> Array[Node?]
|
|
18356
18566
|
alias deconstruct child_nodes
|
|
18357
18567
|
|
|
18358
18568
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location? }
|