prism 1.3.0 → 1.5.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 +46 -1
- data/Makefile +2 -1
- data/README.md +1 -0
- data/config.yml +273 -37
- data/docs/parser_translation.md +8 -23
- data/docs/releasing.md +1 -1
- data/docs/ripper_translation.md +1 -1
- data/docs/ruby_api.md +1 -1
- data/ext/prism/api_node.c +1816 -1303
- data/ext/prism/extension.c +244 -110
- data/ext/prism/extension.h +4 -4
- data/include/prism/ast.h +291 -49
- data/include/prism/defines.h +4 -1
- data/include/prism/diagnostic.h +4 -0
- data/include/prism/options.h +89 -3
- data/include/prism/regexp.h +2 -2
- data/include/prism/util/pm_buffer.h +18 -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 +41 -16
- 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 +21 -1
- data/lib/prism/dsl.rb +13 -2
- data/lib/prism/ffi.rb +62 -34
- data/lib/prism/inspect_visitor.rb +5 -1
- data/lib/prism/lex_compat.rb +1 -0
- data/lib/prism/mutation_compiler.rb +3 -0
- data/lib/prism/node.rb +554 -345
- 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 +2 -1
- data/lib/prism/parse_result.rb +53 -0
- data/lib/prism/pattern.rb +1 -0
- data/lib/prism/polyfill/append_as_bytes.rb +15 -0
- data/lib/prism/polyfill/scan_byte.rb +14 -0
- data/lib/prism/polyfill/warn.rb +42 -0
- data/lib/prism/reflection.rb +5 -2
- data/lib/prism/relocation.rb +1 -0
- data/lib/prism/serialize.rb +1275 -783
- data/lib/prism/string_query.rb +1 -0
- data/lib/prism/translation/parser/builder.rb +62 -0
- data/lib/prism/translation/parser/compiler.rb +230 -152
- data/lib/prism/translation/parser/lexer.rb +446 -64
- data/lib/prism/translation/parser.rb +64 -4
- data/lib/prism/translation/parser33.rb +1 -0
- data/lib/prism/translation/parser34.rb +1 -0
- data/lib/prism/translation/parser35.rb +13 -0
- data/lib/prism/translation/parser_current.rb +24 -0
- data/lib/prism/translation/ripper/sexp.rb +1 -0
- data/lib/prism/translation/ripper.rb +30 -4
- data/lib/prism/translation/ruby_parser.rb +291 -7
- data/lib/prism/translation.rb +3 -0
- data/lib/prism/visitor.rb +457 -152
- data/lib/prism.rb +5 -3
- data/prism.gemspec +9 -1
- data/rbi/prism/dsl.rbi +9 -6
- data/rbi/prism/node.rbi +43 -16
- data/rbi/prism/parse_result.rbi +17 -0
- data/rbi/prism/translation/parser35.rbi +6 -0
- data/rbi/prism.rbi +39 -36
- data/sig/prism/dispatcher.rbs +3 -0
- data/sig/prism/dsl.rbs +7 -5
- data/sig/prism/node.rbs +461 -37
- data/sig/prism/node_ext.rbs +84 -17
- data/sig/prism/parse_result/comments.rbs +38 -0
- data/sig/prism/parse_result.rbs +14 -0
- data/sig/prism/reflection.rbs +1 -1
- data/sig/prism/serialize.rbs +4 -2
- data/sig/prism.rbs +22 -1
- data/src/diagnostic.c +9 -3
- data/src/node.c +23 -0
- data/src/options.c +33 -2
- data/src/prettyprint.c +32 -0
- data/src/prism.c +620 -242
- data/src/serialize.c +8 -0
- data/src/token_type.c +36 -34
- data/src/util/pm_buffer.c +40 -0
- data/src/util/pm_constant_pool.c +6 -2
- data/src/util/pm_strncasecmp.c +13 -1
- metadata +11 -7
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 }
|
@@ -2613,7 +2625,7 @@ module Prism
|
|
2613
2625
|
visitor.visit_call_node(self)
|
2614
2626
|
end
|
2615
2627
|
|
2616
|
-
# def child_nodes: () -> Array[
|
2628
|
+
# def child_nodes: () -> Array[Node?]
|
2617
2629
|
def child_nodes
|
2618
2630
|
[receiver, arguments, block]
|
2619
2631
|
end
|
@@ -2637,7 +2649,7 @@ module Prism
|
|
2637
2649
|
CallNode.new(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block)
|
2638
2650
|
end
|
2639
2651
|
|
2640
|
-
# def deconstruct: () -> Array[
|
2652
|
+
# def deconstruct: () -> Array[Node?]
|
2641
2653
|
alias deconstruct child_nodes
|
2642
2654
|
|
2643
2655
|
# 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 }
|
@@ -2862,7 +2874,7 @@ module Prism
|
|
2862
2874
|
visitor.visit_call_operator_write_node(self)
|
2863
2875
|
end
|
2864
2876
|
|
2865
|
-
# def child_nodes: () -> Array[
|
2877
|
+
# def child_nodes: () -> Array[Node?]
|
2866
2878
|
def child_nodes
|
2867
2879
|
[receiver, value]
|
2868
2880
|
end
|
@@ -2885,7 +2897,7 @@ module Prism
|
|
2885
2897
|
CallOperatorWriteNode.new(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value)
|
2886
2898
|
end
|
2887
2899
|
|
2888
|
-
# def deconstruct: () -> Array[
|
2900
|
+
# def deconstruct: () -> Array[Node?]
|
2889
2901
|
alias deconstruct child_nodes
|
2890
2902
|
|
2891
2903
|
# 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 +3081,7 @@ module Prism
|
|
3069
3081
|
visitor.visit_call_or_write_node(self)
|
3070
3082
|
end
|
3071
3083
|
|
3072
|
-
# def child_nodes: () -> Array[
|
3084
|
+
# def child_nodes: () -> Array[Node?]
|
3073
3085
|
def child_nodes
|
3074
3086
|
[receiver, value]
|
3075
3087
|
end
|
@@ -3092,7 +3104,7 @@ module Prism
|
|
3092
3104
|
CallOrWriteNode.new(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value)
|
3093
3105
|
end
|
3094
3106
|
|
3095
|
-
# def deconstruct: () -> Array[
|
3107
|
+
# def deconstruct: () -> Array[Node?]
|
3096
3108
|
alias deconstruct child_nodes
|
3097
3109
|
|
3098
3110
|
# 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 +3291,7 @@ module Prism
|
|
3279
3291
|
visitor.visit_call_target_node(self)
|
3280
3292
|
end
|
3281
3293
|
|
3282
|
-
# def child_nodes: () -> Array[
|
3294
|
+
# def child_nodes: () -> Array[Node?]
|
3283
3295
|
def child_nodes
|
3284
3296
|
[receiver]
|
3285
3297
|
end
|
@@ -3299,7 +3311,7 @@ module Prism
|
|
3299
3311
|
CallTargetNode.new(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc)
|
3300
3312
|
end
|
3301
3313
|
|
3302
|
-
# def deconstruct: () -> Array[
|
3314
|
+
# def deconstruct: () -> Array[Node?]
|
3303
3315
|
alias deconstruct child_nodes
|
3304
3316
|
|
3305
3317
|
# 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 +3441,7 @@ module Prism
|
|
3429
3441
|
visitor.visit_capture_pattern_node(self)
|
3430
3442
|
end
|
3431
3443
|
|
3432
|
-
# def child_nodes: () -> Array[
|
3444
|
+
# def child_nodes: () -> Array[Node?]
|
3433
3445
|
def child_nodes
|
3434
3446
|
[value, target]
|
3435
3447
|
end
|
@@ -3449,7 +3461,7 @@ module Prism
|
|
3449
3461
|
CapturePatternNode.new(source, node_id, location, flags, value, target, operator_loc)
|
3450
3462
|
end
|
3451
3463
|
|
3452
|
-
# def deconstruct: () -> Array[
|
3464
|
+
# def deconstruct: () -> Array[Node?]
|
3453
3465
|
alias deconstruct child_nodes
|
3454
3466
|
|
3455
3467
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, target: LocalVariableTargetNode, operator_loc: Location }
|
@@ -3540,7 +3552,7 @@ module Prism
|
|
3540
3552
|
visitor.visit_case_match_node(self)
|
3541
3553
|
end
|
3542
3554
|
|
3543
|
-
# def child_nodes: () -> Array[
|
3555
|
+
# def child_nodes: () -> Array[Node?]
|
3544
3556
|
def child_nodes
|
3545
3557
|
[predicate, *conditions, else_clause]
|
3546
3558
|
end
|
@@ -3564,7 +3576,7 @@ module Prism
|
|
3564
3576
|
CaseMatchNode.new(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc)
|
3565
3577
|
end
|
3566
3578
|
|
3567
|
-
# def deconstruct: () -> Array[
|
3579
|
+
# def deconstruct: () -> Array[Node?]
|
3568
3580
|
alias deconstruct child_nodes
|
3569
3581
|
|
3570
3582
|
# 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 +3697,7 @@ module Prism
|
|
3685
3697
|
visitor.visit_case_node(self)
|
3686
3698
|
end
|
3687
3699
|
|
3688
|
-
# def child_nodes: () -> Array[
|
3700
|
+
# def child_nodes: () -> Array[Node?]
|
3689
3701
|
def child_nodes
|
3690
3702
|
[predicate, *conditions, else_clause]
|
3691
3703
|
end
|
@@ -3709,7 +3721,7 @@ module Prism
|
|
3709
3721
|
CaseNode.new(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc)
|
3710
3722
|
end
|
3711
3723
|
|
3712
|
-
# def deconstruct: () -> Array[
|
3724
|
+
# def deconstruct: () -> Array[Node?]
|
3713
3725
|
alias deconstruct child_nodes
|
3714
3726
|
|
3715
3727
|
# 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 }
|
@@ -3831,7 +3843,7 @@ module Prism
|
|
3831
3843
|
visitor.visit_class_node(self)
|
3832
3844
|
end
|
3833
3845
|
|
3834
|
-
# def child_nodes: () -> Array[
|
3846
|
+
# def child_nodes: () -> Array[Node?]
|
3835
3847
|
def child_nodes
|
3836
3848
|
[constant_path, superclass, body]
|
3837
3849
|
end
|
@@ -3855,7 +3867,7 @@ module Prism
|
|
3855
3867
|
ClassNode.new(source, node_id, location, flags, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name)
|
3856
3868
|
end
|
3857
3869
|
|
3858
|
-
# def deconstruct: () -> Array[
|
3870
|
+
# def deconstruct: () -> Array[Node?]
|
3859
3871
|
alias deconstruct child_nodes
|
3860
3872
|
|
3861
3873
|
# 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 +3878,10 @@ module Prism
|
|
3866
3878
|
# attr_reader locals: Array[Symbol]
|
3867
3879
|
attr_reader :locals
|
3868
3880
|
|
3869
|
-
#
|
3881
|
+
# Represents the location of the `class` keyword.
|
3882
|
+
#
|
3883
|
+
# class Foo end
|
3884
|
+
# ^^^^^
|
3870
3885
|
def class_keyword_loc
|
3871
3886
|
location = @class_keyword_loc
|
3872
3887
|
return location if location.is_a?(Location)
|
@@ -3882,7 +3897,10 @@ module Prism
|
|
3882
3897
|
# attr_reader constant_path: ConstantReadNode | ConstantPathNode | CallNode
|
3883
3898
|
attr_reader :constant_path
|
3884
3899
|
|
3885
|
-
#
|
3900
|
+
# Represents the location of the `<` operator.
|
3901
|
+
#
|
3902
|
+
# class Foo < Bar
|
3903
|
+
# ^
|
3886
3904
|
def inheritance_operator_loc
|
3887
3905
|
location = @inheritance_operator_loc
|
3888
3906
|
case location
|
@@ -3901,13 +3919,23 @@ module Prism
|
|
3901
3919
|
repository.enter(node_id, :inheritance_operator_loc) unless @inheritance_operator_loc.nil?
|
3902
3920
|
end
|
3903
3921
|
|
3904
|
-
#
|
3922
|
+
# Represents the superclass of the class.
|
3923
|
+
#
|
3924
|
+
# class Foo < Bar
|
3925
|
+
# ^^^
|
3905
3926
|
attr_reader :superclass
|
3906
3927
|
|
3907
|
-
#
|
3928
|
+
# Represents the body of the class.
|
3929
|
+
#
|
3930
|
+
# class Foo
|
3931
|
+
# foo
|
3932
|
+
# ^^^
|
3908
3933
|
attr_reader :body
|
3909
3934
|
|
3910
|
-
#
|
3935
|
+
# Represents the location of the `end` keyword.
|
3936
|
+
#
|
3937
|
+
# class Foo end
|
3938
|
+
# ^^^
|
3911
3939
|
def end_keyword_loc
|
3912
3940
|
location = @end_keyword_loc
|
3913
3941
|
return location if location.is_a?(Location)
|
@@ -3920,7 +3948,9 @@ module Prism
|
|
3920
3948
|
repository.enter(node_id, :end_keyword_loc)
|
3921
3949
|
end
|
3922
3950
|
|
3923
|
-
#
|
3951
|
+
# The name of the class.
|
3952
|
+
#
|
3953
|
+
# class Foo end # name `:Foo`
|
3924
3954
|
attr_reader :name
|
3925
3955
|
|
3926
3956
|
# def class_keyword: () -> String
|
@@ -3991,7 +4021,7 @@ module Prism
|
|
3991
4021
|
visitor.visit_class_variable_and_write_node(self)
|
3992
4022
|
end
|
3993
4023
|
|
3994
|
-
# def child_nodes: () -> Array[
|
4024
|
+
# def child_nodes: () -> Array[Node?]
|
3995
4025
|
def child_nodes
|
3996
4026
|
[value]
|
3997
4027
|
end
|
@@ -4011,7 +4041,7 @@ module Prism
|
|
4011
4041
|
ClassVariableAndWriteNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
4012
4042
|
end
|
4013
4043
|
|
4014
|
-
# def deconstruct: () -> Array[
|
4044
|
+
# def deconstruct: () -> Array[Node?]
|
4015
4045
|
alias deconstruct child_nodes
|
4016
4046
|
|
4017
4047
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
@@ -4117,7 +4147,7 @@ module Prism
|
|
4117
4147
|
visitor.visit_class_variable_operator_write_node(self)
|
4118
4148
|
end
|
4119
4149
|
|
4120
|
-
# def child_nodes: () -> Array[
|
4150
|
+
# def child_nodes: () -> Array[Node?]
|
4121
4151
|
def child_nodes
|
4122
4152
|
[value]
|
4123
4153
|
end
|
@@ -4137,7 +4167,7 @@ module Prism
|
|
4137
4167
|
ClassVariableOperatorWriteNode.new(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator)
|
4138
4168
|
end
|
4139
4169
|
|
4140
|
-
# def deconstruct: () -> Array[
|
4170
|
+
# def deconstruct: () -> Array[Node?]
|
4141
4171
|
alias deconstruct child_nodes
|
4142
4172
|
|
4143
4173
|
# 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 +4259,7 @@ module Prism
|
|
4229
4259
|
visitor.visit_class_variable_or_write_node(self)
|
4230
4260
|
end
|
4231
4261
|
|
4232
|
-
# def child_nodes: () -> Array[
|
4262
|
+
# def child_nodes: () -> Array[Node?]
|
4233
4263
|
def child_nodes
|
4234
4264
|
[value]
|
4235
4265
|
end
|
@@ -4249,7 +4279,7 @@ module Prism
|
|
4249
4279
|
ClassVariableOrWriteNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
4250
4280
|
end
|
4251
4281
|
|
4252
|
-
# def deconstruct: () -> Array[
|
4282
|
+
# def deconstruct: () -> Array[Node?]
|
4253
4283
|
alias deconstruct child_nodes
|
4254
4284
|
|
4255
4285
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
@@ -4339,7 +4369,7 @@ module Prism
|
|
4339
4369
|
visitor.visit_class_variable_read_node(self)
|
4340
4370
|
end
|
4341
4371
|
|
4342
|
-
# def child_nodes: () -> Array[
|
4372
|
+
# def child_nodes: () -> Array[Node?]
|
4343
4373
|
def child_nodes
|
4344
4374
|
[]
|
4345
4375
|
end
|
@@ -4359,7 +4389,7 @@ module Prism
|
|
4359
4389
|
ClassVariableReadNode.new(source, node_id, location, flags, name)
|
4360
4390
|
end
|
4361
4391
|
|
4362
|
-
# def deconstruct: () -> Array[
|
4392
|
+
# def deconstruct: () -> Array[Node?]
|
4363
4393
|
alias deconstruct child_nodes
|
4364
4394
|
|
4365
4395
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
@@ -4416,7 +4446,7 @@ module Prism
|
|
4416
4446
|
visitor.visit_class_variable_target_node(self)
|
4417
4447
|
end
|
4418
4448
|
|
4419
|
-
# def child_nodes: () -> Array[
|
4449
|
+
# def child_nodes: () -> Array[Node?]
|
4420
4450
|
def child_nodes
|
4421
4451
|
[]
|
4422
4452
|
end
|
@@ -4436,7 +4466,7 @@ module Prism
|
|
4436
4466
|
ClassVariableTargetNode.new(source, node_id, location, flags, name)
|
4437
4467
|
end
|
4438
4468
|
|
4439
|
-
# def deconstruct: () -> Array[
|
4469
|
+
# def deconstruct: () -> Array[Node?]
|
4440
4470
|
alias deconstruct child_nodes
|
4441
4471
|
|
4442
4472
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
@@ -4492,7 +4522,7 @@ module Prism
|
|
4492
4522
|
visitor.visit_class_variable_write_node(self)
|
4493
4523
|
end
|
4494
4524
|
|
4495
|
-
# def child_nodes: () -> Array[
|
4525
|
+
# def child_nodes: () -> Array[Node?]
|
4496
4526
|
def child_nodes
|
4497
4527
|
[value]
|
4498
4528
|
end
|
@@ -4512,7 +4542,7 @@ module Prism
|
|
4512
4542
|
ClassVariableWriteNode.new(source, node_id, location, flags, name, name_loc, value, operator_loc)
|
4513
4543
|
end
|
4514
4544
|
|
4515
|
-
# def deconstruct: () -> Array[
|
4545
|
+
# def deconstruct: () -> Array[Node?]
|
4516
4546
|
alias deconstruct child_nodes
|
4517
4547
|
|
4518
4548
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location }
|
@@ -4621,7 +4651,7 @@ module Prism
|
|
4621
4651
|
visitor.visit_constant_and_write_node(self)
|
4622
4652
|
end
|
4623
4653
|
|
4624
|
-
# def child_nodes: () -> Array[
|
4654
|
+
# def child_nodes: () -> Array[Node?]
|
4625
4655
|
def child_nodes
|
4626
4656
|
[value]
|
4627
4657
|
end
|
@@ -4641,7 +4671,7 @@ module Prism
|
|
4641
4671
|
ConstantAndWriteNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
4642
4672
|
end
|
4643
4673
|
|
4644
|
-
# def deconstruct: () -> Array[
|
4674
|
+
# def deconstruct: () -> Array[Node?]
|
4645
4675
|
alias deconstruct child_nodes
|
4646
4676
|
|
4647
4677
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
@@ -4735,7 +4765,7 @@ module Prism
|
|
4735
4765
|
visitor.visit_constant_operator_write_node(self)
|
4736
4766
|
end
|
4737
4767
|
|
4738
|
-
# def child_nodes: () -> Array[
|
4768
|
+
# def child_nodes: () -> Array[Node?]
|
4739
4769
|
def child_nodes
|
4740
4770
|
[value]
|
4741
4771
|
end
|
@@ -4755,7 +4785,7 @@ module Prism
|
|
4755
4785
|
ConstantOperatorWriteNode.new(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator)
|
4756
4786
|
end
|
4757
4787
|
|
4758
|
-
# def deconstruct: () -> Array[
|
4788
|
+
# def deconstruct: () -> Array[Node?]
|
4759
4789
|
alias deconstruct child_nodes
|
4760
4790
|
|
4761
4791
|
# 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 +4877,7 @@ module Prism
|
|
4847
4877
|
visitor.visit_constant_or_write_node(self)
|
4848
4878
|
end
|
4849
4879
|
|
4850
|
-
# def child_nodes: () -> Array[
|
4880
|
+
# def child_nodes: () -> Array[Node?]
|
4851
4881
|
def child_nodes
|
4852
4882
|
[value]
|
4853
4883
|
end
|
@@ -4867,7 +4897,7 @@ module Prism
|
|
4867
4897
|
ConstantOrWriteNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
4868
4898
|
end
|
4869
4899
|
|
4870
|
-
# def deconstruct: () -> Array[
|
4900
|
+
# def deconstruct: () -> Array[Node?]
|
4871
4901
|
alias deconstruct child_nodes
|
4872
4902
|
|
4873
4903
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
@@ -4959,7 +4989,7 @@ module Prism
|
|
4959
4989
|
visitor.visit_constant_path_and_write_node(self)
|
4960
4990
|
end
|
4961
4991
|
|
4962
|
-
# def child_nodes: () -> Array[
|
4992
|
+
# def child_nodes: () -> Array[Node?]
|
4963
4993
|
def child_nodes
|
4964
4994
|
[target, value]
|
4965
4995
|
end
|
@@ -4979,7 +5009,7 @@ module Prism
|
|
4979
5009
|
ConstantPathAndWriteNode.new(source, node_id, location, flags, target, operator_loc, value)
|
4980
5010
|
end
|
4981
5011
|
|
4982
|
-
# def deconstruct: () -> Array[
|
5012
|
+
# def deconstruct: () -> Array[Node?]
|
4983
5013
|
alias deconstruct child_nodes
|
4984
5014
|
|
4985
5015
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node }
|
@@ -5058,7 +5088,7 @@ module Prism
|
|
5058
5088
|
visitor.visit_constant_path_node(self)
|
5059
5089
|
end
|
5060
5090
|
|
5061
|
-
# def child_nodes: () -> Array[
|
5091
|
+
# def child_nodes: () -> Array[Node?]
|
5062
5092
|
def child_nodes
|
5063
5093
|
[parent]
|
5064
5094
|
end
|
@@ -5080,7 +5110,7 @@ module Prism
|
|
5080
5110
|
ConstantPathNode.new(source, node_id, location, flags, parent, name, delimiter_loc, name_loc)
|
5081
5111
|
end
|
5082
5112
|
|
5083
|
-
# def deconstruct: () -> Array[
|
5113
|
+
# def deconstruct: () -> Array[Node?]
|
5084
5114
|
alias deconstruct child_nodes
|
5085
5115
|
|
5086
5116
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location }
|
@@ -5194,7 +5224,7 @@ module Prism
|
|
5194
5224
|
visitor.visit_constant_path_operator_write_node(self)
|
5195
5225
|
end
|
5196
5226
|
|
5197
|
-
# def child_nodes: () -> Array[
|
5227
|
+
# def child_nodes: () -> Array[Node?]
|
5198
5228
|
def child_nodes
|
5199
5229
|
[target, value]
|
5200
5230
|
end
|
@@ -5214,7 +5244,7 @@ module Prism
|
|
5214
5244
|
ConstantPathOperatorWriteNode.new(source, node_id, location, flags, target, binary_operator_loc, value, binary_operator)
|
5215
5245
|
end
|
5216
5246
|
|
5217
|
-
# def deconstruct: () -> Array[
|
5247
|
+
# def deconstruct: () -> Array[Node?]
|
5218
5248
|
alias deconstruct child_nodes
|
5219
5249
|
|
5220
5250
|
# 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 +5321,7 @@ module Prism
|
|
5291
5321
|
visitor.visit_constant_path_or_write_node(self)
|
5292
5322
|
end
|
5293
5323
|
|
5294
|
-
# def child_nodes: () -> Array[
|
5324
|
+
# def child_nodes: () -> Array[Node?]
|
5295
5325
|
def child_nodes
|
5296
5326
|
[target, value]
|
5297
5327
|
end
|
@@ -5311,7 +5341,7 @@ module Prism
|
|
5311
5341
|
ConstantPathOrWriteNode.new(source, node_id, location, flags, target, operator_loc, value)
|
5312
5342
|
end
|
5313
5343
|
|
5314
|
-
# def deconstruct: () -> Array[
|
5344
|
+
# def deconstruct: () -> Array[Node?]
|
5315
5345
|
alias deconstruct child_nodes
|
5316
5346
|
|
5317
5347
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node }
|
@@ -5390,7 +5420,7 @@ module Prism
|
|
5390
5420
|
visitor.visit_constant_path_target_node(self)
|
5391
5421
|
end
|
5392
5422
|
|
5393
|
-
# def child_nodes: () -> Array[
|
5423
|
+
# def child_nodes: () -> Array[Node?]
|
5394
5424
|
def child_nodes
|
5395
5425
|
[parent]
|
5396
5426
|
end
|
@@ -5412,7 +5442,7 @@ module Prism
|
|
5412
5442
|
ConstantPathTargetNode.new(source, node_id, location, flags, parent, name, delimiter_loc, name_loc)
|
5413
5443
|
end
|
5414
5444
|
|
5415
|
-
# def deconstruct: () -> Array[
|
5445
|
+
# def deconstruct: () -> Array[Node?]
|
5416
5446
|
alias deconstruct child_nodes
|
5417
5447
|
|
5418
5448
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location }
|
@@ -5510,7 +5540,7 @@ module Prism
|
|
5510
5540
|
visitor.visit_constant_path_write_node(self)
|
5511
5541
|
end
|
5512
5542
|
|
5513
|
-
# def child_nodes: () -> Array[
|
5543
|
+
# def child_nodes: () -> Array[Node?]
|
5514
5544
|
def child_nodes
|
5515
5545
|
[target, value]
|
5516
5546
|
end
|
@@ -5530,7 +5560,7 @@ module Prism
|
|
5530
5560
|
ConstantPathWriteNode.new(source, node_id, location, flags, target, operator_loc, value)
|
5531
5561
|
end
|
5532
5562
|
|
5533
|
-
# def deconstruct: () -> Array[
|
5563
|
+
# def deconstruct: () -> Array[Node?]
|
5534
5564
|
alias deconstruct child_nodes
|
5535
5565
|
|
5536
5566
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node }
|
@@ -5618,7 +5648,7 @@ module Prism
|
|
5618
5648
|
visitor.visit_constant_read_node(self)
|
5619
5649
|
end
|
5620
5650
|
|
5621
|
-
# def child_nodes: () -> Array[
|
5651
|
+
# def child_nodes: () -> Array[Node?]
|
5622
5652
|
def child_nodes
|
5623
5653
|
[]
|
5624
5654
|
end
|
@@ -5638,7 +5668,7 @@ module Prism
|
|
5638
5668
|
ConstantReadNode.new(source, node_id, location, flags, name)
|
5639
5669
|
end
|
5640
5670
|
|
5641
|
-
# def deconstruct: () -> Array[
|
5671
|
+
# def deconstruct: () -> Array[Node?]
|
5642
5672
|
alias deconstruct child_nodes
|
5643
5673
|
|
5644
5674
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
@@ -5695,7 +5725,7 @@ module Prism
|
|
5695
5725
|
visitor.visit_constant_target_node(self)
|
5696
5726
|
end
|
5697
5727
|
|
5698
|
-
# def child_nodes: () -> Array[
|
5728
|
+
# def child_nodes: () -> Array[Node?]
|
5699
5729
|
def child_nodes
|
5700
5730
|
[]
|
5701
5731
|
end
|
@@ -5715,7 +5745,7 @@ module Prism
|
|
5715
5745
|
ConstantTargetNode.new(source, node_id, location, flags, name)
|
5716
5746
|
end
|
5717
5747
|
|
5718
|
-
# def deconstruct: () -> Array[
|
5748
|
+
# def deconstruct: () -> Array[Node?]
|
5719
5749
|
alias deconstruct child_nodes
|
5720
5750
|
|
5721
5751
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
@@ -5771,7 +5801,7 @@ module Prism
|
|
5771
5801
|
visitor.visit_constant_write_node(self)
|
5772
5802
|
end
|
5773
5803
|
|
5774
|
-
# def child_nodes: () -> Array[
|
5804
|
+
# def child_nodes: () -> Array[Node?]
|
5775
5805
|
def child_nodes
|
5776
5806
|
[value]
|
5777
5807
|
end
|
@@ -5791,7 +5821,7 @@ module Prism
|
|
5791
5821
|
ConstantWriteNode.new(source, node_id, location, flags, name, name_loc, value, operator_loc)
|
5792
5822
|
end
|
5793
5823
|
|
5794
|
-
# def deconstruct: () -> Array[
|
5824
|
+
# def deconstruct: () -> Array[Node?]
|
5795
5825
|
alias deconstruct child_nodes
|
5796
5826
|
|
5797
5827
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location }
|
@@ -5909,7 +5939,7 @@ module Prism
|
|
5909
5939
|
visitor.visit_def_node(self)
|
5910
5940
|
end
|
5911
5941
|
|
5912
|
-
# def child_nodes: () -> Array[
|
5942
|
+
# def child_nodes: () -> Array[Node?]
|
5913
5943
|
def child_nodes
|
5914
5944
|
[receiver, parameters, body]
|
5915
5945
|
end
|
@@ -5933,7 +5963,7 @@ module Prism
|
|
5933
5963
|
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
5964
|
end
|
5935
5965
|
|
5936
|
-
# def deconstruct: () -> Array[
|
5966
|
+
# def deconstruct: () -> Array[Node?]
|
5937
5967
|
alias deconstruct child_nodes
|
5938
5968
|
|
5939
5969
|
# 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 +6194,7 @@ module Prism
|
|
6164
6194
|
visitor.visit_defined_node(self)
|
6165
6195
|
end
|
6166
6196
|
|
6167
|
-
# def child_nodes: () -> Array[
|
6197
|
+
# def child_nodes: () -> Array[Node?]
|
6168
6198
|
def child_nodes
|
6169
6199
|
[value]
|
6170
6200
|
end
|
@@ -6184,7 +6214,7 @@ module Prism
|
|
6184
6214
|
DefinedNode.new(source, node_id, location, flags, lparen_loc, value, rparen_loc, keyword_loc)
|
6185
6215
|
end
|
6186
6216
|
|
6187
|
-
# def deconstruct: () -> Array[
|
6217
|
+
# def deconstruct: () -> Array[Node?]
|
6188
6218
|
alias deconstruct child_nodes
|
6189
6219
|
|
6190
6220
|
# 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 +6338,7 @@ module Prism
|
|
6308
6338
|
visitor.visit_else_node(self)
|
6309
6339
|
end
|
6310
6340
|
|
6311
|
-
# def child_nodes: () -> Array[
|
6341
|
+
# def child_nodes: () -> Array[Node?]
|
6312
6342
|
def child_nodes
|
6313
6343
|
[statements]
|
6314
6344
|
end
|
@@ -6330,7 +6360,7 @@ module Prism
|
|
6330
6360
|
ElseNode.new(source, node_id, location, flags, else_keyword_loc, statements, end_keyword_loc)
|
6331
6361
|
end
|
6332
6362
|
|
6333
|
-
# def deconstruct: () -> Array[
|
6363
|
+
# def deconstruct: () -> Array[Node?]
|
6334
6364
|
alias deconstruct child_nodes
|
6335
6365
|
|
6336
6366
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location? }
|
@@ -6429,7 +6459,7 @@ module Prism
|
|
6429
6459
|
visitor.visit_embedded_statements_node(self)
|
6430
6460
|
end
|
6431
6461
|
|
6432
|
-
# def child_nodes: () -> Array[
|
6462
|
+
# def child_nodes: () -> Array[Node?]
|
6433
6463
|
def child_nodes
|
6434
6464
|
[statements]
|
6435
6465
|
end
|
@@ -6451,7 +6481,7 @@ module Prism
|
|
6451
6481
|
EmbeddedStatementsNode.new(source, node_id, location, flags, opening_loc, statements, closing_loc)
|
6452
6482
|
end
|
6453
6483
|
|
6454
|
-
# def deconstruct: () -> Array[
|
6484
|
+
# def deconstruct: () -> Array[Node?]
|
6455
6485
|
alias deconstruct child_nodes
|
6456
6486
|
|
6457
6487
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, statements: StatementsNode?, closing_loc: Location }
|
@@ -6543,7 +6573,7 @@ module Prism
|
|
6543
6573
|
visitor.visit_embedded_variable_node(self)
|
6544
6574
|
end
|
6545
6575
|
|
6546
|
-
# def child_nodes: () -> Array[
|
6576
|
+
# def child_nodes: () -> Array[Node?]
|
6547
6577
|
def child_nodes
|
6548
6578
|
[variable]
|
6549
6579
|
end
|
@@ -6563,7 +6593,7 @@ module Prism
|
|
6563
6593
|
EmbeddedVariableNode.new(source, node_id, location, flags, operator_loc, variable)
|
6564
6594
|
end
|
6565
6595
|
|
6566
|
-
# def deconstruct: () -> Array[
|
6596
|
+
# def deconstruct: () -> Array[Node?]
|
6567
6597
|
alias deconstruct child_nodes
|
6568
6598
|
|
6569
6599
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode }
|
@@ -6641,7 +6671,7 @@ module Prism
|
|
6641
6671
|
visitor.visit_ensure_node(self)
|
6642
6672
|
end
|
6643
6673
|
|
6644
|
-
# def child_nodes: () -> Array[
|
6674
|
+
# def child_nodes: () -> Array[Node?]
|
6645
6675
|
def child_nodes
|
6646
6676
|
[statements]
|
6647
6677
|
end
|
@@ -6663,7 +6693,7 @@ module Prism
|
|
6663
6693
|
EnsureNode.new(source, node_id, location, flags, ensure_keyword_loc, statements, end_keyword_loc)
|
6664
6694
|
end
|
6665
6695
|
|
6666
|
-
# def deconstruct: () -> Array[
|
6696
|
+
# def deconstruct: () -> Array[Node?]
|
6667
6697
|
alias deconstruct child_nodes
|
6668
6698
|
|
6669
6699
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location }
|
@@ -6753,7 +6783,7 @@ module Prism
|
|
6753
6783
|
visitor.visit_false_node(self)
|
6754
6784
|
end
|
6755
6785
|
|
6756
|
-
# def child_nodes: () -> Array[
|
6786
|
+
# def child_nodes: () -> Array[Node?]
|
6757
6787
|
def child_nodes
|
6758
6788
|
[]
|
6759
6789
|
end
|
@@ -6773,7 +6803,7 @@ module Prism
|
|
6773
6803
|
FalseNode.new(source, node_id, location, flags)
|
6774
6804
|
end
|
6775
6805
|
|
6776
|
-
# def deconstruct: () -> Array[
|
6806
|
+
# def deconstruct: () -> Array[Node?]
|
6777
6807
|
alias deconstruct child_nodes
|
6778
6808
|
|
6779
6809
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
@@ -6813,6 +6843,9 @@ module Prism
|
|
6813
6843
|
#
|
6814
6844
|
# foo in Foo(*bar, baz, *qux)
|
6815
6845
|
# ^^^^^^^^^^^^^^^^^^^^
|
6846
|
+
#
|
6847
|
+
# foo => *bar, baz, *qux
|
6848
|
+
# ^^^^^^^^^^^^^^^
|
6816
6849
|
class FindPatternNode < Node
|
6817
6850
|
# Initialize a new FindPatternNode node.
|
6818
6851
|
def initialize(source, node_id, location, flags, constant, left, requireds, right, opening_loc, closing_loc)
|
@@ -6833,7 +6866,7 @@ module Prism
|
|
6833
6866
|
visitor.visit_find_pattern_node(self)
|
6834
6867
|
end
|
6835
6868
|
|
6836
|
-
# def child_nodes: () -> Array[
|
6869
|
+
# def child_nodes: () -> Array[Node?]
|
6837
6870
|
def child_nodes
|
6838
6871
|
[constant, left, *requireds, right]
|
6839
6872
|
end
|
@@ -6853,32 +6886,59 @@ module Prism
|
|
6853
6886
|
[*constant, left, *requireds, right, *opening_loc, *closing_loc] #: Array[Prism::node | Location]
|
6854
6887
|
end
|
6855
6888
|
|
6856
|
-
# def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant:
|
6889
|
+
# 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
6890
|
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
6891
|
FindPatternNode.new(source, node_id, location, flags, constant, left, requireds, right, opening_loc, closing_loc)
|
6859
6892
|
end
|
6860
6893
|
|
6861
|
-
# def deconstruct: () -> Array[
|
6894
|
+
# def deconstruct: () -> Array[Node?]
|
6862
6895
|
alias deconstruct child_nodes
|
6863
6896
|
|
6864
|
-
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant:
|
6897
|
+
# 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
6898
|
def deconstruct_keys(keys)
|
6866
6899
|
{ node_id: node_id, location: location, constant: constant, left: left, requireds: requireds, right: right, opening_loc: opening_loc, closing_loc: closing_loc }
|
6867
6900
|
end
|
6868
6901
|
|
6869
|
-
#
|
6902
|
+
# Represents the optional constant preceding the pattern
|
6903
|
+
#
|
6904
|
+
# foo in Foo(*bar, baz, *qux)
|
6905
|
+
# ^^^
|
6870
6906
|
attr_reader :constant
|
6871
6907
|
|
6872
|
-
#
|
6908
|
+
# Represents the first wildcard node in the pattern.
|
6909
|
+
#
|
6910
|
+
# foo in *bar, baz, *qux
|
6911
|
+
# ^^^^
|
6912
|
+
#
|
6913
|
+
# foo in Foo(*bar, baz, *qux)
|
6914
|
+
# ^^^^
|
6873
6915
|
attr_reader :left
|
6874
6916
|
|
6875
|
-
#
|
6917
|
+
# Represents the nodes in between the wildcards.
|
6918
|
+
#
|
6919
|
+
# foo in *bar, baz, *qux
|
6920
|
+
# ^^^
|
6921
|
+
#
|
6922
|
+
# foo in Foo(*bar, baz, 1, *qux)
|
6923
|
+
# ^^^^^^
|
6876
6924
|
attr_reader :requireds
|
6877
6925
|
|
6878
|
-
#
|
6926
|
+
# Represents the second wildcard node in the pattern.
|
6927
|
+
#
|
6928
|
+
# foo in *bar, baz, *qux
|
6929
|
+
# ^^^^
|
6930
|
+
#
|
6931
|
+
# foo in Foo(*bar, baz, *qux)
|
6932
|
+
# ^^^^
|
6879
6933
|
attr_reader :right
|
6880
6934
|
|
6881
|
-
#
|
6935
|
+
# The location of the opening brace.
|
6936
|
+
#
|
6937
|
+
# foo in [*bar, baz, *qux]
|
6938
|
+
# ^
|
6939
|
+
#
|
6940
|
+
# foo in Foo(*bar, baz, *qux)
|
6941
|
+
# ^
|
6882
6942
|
def opening_loc
|
6883
6943
|
location = @opening_loc
|
6884
6944
|
case location
|
@@ -6897,7 +6957,13 @@ module Prism
|
|
6897
6957
|
repository.enter(node_id, :opening_loc) unless @opening_loc.nil?
|
6898
6958
|
end
|
6899
6959
|
|
6900
|
-
#
|
6960
|
+
# The location of the closing brace.
|
6961
|
+
#
|
6962
|
+
# foo in [*bar, baz, *qux]
|
6963
|
+
# ^
|
6964
|
+
#
|
6965
|
+
# foo in Foo(*bar, baz, *qux)
|
6966
|
+
# ^
|
6901
6967
|
def closing_loc
|
6902
6968
|
location = @closing_loc
|
6903
6969
|
case location
|
@@ -6976,7 +7042,7 @@ module Prism
|
|
6976
7042
|
visitor.visit_flip_flop_node(self)
|
6977
7043
|
end
|
6978
7044
|
|
6979
|
-
# def child_nodes: () -> Array[
|
7045
|
+
# def child_nodes: () -> Array[Node?]
|
6980
7046
|
def child_nodes
|
6981
7047
|
[left, right]
|
6982
7048
|
end
|
@@ -6999,7 +7065,7 @@ module Prism
|
|
6999
7065
|
FlipFlopNode.new(source, node_id, location, flags, left, right, operator_loc)
|
7000
7066
|
end
|
7001
7067
|
|
7002
|
-
# def deconstruct: () -> Array[
|
7068
|
+
# def deconstruct: () -> Array[Node?]
|
7003
7069
|
alias deconstruct child_nodes
|
7004
7070
|
|
7005
7071
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location }
|
@@ -7081,7 +7147,7 @@ module Prism
|
|
7081
7147
|
visitor.visit_float_node(self)
|
7082
7148
|
end
|
7083
7149
|
|
7084
|
-
# def child_nodes: () -> Array[
|
7150
|
+
# def child_nodes: () -> Array[Node?]
|
7085
7151
|
def child_nodes
|
7086
7152
|
[]
|
7087
7153
|
end
|
@@ -7101,7 +7167,7 @@ module Prism
|
|
7101
7167
|
FloatNode.new(source, node_id, location, flags, value)
|
7102
7168
|
end
|
7103
7169
|
|
7104
|
-
# def deconstruct: () -> Array[
|
7170
|
+
# def deconstruct: () -> Array[Node?]
|
7105
7171
|
alias deconstruct child_nodes
|
7106
7172
|
|
7107
7173
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Float }
|
@@ -7160,7 +7226,7 @@ module Prism
|
|
7160
7226
|
visitor.visit_for_node(self)
|
7161
7227
|
end
|
7162
7228
|
|
7163
|
-
# def child_nodes: () -> Array[
|
7229
|
+
# def child_nodes: () -> Array[Node?]
|
7164
7230
|
def child_nodes
|
7165
7231
|
[index, collection, statements]
|
7166
7232
|
end
|
@@ -7184,7 +7250,7 @@ module Prism
|
|
7184
7250
|
ForNode.new(source, node_id, location, flags, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc)
|
7185
7251
|
end
|
7186
7252
|
|
7187
|
-
# def deconstruct: () -> Array[
|
7253
|
+
# def deconstruct: () -> Array[Node?]
|
7188
7254
|
alias deconstruct child_nodes
|
7189
7255
|
|
7190
7256
|
# 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 +7417,7 @@ module Prism
|
|
7351
7417
|
visitor.visit_forwarding_arguments_node(self)
|
7352
7418
|
end
|
7353
7419
|
|
7354
|
-
# def child_nodes: () -> Array[
|
7420
|
+
# def child_nodes: () -> Array[Node?]
|
7355
7421
|
def child_nodes
|
7356
7422
|
[]
|
7357
7423
|
end
|
@@ -7371,7 +7437,7 @@ module Prism
|
|
7371
7437
|
ForwardingArgumentsNode.new(source, node_id, location, flags)
|
7372
7438
|
end
|
7373
7439
|
|
7374
|
-
# def deconstruct: () -> Array[
|
7440
|
+
# def deconstruct: () -> Array[Node?]
|
7375
7441
|
alias deconstruct child_nodes
|
7376
7442
|
|
7377
7443
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
@@ -7420,7 +7486,7 @@ module Prism
|
|
7420
7486
|
visitor.visit_forwarding_parameter_node(self)
|
7421
7487
|
end
|
7422
7488
|
|
7423
|
-
# def child_nodes: () -> Array[
|
7489
|
+
# def child_nodes: () -> Array[Node?]
|
7424
7490
|
def child_nodes
|
7425
7491
|
[]
|
7426
7492
|
end
|
@@ -7440,7 +7506,7 @@ module Prism
|
|
7440
7506
|
ForwardingParameterNode.new(source, node_id, location, flags)
|
7441
7507
|
end
|
7442
7508
|
|
7443
|
-
# def deconstruct: () -> Array[
|
7509
|
+
# def deconstruct: () -> Array[Node?]
|
7444
7510
|
alias deconstruct child_nodes
|
7445
7511
|
|
7446
7512
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
@@ -7489,7 +7555,7 @@ module Prism
|
|
7489
7555
|
visitor.visit_forwarding_super_node(self)
|
7490
7556
|
end
|
7491
7557
|
|
7492
|
-
# def child_nodes: () -> Array[
|
7558
|
+
# def child_nodes: () -> Array[Node?]
|
7493
7559
|
def child_nodes
|
7494
7560
|
[block]
|
7495
7561
|
end
|
@@ -7511,7 +7577,7 @@ module Prism
|
|
7511
7577
|
ForwardingSuperNode.new(source, node_id, location, flags, block)
|
7512
7578
|
end
|
7513
7579
|
|
7514
|
-
# def deconstruct: () -> Array[
|
7580
|
+
# def deconstruct: () -> Array[Node?]
|
7515
7581
|
alias deconstruct child_nodes
|
7516
7582
|
|
7517
7583
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, block: BlockNode? }
|
@@ -7567,7 +7633,7 @@ module Prism
|
|
7567
7633
|
visitor.visit_global_variable_and_write_node(self)
|
7568
7634
|
end
|
7569
7635
|
|
7570
|
-
# def child_nodes: () -> Array[
|
7636
|
+
# def child_nodes: () -> Array[Node?]
|
7571
7637
|
def child_nodes
|
7572
7638
|
[value]
|
7573
7639
|
end
|
@@ -7587,7 +7653,7 @@ module Prism
|
|
7587
7653
|
GlobalVariableAndWriteNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
7588
7654
|
end
|
7589
7655
|
|
7590
|
-
# def deconstruct: () -> Array[
|
7656
|
+
# def deconstruct: () -> Array[Node?]
|
7591
7657
|
alias deconstruct child_nodes
|
7592
7658
|
|
7593
7659
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
@@ -7681,7 +7747,7 @@ module Prism
|
|
7681
7747
|
visitor.visit_global_variable_operator_write_node(self)
|
7682
7748
|
end
|
7683
7749
|
|
7684
|
-
# def child_nodes: () -> Array[
|
7750
|
+
# def child_nodes: () -> Array[Node?]
|
7685
7751
|
def child_nodes
|
7686
7752
|
[value]
|
7687
7753
|
end
|
@@ -7701,7 +7767,7 @@ module Prism
|
|
7701
7767
|
GlobalVariableOperatorWriteNode.new(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator)
|
7702
7768
|
end
|
7703
7769
|
|
7704
|
-
# def deconstruct: () -> Array[
|
7770
|
+
# def deconstruct: () -> Array[Node?]
|
7705
7771
|
alias deconstruct child_nodes
|
7706
7772
|
|
7707
7773
|
# 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 +7859,7 @@ module Prism
|
|
7793
7859
|
visitor.visit_global_variable_or_write_node(self)
|
7794
7860
|
end
|
7795
7861
|
|
7796
|
-
# def child_nodes: () -> Array[
|
7862
|
+
# def child_nodes: () -> Array[Node?]
|
7797
7863
|
def child_nodes
|
7798
7864
|
[value]
|
7799
7865
|
end
|
@@ -7813,7 +7879,7 @@ module Prism
|
|
7813
7879
|
GlobalVariableOrWriteNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
7814
7880
|
end
|
7815
7881
|
|
7816
|
-
# def deconstruct: () -> Array[
|
7882
|
+
# def deconstruct: () -> Array[Node?]
|
7817
7883
|
alias deconstruct child_nodes
|
7818
7884
|
|
7819
7885
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
@@ -7903,7 +7969,7 @@ module Prism
|
|
7903
7969
|
visitor.visit_global_variable_read_node(self)
|
7904
7970
|
end
|
7905
7971
|
|
7906
|
-
# def child_nodes: () -> Array[
|
7972
|
+
# def child_nodes: () -> Array[Node?]
|
7907
7973
|
def child_nodes
|
7908
7974
|
[]
|
7909
7975
|
end
|
@@ -7923,7 +7989,7 @@ module Prism
|
|
7923
7989
|
GlobalVariableReadNode.new(source, node_id, location, flags, name)
|
7924
7990
|
end
|
7925
7991
|
|
7926
|
-
# def deconstruct: () -> Array[
|
7992
|
+
# def deconstruct: () -> Array[Node?]
|
7927
7993
|
alias deconstruct child_nodes
|
7928
7994
|
|
7929
7995
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
@@ -7980,7 +8046,7 @@ module Prism
|
|
7980
8046
|
visitor.visit_global_variable_target_node(self)
|
7981
8047
|
end
|
7982
8048
|
|
7983
|
-
# def child_nodes: () -> Array[
|
8049
|
+
# def child_nodes: () -> Array[Node?]
|
7984
8050
|
def child_nodes
|
7985
8051
|
[]
|
7986
8052
|
end
|
@@ -8000,7 +8066,7 @@ module Prism
|
|
8000
8066
|
GlobalVariableTargetNode.new(source, node_id, location, flags, name)
|
8001
8067
|
end
|
8002
8068
|
|
8003
|
-
# def deconstruct: () -> Array[
|
8069
|
+
# def deconstruct: () -> Array[Node?]
|
8004
8070
|
alias deconstruct child_nodes
|
8005
8071
|
|
8006
8072
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
@@ -8056,7 +8122,7 @@ module Prism
|
|
8056
8122
|
visitor.visit_global_variable_write_node(self)
|
8057
8123
|
end
|
8058
8124
|
|
8059
|
-
# def child_nodes: () -> Array[
|
8125
|
+
# def child_nodes: () -> Array[Node?]
|
8060
8126
|
def child_nodes
|
8061
8127
|
[value]
|
8062
8128
|
end
|
@@ -8076,7 +8142,7 @@ module Prism
|
|
8076
8142
|
GlobalVariableWriteNode.new(source, node_id, location, flags, name, name_loc, value, operator_loc)
|
8077
8143
|
end
|
8078
8144
|
|
8079
|
-
# def deconstruct: () -> Array[
|
8145
|
+
# def deconstruct: () -> Array[Node?]
|
8080
8146
|
alias deconstruct child_nodes
|
8081
8147
|
|
8082
8148
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location }
|
@@ -8184,7 +8250,7 @@ module Prism
|
|
8184
8250
|
visitor.visit_hash_node(self)
|
8185
8251
|
end
|
8186
8252
|
|
8187
|
-
# def child_nodes: () -> Array[
|
8253
|
+
# def child_nodes: () -> Array[Node?]
|
8188
8254
|
def child_nodes
|
8189
8255
|
[*elements]
|
8190
8256
|
end
|
@@ -8204,7 +8270,7 @@ module Prism
|
|
8204
8270
|
HashNode.new(source, node_id, location, flags, opening_loc, elements, closing_loc)
|
8205
8271
|
end
|
8206
8272
|
|
8207
|
-
# def deconstruct: () -> Array[
|
8273
|
+
# def deconstruct: () -> Array[Node?]
|
8208
8274
|
alias deconstruct child_nodes
|
8209
8275
|
|
8210
8276
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location }
|
@@ -8296,6 +8362,12 @@ module Prism
|
|
8296
8362
|
#
|
8297
8363
|
# foo => { a: 1, b: 2, **c }
|
8298
8364
|
# ^^^^^^^^^^^^^^^^^^^
|
8365
|
+
#
|
8366
|
+
# foo => Bar[a: 1, b: 2]
|
8367
|
+
# ^^^^^^^^^^^^^^^
|
8368
|
+
#
|
8369
|
+
# foo in { a: 1, b: 2 }
|
8370
|
+
# ^^^^^^^^^^^^^^
|
8299
8371
|
class HashPatternNode < Node
|
8300
8372
|
# Initialize a new HashPatternNode node.
|
8301
8373
|
def initialize(source, node_id, location, flags, constant, elements, rest, opening_loc, closing_loc)
|
@@ -8315,7 +8387,7 @@ module Prism
|
|
8315
8387
|
visitor.visit_hash_pattern_node(self)
|
8316
8388
|
end
|
8317
8389
|
|
8318
|
-
# def child_nodes: () -> Array[
|
8390
|
+
# def child_nodes: () -> Array[Node?]
|
8319
8391
|
def child_nodes
|
8320
8392
|
[constant, *elements, rest]
|
8321
8393
|
end
|
@@ -8334,29 +8406,53 @@ module Prism
|
|
8334
8406
|
[*constant, *elements, *rest, *opening_loc, *closing_loc] #: Array[Prism::node | Location]
|
8335
8407
|
end
|
8336
8408
|
|
8337
|
-
# def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant:
|
8409
|
+
# 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
8410
|
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
8411
|
HashPatternNode.new(source, node_id, location, flags, constant, elements, rest, opening_loc, closing_loc)
|
8340
8412
|
end
|
8341
8413
|
|
8342
|
-
# def deconstruct: () -> Array[
|
8414
|
+
# def deconstruct: () -> Array[Node?]
|
8343
8415
|
alias deconstruct child_nodes
|
8344
8416
|
|
8345
|
-
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant:
|
8417
|
+
# 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
8418
|
def deconstruct_keys(keys)
|
8347
8419
|
{ node_id: node_id, location: location, constant: constant, elements: elements, rest: rest, opening_loc: opening_loc, closing_loc: closing_loc }
|
8348
8420
|
end
|
8349
8421
|
|
8350
|
-
#
|
8422
|
+
# Represents the optional constant preceding the Hash.
|
8423
|
+
#
|
8424
|
+
# foo => Bar[a: 1, b: 2]
|
8425
|
+
# ^^^
|
8426
|
+
#
|
8427
|
+
# foo => Bar::Baz[a: 1, b: 2]
|
8428
|
+
# ^^^^^^^^
|
8351
8429
|
attr_reader :constant
|
8352
8430
|
|
8353
|
-
#
|
8431
|
+
# Represents the explicit named hash keys and values.
|
8432
|
+
#
|
8433
|
+
# foo => { a: 1, b:, ** }
|
8434
|
+
# ^^^^^^^^
|
8354
8435
|
attr_reader :elements
|
8355
8436
|
|
8356
|
-
#
|
8437
|
+
# 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`.
|
8438
|
+
#
|
8439
|
+
# foo => { a: 1, b:, **c }
|
8440
|
+
# ^^^
|
8441
|
+
#
|
8442
|
+
# foo => { a: 1, b:, ** }
|
8443
|
+
# ^^
|
8444
|
+
#
|
8445
|
+
# foo => { a: 1, b:, **nil }
|
8446
|
+
# ^^^^^
|
8357
8447
|
attr_reader :rest
|
8358
8448
|
|
8359
|
-
#
|
8449
|
+
# The location of the opening brace.
|
8450
|
+
#
|
8451
|
+
# foo => { a: 1 }
|
8452
|
+
# ^
|
8453
|
+
#
|
8454
|
+
# foo => Bar[a: 1]
|
8455
|
+
# ^
|
8360
8456
|
def opening_loc
|
8361
8457
|
location = @opening_loc
|
8362
8458
|
case location
|
@@ -8375,7 +8471,13 @@ module Prism
|
|
8375
8471
|
repository.enter(node_id, :opening_loc) unless @opening_loc.nil?
|
8376
8472
|
end
|
8377
8473
|
|
8378
|
-
#
|
8474
|
+
# The location of the closing brace.
|
8475
|
+
#
|
8476
|
+
# foo => { a: 1 }
|
8477
|
+
# ^
|
8478
|
+
#
|
8479
|
+
# foo => Bar[a: 1]
|
8480
|
+
# ^
|
8379
8481
|
def closing_loc
|
8380
8482
|
location = @closing_loc
|
8381
8483
|
case location
|
@@ -8462,7 +8564,7 @@ module Prism
|
|
8462
8564
|
visitor.visit_if_node(self)
|
8463
8565
|
end
|
8464
8566
|
|
8465
|
-
# def child_nodes: () -> Array[
|
8567
|
+
# def child_nodes: () -> Array[Node?]
|
8466
8568
|
def child_nodes
|
8467
8569
|
[predicate, statements, subsequent]
|
8468
8570
|
end
|
@@ -8486,7 +8588,7 @@ module Prism
|
|
8486
8588
|
IfNode.new(source, node_id, location, flags, if_keyword_loc, predicate, then_keyword_loc, statements, subsequent, end_keyword_loc)
|
8487
8589
|
end
|
8488
8590
|
|
8489
|
-
# def deconstruct: () -> Array[
|
8591
|
+
# def deconstruct: () -> Array[Node?]
|
8490
8592
|
alias deconstruct child_nodes
|
8491
8593
|
|
8492
8594
|
# 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 +8770,7 @@ module Prism
|
|
8668
8770
|
visitor.visit_imaginary_node(self)
|
8669
8771
|
end
|
8670
8772
|
|
8671
|
-
# def child_nodes: () -> Array[
|
8773
|
+
# def child_nodes: () -> Array[Node?]
|
8672
8774
|
def child_nodes
|
8673
8775
|
[numeric]
|
8674
8776
|
end
|
@@ -8688,7 +8790,7 @@ module Prism
|
|
8688
8790
|
ImaginaryNode.new(source, node_id, location, flags, numeric)
|
8689
8791
|
end
|
8690
8792
|
|
8691
|
-
# def deconstruct: () -> Array[
|
8793
|
+
# def deconstruct: () -> Array[Node?]
|
8692
8794
|
alias deconstruct child_nodes
|
8693
8795
|
|
8694
8796
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numeric: FloatNode | IntegerNode | RationalNode }
|
@@ -8747,7 +8849,7 @@ module Prism
|
|
8747
8849
|
visitor.visit_implicit_node(self)
|
8748
8850
|
end
|
8749
8851
|
|
8750
|
-
# def child_nodes: () -> Array[
|
8852
|
+
# def child_nodes: () -> Array[Node?]
|
8751
8853
|
def child_nodes
|
8752
8854
|
[value]
|
8753
8855
|
end
|
@@ -8767,7 +8869,7 @@ module Prism
|
|
8767
8869
|
ImplicitNode.new(source, node_id, location, flags, value)
|
8768
8870
|
end
|
8769
8871
|
|
8770
|
-
# def deconstruct: () -> Array[
|
8872
|
+
# def deconstruct: () -> Array[Node?]
|
8771
8873
|
alias deconstruct child_nodes
|
8772
8874
|
|
8773
8875
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode }
|
@@ -8828,7 +8930,7 @@ module Prism
|
|
8828
8930
|
visitor.visit_implicit_rest_node(self)
|
8829
8931
|
end
|
8830
8932
|
|
8831
|
-
# def child_nodes: () -> Array[
|
8933
|
+
# def child_nodes: () -> Array[Node?]
|
8832
8934
|
def child_nodes
|
8833
8935
|
[]
|
8834
8936
|
end
|
@@ -8848,7 +8950,7 @@ module Prism
|
|
8848
8950
|
ImplicitRestNode.new(source, node_id, location, flags)
|
8849
8951
|
end
|
8850
8952
|
|
8851
|
-
# def deconstruct: () -> Array[
|
8953
|
+
# def deconstruct: () -> Array[Node?]
|
8852
8954
|
alias deconstruct child_nodes
|
8853
8955
|
|
8854
8956
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
@@ -8900,7 +9002,7 @@ module Prism
|
|
8900
9002
|
visitor.visit_in_node(self)
|
8901
9003
|
end
|
8902
9004
|
|
8903
|
-
# def child_nodes: () -> Array[
|
9005
|
+
# def child_nodes: () -> Array[Node?]
|
8904
9006
|
def child_nodes
|
8905
9007
|
[pattern, statements]
|
8906
9008
|
end
|
@@ -8923,7 +9025,7 @@ module Prism
|
|
8923
9025
|
InNode.new(source, node_id, location, flags, pattern, statements, in_loc, then_loc)
|
8924
9026
|
end
|
8925
9027
|
|
8926
|
-
# def deconstruct: () -> Array[
|
9028
|
+
# def deconstruct: () -> Array[Node?]
|
8927
9029
|
alias deconstruct child_nodes
|
8928
9030
|
|
8929
9031
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location? }
|
@@ -9031,7 +9133,7 @@ module Prism
|
|
9031
9133
|
visitor.visit_index_and_write_node(self)
|
9032
9134
|
end
|
9033
9135
|
|
9034
|
-
# def child_nodes: () -> Array[
|
9136
|
+
# def child_nodes: () -> Array[Node?]
|
9035
9137
|
def child_nodes
|
9036
9138
|
[receiver, arguments, block, value]
|
9037
9139
|
end
|
@@ -9056,7 +9158,7 @@ module Prism
|
|
9056
9158
|
IndexAndWriteNode.new(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value)
|
9057
9159
|
end
|
9058
9160
|
|
9059
|
-
# def deconstruct: () -> Array[
|
9161
|
+
# def deconstruct: () -> Array[Node?]
|
9060
9162
|
alias deconstruct child_nodes
|
9061
9163
|
|
9062
9164
|
# 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 +9334,7 @@ module Prism
|
|
9232
9334
|
visitor.visit_index_operator_write_node(self)
|
9233
9335
|
end
|
9234
9336
|
|
9235
|
-
# def child_nodes: () -> Array[
|
9337
|
+
# def child_nodes: () -> Array[Node?]
|
9236
9338
|
def child_nodes
|
9237
9339
|
[receiver, arguments, block, value]
|
9238
9340
|
end
|
@@ -9257,7 +9359,7 @@ module Prism
|
|
9257
9359
|
IndexOperatorWriteNode.new(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value)
|
9258
9360
|
end
|
9259
9361
|
|
9260
|
-
# def deconstruct: () -> Array[
|
9362
|
+
# def deconstruct: () -> Array[Node?]
|
9261
9363
|
alias deconstruct child_nodes
|
9262
9364
|
|
9263
9365
|
# 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 +9533,7 @@ module Prism
|
|
9431
9533
|
visitor.visit_index_or_write_node(self)
|
9432
9534
|
end
|
9433
9535
|
|
9434
|
-
# def child_nodes: () -> Array[
|
9536
|
+
# def child_nodes: () -> Array[Node?]
|
9435
9537
|
def child_nodes
|
9436
9538
|
[receiver, arguments, block, value]
|
9437
9539
|
end
|
@@ -9456,7 +9558,7 @@ module Prism
|
|
9456
9558
|
IndexOrWriteNode.new(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value)
|
9457
9559
|
end
|
9458
9560
|
|
9459
|
-
# def deconstruct: () -> Array[
|
9561
|
+
# def deconstruct: () -> Array[Node?]
|
9460
9562
|
alias deconstruct child_nodes
|
9461
9563
|
|
9462
9564
|
# 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 +9738,7 @@ module Prism
|
|
9636
9738
|
visitor.visit_index_target_node(self)
|
9637
9739
|
end
|
9638
9740
|
|
9639
|
-
# def child_nodes: () -> Array[
|
9741
|
+
# def child_nodes: () -> Array[Node?]
|
9640
9742
|
def child_nodes
|
9641
9743
|
[receiver, arguments, block]
|
9642
9744
|
end
|
@@ -9660,7 +9762,7 @@ module Prism
|
|
9660
9762
|
IndexTargetNode.new(source, node_id, location, flags, receiver, opening_loc, arguments, closing_loc, block)
|
9661
9763
|
end
|
9662
9764
|
|
9663
|
-
# def deconstruct: () -> Array[
|
9765
|
+
# def deconstruct: () -> Array[Node?]
|
9664
9766
|
alias deconstruct child_nodes
|
9665
9767
|
|
9666
9768
|
# 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 +9885,7 @@ module Prism
|
|
9783
9885
|
visitor.visit_instance_variable_and_write_node(self)
|
9784
9886
|
end
|
9785
9887
|
|
9786
|
-
# def child_nodes: () -> Array[
|
9888
|
+
# def child_nodes: () -> Array[Node?]
|
9787
9889
|
def child_nodes
|
9788
9890
|
[value]
|
9789
9891
|
end
|
@@ -9803,7 +9905,7 @@ module Prism
|
|
9803
9905
|
InstanceVariableAndWriteNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
9804
9906
|
end
|
9805
9907
|
|
9806
|
-
# def deconstruct: () -> Array[
|
9908
|
+
# def deconstruct: () -> Array[Node?]
|
9807
9909
|
alias deconstruct child_nodes
|
9808
9910
|
|
9809
9911
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
@@ -9897,7 +9999,7 @@ module Prism
|
|
9897
9999
|
visitor.visit_instance_variable_operator_write_node(self)
|
9898
10000
|
end
|
9899
10001
|
|
9900
|
-
# def child_nodes: () -> Array[
|
10002
|
+
# def child_nodes: () -> Array[Node?]
|
9901
10003
|
def child_nodes
|
9902
10004
|
[value]
|
9903
10005
|
end
|
@@ -9917,7 +10019,7 @@ module Prism
|
|
9917
10019
|
InstanceVariableOperatorWriteNode.new(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator)
|
9918
10020
|
end
|
9919
10021
|
|
9920
|
-
# def deconstruct: () -> Array[
|
10022
|
+
# def deconstruct: () -> Array[Node?]
|
9921
10023
|
alias deconstruct child_nodes
|
9922
10024
|
|
9923
10025
|
# 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 +10111,7 @@ module Prism
|
|
10009
10111
|
visitor.visit_instance_variable_or_write_node(self)
|
10010
10112
|
end
|
10011
10113
|
|
10012
|
-
# def child_nodes: () -> Array[
|
10114
|
+
# def child_nodes: () -> Array[Node?]
|
10013
10115
|
def child_nodes
|
10014
10116
|
[value]
|
10015
10117
|
end
|
@@ -10029,7 +10131,7 @@ module Prism
|
|
10029
10131
|
InstanceVariableOrWriteNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
10030
10132
|
end
|
10031
10133
|
|
10032
|
-
# def deconstruct: () -> Array[
|
10134
|
+
# def deconstruct: () -> Array[Node?]
|
10033
10135
|
alias deconstruct child_nodes
|
10034
10136
|
|
10035
10137
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
@@ -10119,7 +10221,7 @@ module Prism
|
|
10119
10221
|
visitor.visit_instance_variable_read_node(self)
|
10120
10222
|
end
|
10121
10223
|
|
10122
|
-
# def child_nodes: () -> Array[
|
10224
|
+
# def child_nodes: () -> Array[Node?]
|
10123
10225
|
def child_nodes
|
10124
10226
|
[]
|
10125
10227
|
end
|
@@ -10139,7 +10241,7 @@ module Prism
|
|
10139
10241
|
InstanceVariableReadNode.new(source, node_id, location, flags, name)
|
10140
10242
|
end
|
10141
10243
|
|
10142
|
-
# def deconstruct: () -> Array[
|
10244
|
+
# def deconstruct: () -> Array[Node?]
|
10143
10245
|
alias deconstruct child_nodes
|
10144
10246
|
|
10145
10247
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
@@ -10196,7 +10298,7 @@ module Prism
|
|
10196
10298
|
visitor.visit_instance_variable_target_node(self)
|
10197
10299
|
end
|
10198
10300
|
|
10199
|
-
# def child_nodes: () -> Array[
|
10301
|
+
# def child_nodes: () -> Array[Node?]
|
10200
10302
|
def child_nodes
|
10201
10303
|
[]
|
10202
10304
|
end
|
@@ -10216,7 +10318,7 @@ module Prism
|
|
10216
10318
|
InstanceVariableTargetNode.new(source, node_id, location, flags, name)
|
10217
10319
|
end
|
10218
10320
|
|
10219
|
-
# def deconstruct: () -> Array[
|
10321
|
+
# def deconstruct: () -> Array[Node?]
|
10220
10322
|
alias deconstruct child_nodes
|
10221
10323
|
|
10222
10324
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
@@ -10272,7 +10374,7 @@ module Prism
|
|
10272
10374
|
visitor.visit_instance_variable_write_node(self)
|
10273
10375
|
end
|
10274
10376
|
|
10275
|
-
# def child_nodes: () -> Array[
|
10377
|
+
# def child_nodes: () -> Array[Node?]
|
10276
10378
|
def child_nodes
|
10277
10379
|
[value]
|
10278
10380
|
end
|
@@ -10292,7 +10394,7 @@ module Prism
|
|
10292
10394
|
InstanceVariableWriteNode.new(source, node_id, location, flags, name, name_loc, value, operator_loc)
|
10293
10395
|
end
|
10294
10396
|
|
10295
|
-
# def deconstruct: () -> Array[
|
10397
|
+
# def deconstruct: () -> Array[Node?]
|
10296
10398
|
alias deconstruct child_nodes
|
10297
10399
|
|
10298
10400
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location }
|
@@ -10398,7 +10500,7 @@ module Prism
|
|
10398
10500
|
visitor.visit_integer_node(self)
|
10399
10501
|
end
|
10400
10502
|
|
10401
|
-
# def child_nodes: () -> Array[
|
10503
|
+
# def child_nodes: () -> Array[Node?]
|
10402
10504
|
def child_nodes
|
10403
10505
|
[]
|
10404
10506
|
end
|
@@ -10418,7 +10520,7 @@ module Prism
|
|
10418
10520
|
IntegerNode.new(source, node_id, location, flags, value)
|
10419
10521
|
end
|
10420
10522
|
|
10421
|
-
# def deconstruct: () -> Array[
|
10523
|
+
# def deconstruct: () -> Array[Node?]
|
10422
10524
|
alias deconstruct child_nodes
|
10423
10525
|
|
10424
10526
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Integer }
|
@@ -10494,7 +10596,7 @@ module Prism
|
|
10494
10596
|
visitor.visit_interpolated_match_last_line_node(self)
|
10495
10597
|
end
|
10496
10598
|
|
10497
|
-
# def child_nodes: () -> Array[
|
10599
|
+
# def child_nodes: () -> Array[Node?]
|
10498
10600
|
def child_nodes
|
10499
10601
|
[*parts]
|
10500
10602
|
end
|
@@ -10514,7 +10616,7 @@ module Prism
|
|
10514
10616
|
InterpolatedMatchLastLineNode.new(source, node_id, location, flags, opening_loc, parts, closing_loc)
|
10515
10617
|
end
|
10516
10618
|
|
10517
|
-
# def deconstruct: () -> Array[
|
10619
|
+
# def deconstruct: () -> Array[Node?]
|
10518
10620
|
alias deconstruct child_nodes
|
10519
10621
|
|
10520
10622
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location }
|
@@ -10664,7 +10766,7 @@ module Prism
|
|
10664
10766
|
visitor.visit_interpolated_regular_expression_node(self)
|
10665
10767
|
end
|
10666
10768
|
|
10667
|
-
# def child_nodes: () -> Array[
|
10769
|
+
# def child_nodes: () -> Array[Node?]
|
10668
10770
|
def child_nodes
|
10669
10771
|
[*parts]
|
10670
10772
|
end
|
@@ -10684,7 +10786,7 @@ module Prism
|
|
10684
10786
|
InterpolatedRegularExpressionNode.new(source, node_id, location, flags, opening_loc, parts, closing_loc)
|
10685
10787
|
end
|
10686
10788
|
|
10687
|
-
# def deconstruct: () -> Array[
|
10789
|
+
# def deconstruct: () -> Array[Node?]
|
10688
10790
|
alias deconstruct child_nodes
|
10689
10791
|
|
10690
10792
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location }
|
@@ -10834,7 +10936,7 @@ module Prism
|
|
10834
10936
|
visitor.visit_interpolated_string_node(self)
|
10835
10937
|
end
|
10836
10938
|
|
10837
|
-
# def child_nodes: () -> Array[
|
10939
|
+
# def child_nodes: () -> Array[Node?]
|
10838
10940
|
def child_nodes
|
10839
10941
|
[*parts]
|
10840
10942
|
end
|
@@ -10849,15 +10951,15 @@ module Prism
|
|
10849
10951
|
[*opening_loc, *parts, *closing_loc] #: Array[Prism::node | Location]
|
10850
10952
|
end
|
10851
10953
|
|
10852
|
-
# def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], ?closing_loc: Location?) -> InterpolatedStringNode
|
10954
|
+
# def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode], ?closing_loc: Location?) -> InterpolatedStringNode
|
10853
10955
|
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
10956
|
InterpolatedStringNode.new(source, node_id, location, flags, opening_loc, parts, closing_loc)
|
10855
10957
|
end
|
10856
10958
|
|
10857
|
-
# def deconstruct: () -> Array[
|
10959
|
+
# def deconstruct: () -> Array[Node?]
|
10858
10960
|
alias deconstruct child_nodes
|
10859
10961
|
|
10860
|
-
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], closing_loc: Location? }
|
10962
|
+
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode], closing_loc: Location? }
|
10861
10963
|
def deconstruct_keys(keys)
|
10862
10964
|
{ node_id: node_id, location: location, opening_loc: opening_loc, parts: parts, closing_loc: closing_loc }
|
10863
10965
|
end
|
@@ -10891,7 +10993,7 @@ module Prism
|
|
10891
10993
|
repository.enter(node_id, :opening_loc) unless @opening_loc.nil?
|
10892
10994
|
end
|
10893
10995
|
|
10894
|
-
# attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode]
|
10996
|
+
# attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode]
|
10895
10997
|
attr_reader :parts
|
10896
10998
|
|
10897
10999
|
# attr_reader closing_loc: Location?
|
@@ -10971,7 +11073,7 @@ module Prism
|
|
10971
11073
|
visitor.visit_interpolated_symbol_node(self)
|
10972
11074
|
end
|
10973
11075
|
|
10974
|
-
# def child_nodes: () -> Array[
|
11076
|
+
# def child_nodes: () -> Array[Node?]
|
10975
11077
|
def child_nodes
|
10976
11078
|
[*parts]
|
10977
11079
|
end
|
@@ -10991,7 +11093,7 @@ module Prism
|
|
10991
11093
|
InterpolatedSymbolNode.new(source, node_id, location, flags, opening_loc, parts, closing_loc)
|
10992
11094
|
end
|
10993
11095
|
|
10994
|
-
# def deconstruct: () -> Array[
|
11096
|
+
# def deconstruct: () -> Array[Node?]
|
10995
11097
|
alias deconstruct child_nodes
|
10996
11098
|
|
10997
11099
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location? }
|
@@ -11097,7 +11199,7 @@ module Prism
|
|
11097
11199
|
visitor.visit_interpolated_x_string_node(self)
|
11098
11200
|
end
|
11099
11201
|
|
11100
|
-
# def child_nodes: () -> Array[
|
11202
|
+
# def child_nodes: () -> Array[Node?]
|
11101
11203
|
def child_nodes
|
11102
11204
|
[*parts]
|
11103
11205
|
end
|
@@ -11117,7 +11219,7 @@ module Prism
|
|
11117
11219
|
InterpolatedXStringNode.new(source, node_id, location, flags, opening_loc, parts, closing_loc)
|
11118
11220
|
end
|
11119
11221
|
|
11120
|
-
# def deconstruct: () -> Array[
|
11222
|
+
# def deconstruct: () -> Array[Node?]
|
11121
11223
|
alias deconstruct child_nodes
|
11122
11224
|
|
11123
11225
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location }
|
@@ -11208,7 +11310,7 @@ module Prism
|
|
11208
11310
|
visitor.visit_it_local_variable_read_node(self)
|
11209
11311
|
end
|
11210
11312
|
|
11211
|
-
# def child_nodes: () -> Array[
|
11313
|
+
# def child_nodes: () -> Array[Node?]
|
11212
11314
|
def child_nodes
|
11213
11315
|
[]
|
11214
11316
|
end
|
@@ -11228,7 +11330,7 @@ module Prism
|
|
11228
11330
|
ItLocalVariableReadNode.new(source, node_id, location, flags)
|
11229
11331
|
end
|
11230
11332
|
|
11231
|
-
# def deconstruct: () -> Array[
|
11333
|
+
# def deconstruct: () -> Array[Node?]
|
11232
11334
|
alias deconstruct child_nodes
|
11233
11335
|
|
11234
11336
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
@@ -11276,7 +11378,7 @@ module Prism
|
|
11276
11378
|
visitor.visit_it_parameters_node(self)
|
11277
11379
|
end
|
11278
11380
|
|
11279
|
-
# def child_nodes: () -> Array[
|
11381
|
+
# def child_nodes: () -> Array[Node?]
|
11280
11382
|
def child_nodes
|
11281
11383
|
[]
|
11282
11384
|
end
|
@@ -11296,7 +11398,7 @@ module Prism
|
|
11296
11398
|
ItParametersNode.new(source, node_id, location, flags)
|
11297
11399
|
end
|
11298
11400
|
|
11299
|
-
# def deconstruct: () -> Array[
|
11401
|
+
# def deconstruct: () -> Array[Node?]
|
11300
11402
|
alias deconstruct child_nodes
|
11301
11403
|
|
11302
11404
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
@@ -11345,7 +11447,7 @@ module Prism
|
|
11345
11447
|
visitor.visit_keyword_hash_node(self)
|
11346
11448
|
end
|
11347
11449
|
|
11348
|
-
# def child_nodes: () -> Array[
|
11450
|
+
# def child_nodes: () -> Array[Node?]
|
11349
11451
|
def child_nodes
|
11350
11452
|
[*elements]
|
11351
11453
|
end
|
@@ -11365,7 +11467,7 @@ module Prism
|
|
11365
11467
|
KeywordHashNode.new(source, node_id, location, flags, elements)
|
11366
11468
|
end
|
11367
11469
|
|
11368
|
-
# def deconstruct: () -> Array[
|
11470
|
+
# def deconstruct: () -> Array[Node?]
|
11369
11471
|
alias deconstruct child_nodes
|
11370
11472
|
|
11371
11473
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[AssocNode | AssocSplatNode] }
|
@@ -11428,7 +11530,7 @@ module Prism
|
|
11428
11530
|
visitor.visit_keyword_rest_parameter_node(self)
|
11429
11531
|
end
|
11430
11532
|
|
11431
|
-
# def child_nodes: () -> Array[
|
11533
|
+
# def child_nodes: () -> Array[Node?]
|
11432
11534
|
def child_nodes
|
11433
11535
|
[]
|
11434
11536
|
end
|
@@ -11448,7 +11550,7 @@ module Prism
|
|
11448
11550
|
KeywordRestParameterNode.new(source, node_id, location, flags, name, name_loc, operator_loc)
|
11449
11551
|
end
|
11450
11552
|
|
11451
|
-
# def deconstruct: () -> Array[
|
11553
|
+
# def deconstruct: () -> Array[Node?]
|
11452
11554
|
alias deconstruct child_nodes
|
11453
11555
|
|
11454
11556
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location }
|
@@ -11551,7 +11653,7 @@ module Prism
|
|
11551
11653
|
visitor.visit_lambda_node(self)
|
11552
11654
|
end
|
11553
11655
|
|
11554
|
-
# def child_nodes: () -> Array[
|
11656
|
+
# def child_nodes: () -> Array[Node?]
|
11555
11657
|
def child_nodes
|
11556
11658
|
[parameters, body]
|
11557
11659
|
end
|
@@ -11574,7 +11676,7 @@ module Prism
|
|
11574
11676
|
LambdaNode.new(source, node_id, location, flags, locals, operator_loc, opening_loc, closing_loc, parameters, body)
|
11575
11677
|
end
|
11576
11678
|
|
11577
|
-
# def deconstruct: () -> Array[
|
11679
|
+
# def deconstruct: () -> Array[Node?]
|
11578
11680
|
alias deconstruct child_nodes
|
11579
11681
|
|
11580
11682
|
# 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 +11799,7 @@ module Prism
|
|
11697
11799
|
visitor.visit_local_variable_and_write_node(self)
|
11698
11800
|
end
|
11699
11801
|
|
11700
|
-
# def child_nodes: () -> Array[
|
11802
|
+
# def child_nodes: () -> Array[Node?]
|
11701
11803
|
def child_nodes
|
11702
11804
|
[value]
|
11703
11805
|
end
|
@@ -11717,7 +11819,7 @@ module Prism
|
|
11717
11819
|
LocalVariableAndWriteNode.new(source, node_id, location, flags, name_loc, operator_loc, value, name, depth)
|
11718
11820
|
end
|
11719
11821
|
|
11720
|
-
# def deconstruct: () -> Array[
|
11822
|
+
# def deconstruct: () -> Array[Node?]
|
11721
11823
|
alias deconstruct child_nodes
|
11722
11824
|
|
11723
11825
|
# 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 +11918,7 @@ module Prism
|
|
11816
11918
|
visitor.visit_local_variable_operator_write_node(self)
|
11817
11919
|
end
|
11818
11920
|
|
11819
|
-
# def child_nodes: () -> Array[
|
11921
|
+
# def child_nodes: () -> Array[Node?]
|
11820
11922
|
def child_nodes
|
11821
11923
|
[value]
|
11822
11924
|
end
|
@@ -11836,7 +11938,7 @@ module Prism
|
|
11836
11938
|
LocalVariableOperatorWriteNode.new(source, node_id, location, flags, name_loc, binary_operator_loc, value, name, binary_operator, depth)
|
11837
11939
|
end
|
11838
11940
|
|
11839
|
-
# def deconstruct: () -> Array[
|
11941
|
+
# def deconstruct: () -> Array[Node?]
|
11840
11942
|
alias deconstruct child_nodes
|
11841
11943
|
|
11842
11944
|
# 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 +12035,7 @@ module Prism
|
|
11933
12035
|
visitor.visit_local_variable_or_write_node(self)
|
11934
12036
|
end
|
11935
12037
|
|
11936
|
-
# def child_nodes: () -> Array[
|
12038
|
+
# def child_nodes: () -> Array[Node?]
|
11937
12039
|
def child_nodes
|
11938
12040
|
[value]
|
11939
12041
|
end
|
@@ -11953,7 +12055,7 @@ module Prism
|
|
11953
12055
|
LocalVariableOrWriteNode.new(source, node_id, location, flags, name_loc, operator_loc, value, name, depth)
|
11954
12056
|
end
|
11955
12057
|
|
11956
|
-
# def deconstruct: () -> Array[
|
12058
|
+
# def deconstruct: () -> Array[Node?]
|
11957
12059
|
alias deconstruct child_nodes
|
11958
12060
|
|
11959
12061
|
# 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 +12150,7 @@ module Prism
|
|
12048
12150
|
visitor.visit_local_variable_read_node(self)
|
12049
12151
|
end
|
12050
12152
|
|
12051
|
-
# def child_nodes: () -> Array[
|
12153
|
+
# def child_nodes: () -> Array[Node?]
|
12052
12154
|
def child_nodes
|
12053
12155
|
[]
|
12054
12156
|
end
|
@@ -12068,7 +12170,7 @@ module Prism
|
|
12068
12170
|
LocalVariableReadNode.new(source, node_id, location, flags, name, depth)
|
12069
12171
|
end
|
12070
12172
|
|
12071
|
-
# def deconstruct: () -> Array[
|
12173
|
+
# def deconstruct: () -> Array[Node?]
|
12072
12174
|
alias deconstruct child_nodes
|
12073
12175
|
|
12074
12176
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer }
|
@@ -12124,6 +12226,9 @@ module Prism
|
|
12124
12226
|
#
|
12125
12227
|
# foo, bar = baz
|
12126
12228
|
# ^^^ ^^^
|
12229
|
+
#
|
12230
|
+
# foo => baz
|
12231
|
+
# ^^^
|
12127
12232
|
class LocalVariableTargetNode < Node
|
12128
12233
|
# Initialize a new LocalVariableTargetNode node.
|
12129
12234
|
def initialize(source, node_id, location, flags, name, depth)
|
@@ -12140,7 +12245,7 @@ module Prism
|
|
12140
12245
|
visitor.visit_local_variable_target_node(self)
|
12141
12246
|
end
|
12142
12247
|
|
12143
|
-
# def child_nodes: () -> Array[
|
12248
|
+
# def child_nodes: () -> Array[Node?]
|
12144
12249
|
def child_nodes
|
12145
12250
|
[]
|
12146
12251
|
end
|
@@ -12160,7 +12265,7 @@ module Prism
|
|
12160
12265
|
LocalVariableTargetNode.new(source, node_id, location, flags, name, depth)
|
12161
12266
|
end
|
12162
12267
|
|
12163
|
-
# def deconstruct: () -> Array[
|
12268
|
+
# def deconstruct: () -> Array[Node?]
|
12164
12269
|
alias deconstruct child_nodes
|
12165
12270
|
|
12166
12271
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer }
|
@@ -12221,7 +12326,7 @@ module Prism
|
|
12221
12326
|
visitor.visit_local_variable_write_node(self)
|
12222
12327
|
end
|
12223
12328
|
|
12224
|
-
# def child_nodes: () -> Array[
|
12329
|
+
# def child_nodes: () -> Array[Node?]
|
12225
12330
|
def child_nodes
|
12226
12331
|
[value]
|
12227
12332
|
end
|
@@ -12241,7 +12346,7 @@ module Prism
|
|
12241
12346
|
LocalVariableWriteNode.new(source, node_id, location, flags, name, depth, name_loc, value, operator_loc)
|
12242
12347
|
end
|
12243
12348
|
|
12244
|
-
# def deconstruct: () -> Array[
|
12349
|
+
# def deconstruct: () -> Array[Node?]
|
12245
12350
|
alias deconstruct child_nodes
|
12246
12351
|
|
12247
12352
|
# 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 +12469,7 @@ module Prism
|
|
12364
12469
|
visitor.visit_match_last_line_node(self)
|
12365
12470
|
end
|
12366
12471
|
|
12367
|
-
# def child_nodes: () -> Array[
|
12472
|
+
# def child_nodes: () -> Array[Node?]
|
12368
12473
|
def child_nodes
|
12369
12474
|
[]
|
12370
12475
|
end
|
@@ -12384,7 +12489,7 @@ module Prism
|
|
12384
12489
|
MatchLastLineNode.new(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped)
|
12385
12490
|
end
|
12386
12491
|
|
12387
|
-
# def deconstruct: () -> Array[
|
12492
|
+
# def deconstruct: () -> Array[Node?]
|
12388
12493
|
alias deconstruct child_nodes
|
12389
12494
|
|
12390
12495
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String }
|
@@ -12552,7 +12657,7 @@ module Prism
|
|
12552
12657
|
visitor.visit_match_predicate_node(self)
|
12553
12658
|
end
|
12554
12659
|
|
12555
|
-
# def child_nodes: () -> Array[
|
12660
|
+
# def child_nodes: () -> Array[Node?]
|
12556
12661
|
def child_nodes
|
12557
12662
|
[value, pattern]
|
12558
12663
|
end
|
@@ -12572,7 +12677,7 @@ module Prism
|
|
12572
12677
|
MatchPredicateNode.new(source, node_id, location, flags, value, pattern, operator_loc)
|
12573
12678
|
end
|
12574
12679
|
|
12575
|
-
# def deconstruct: () -> Array[
|
12680
|
+
# def deconstruct: () -> Array[Node?]
|
12576
12681
|
alias deconstruct child_nodes
|
12577
12682
|
|
12578
12683
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location }
|
@@ -12650,7 +12755,7 @@ module Prism
|
|
12650
12755
|
visitor.visit_match_required_node(self)
|
12651
12756
|
end
|
12652
12757
|
|
12653
|
-
# def child_nodes: () -> Array[
|
12758
|
+
# def child_nodes: () -> Array[Node?]
|
12654
12759
|
def child_nodes
|
12655
12760
|
[value, pattern]
|
12656
12761
|
end
|
@@ -12670,7 +12775,7 @@ module Prism
|
|
12670
12775
|
MatchRequiredNode.new(source, node_id, location, flags, value, pattern, operator_loc)
|
12671
12776
|
end
|
12672
12777
|
|
12673
|
-
# def deconstruct: () -> Array[
|
12778
|
+
# def deconstruct: () -> Array[Node?]
|
12674
12779
|
alias deconstruct child_nodes
|
12675
12780
|
|
12676
12781
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location }
|
@@ -12678,13 +12783,61 @@ module Prism
|
|
12678
12783
|
{ node_id: node_id, location: location, value: value, pattern: pattern, operator_loc: operator_loc }
|
12679
12784
|
end
|
12680
12785
|
|
12681
|
-
#
|
12786
|
+
# Represents the left-hand side of the operator.
|
12787
|
+
#
|
12788
|
+
# foo => bar
|
12789
|
+
# ^^^
|
12682
12790
|
attr_reader :value
|
12683
12791
|
|
12684
|
-
#
|
12792
|
+
# Represents the right-hand side of the operator. The type of the node depends on the expression.
|
12793
|
+
#
|
12794
|
+
# Anything that looks like a local variable name (including `_`) will result in a `LocalVariableTargetNode`.
|
12795
|
+
#
|
12796
|
+
# foo => a # This is equivalent to writing `a = foo`
|
12797
|
+
# ^
|
12798
|
+
#
|
12799
|
+
# Using an explicit `Array` or combining expressions with `,` will result in a `ArrayPatternNode`. This can be preceded by a constant.
|
12800
|
+
#
|
12801
|
+
# foo => [a]
|
12802
|
+
# ^^^
|
12803
|
+
#
|
12804
|
+
# foo => a, b
|
12805
|
+
# ^^^^
|
12806
|
+
#
|
12807
|
+
# foo => Bar[a, b]
|
12808
|
+
# ^^^^^^^^^
|
12809
|
+
#
|
12810
|
+
# If the array pattern contains at least two wildcard matches, a `FindPatternNode` is created instead.
|
12811
|
+
#
|
12812
|
+
# foo => *, 1, *a
|
12813
|
+
# ^^^^^
|
12814
|
+
#
|
12815
|
+
# Using an explicit `Hash` or a constant with square brackets and hash keys in the square brackets will result in a `HashPatternNode`.
|
12816
|
+
#
|
12817
|
+
# foo => { a: 1, b: }
|
12818
|
+
#
|
12819
|
+
# foo => Bar[a: 1, b:]
|
12820
|
+
#
|
12821
|
+
# foo => Bar[**]
|
12822
|
+
#
|
12823
|
+
# To use any variable that needs run time evaluation, pinning is required. This results in a `PinnedVariableNode`
|
12824
|
+
#
|
12825
|
+
# foo => ^a
|
12826
|
+
# ^^
|
12827
|
+
#
|
12828
|
+
# Similar, any expression can be used with pinning. This results in a `PinnedExpressionNode`.
|
12829
|
+
#
|
12830
|
+
# foo => ^(a + 1)
|
12831
|
+
#
|
12832
|
+
# Anything else will result in the regular node for that expression, for example a `ConstantReadNode`.
|
12833
|
+
#
|
12834
|
+
# foo => CONST
|
12685
12835
|
attr_reader :pattern
|
12686
12836
|
|
12687
|
-
#
|
12837
|
+
# The location of the operator.
|
12838
|
+
#
|
12839
|
+
# foo => bar
|
12840
|
+
# ^^
|
12688
12841
|
def operator_loc
|
12689
12842
|
location = @operator_loc
|
12690
12843
|
return location if location.is_a?(Location)
|
@@ -12747,7 +12900,7 @@ module Prism
|
|
12747
12900
|
visitor.visit_match_write_node(self)
|
12748
12901
|
end
|
12749
12902
|
|
12750
|
-
# def child_nodes: () -> Array[
|
12903
|
+
# def child_nodes: () -> Array[Node?]
|
12751
12904
|
def child_nodes
|
12752
12905
|
[call, *targets]
|
12753
12906
|
end
|
@@ -12767,7 +12920,7 @@ module Prism
|
|
12767
12920
|
MatchWriteNode.new(source, node_id, location, flags, call, targets)
|
12768
12921
|
end
|
12769
12922
|
|
12770
|
-
# def deconstruct: () -> Array[
|
12923
|
+
# def deconstruct: () -> Array[Node?]
|
12771
12924
|
alias deconstruct child_nodes
|
12772
12925
|
|
12773
12926
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, call: CallNode, targets: Array[LocalVariableTargetNode] }
|
@@ -12821,7 +12974,7 @@ module Prism
|
|
12821
12974
|
visitor.visit_missing_node(self)
|
12822
12975
|
end
|
12823
12976
|
|
12824
|
-
# def child_nodes: () -> Array[
|
12977
|
+
# def child_nodes: () -> Array[Node?]
|
12825
12978
|
def child_nodes
|
12826
12979
|
[]
|
12827
12980
|
end
|
@@ -12841,7 +12994,7 @@ module Prism
|
|
12841
12994
|
MissingNode.new(source, node_id, location, flags)
|
12842
12995
|
end
|
12843
12996
|
|
12844
|
-
# def deconstruct: () -> Array[
|
12997
|
+
# def deconstruct: () -> Array[Node?]
|
12845
12998
|
alias deconstruct child_nodes
|
12846
12999
|
|
12847
13000
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
@@ -12895,7 +13048,7 @@ module Prism
|
|
12895
13048
|
visitor.visit_module_node(self)
|
12896
13049
|
end
|
12897
13050
|
|
12898
|
-
# def child_nodes: () -> Array[
|
13051
|
+
# def child_nodes: () -> Array[Node?]
|
12899
13052
|
def child_nodes
|
12900
13053
|
[constant_path, body]
|
12901
13054
|
end
|
@@ -12918,7 +13071,7 @@ module Prism
|
|
12918
13071
|
ModuleNode.new(source, node_id, location, flags, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name)
|
12919
13072
|
end
|
12920
13073
|
|
12921
|
-
# def deconstruct: () -> Array[
|
13074
|
+
# def deconstruct: () -> Array[Node?]
|
12922
13075
|
alias deconstruct child_nodes
|
12923
13076
|
|
12924
13077
|
# 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 +13184,7 @@ module Prism
|
|
13031
13184
|
visitor.visit_multi_target_node(self)
|
13032
13185
|
end
|
13033
13186
|
|
13034
|
-
# def child_nodes: () -> Array[
|
13187
|
+
# def child_nodes: () -> Array[Node?]
|
13035
13188
|
def child_nodes
|
13036
13189
|
[*lefts, rest, *rights]
|
13037
13190
|
end
|
@@ -13055,7 +13208,7 @@ module Prism
|
|
13055
13208
|
MultiTargetNode.new(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc)
|
13056
13209
|
end
|
13057
13210
|
|
13058
|
-
# def deconstruct: () -> Array[
|
13211
|
+
# def deconstruct: () -> Array[Node?]
|
13059
13212
|
alias deconstruct child_nodes
|
13060
13213
|
|
13061
13214
|
# 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 +13357,7 @@ module Prism
|
|
13204
13357
|
visitor.visit_multi_write_node(self)
|
13205
13358
|
end
|
13206
13359
|
|
13207
|
-
# def child_nodes: () -> Array[
|
13360
|
+
# def child_nodes: () -> Array[Node?]
|
13208
13361
|
def child_nodes
|
13209
13362
|
[*lefts, rest, *rights, value]
|
13210
13363
|
end
|
@@ -13229,7 +13382,7 @@ module Prism
|
|
13229
13382
|
MultiWriteNode.new(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value)
|
13230
13383
|
end
|
13231
13384
|
|
13232
|
-
# def deconstruct: () -> Array[
|
13385
|
+
# def deconstruct: () -> Array[Node?]
|
13233
13386
|
alias deconstruct child_nodes
|
13234
13387
|
|
13235
13388
|
# 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 +13555,7 @@ module Prism
|
|
13402
13555
|
visitor.visit_next_node(self)
|
13403
13556
|
end
|
13404
13557
|
|
13405
|
-
# def child_nodes: () -> Array[
|
13558
|
+
# def child_nodes: () -> Array[Node?]
|
13406
13559
|
def child_nodes
|
13407
13560
|
[arguments]
|
13408
13561
|
end
|
@@ -13424,7 +13577,7 @@ module Prism
|
|
13424
13577
|
NextNode.new(source, node_id, location, flags, arguments, keyword_loc)
|
13425
13578
|
end
|
13426
13579
|
|
13427
|
-
# def deconstruct: () -> Array[
|
13580
|
+
# def deconstruct: () -> Array[Node?]
|
13428
13581
|
alias deconstruct child_nodes
|
13429
13582
|
|
13430
13583
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location }
|
@@ -13495,7 +13648,7 @@ module Prism
|
|
13495
13648
|
visitor.visit_nil_node(self)
|
13496
13649
|
end
|
13497
13650
|
|
13498
|
-
# def child_nodes: () -> Array[
|
13651
|
+
# def child_nodes: () -> Array[Node?]
|
13499
13652
|
def child_nodes
|
13500
13653
|
[]
|
13501
13654
|
end
|
@@ -13515,7 +13668,7 @@ module Prism
|
|
13515
13668
|
NilNode.new(source, node_id, location, flags)
|
13516
13669
|
end
|
13517
13670
|
|
13518
|
-
# def deconstruct: () -> Array[
|
13671
|
+
# def deconstruct: () -> Array[Node?]
|
13519
13672
|
alias deconstruct child_nodes
|
13520
13673
|
|
13521
13674
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
@@ -13566,7 +13719,7 @@ module Prism
|
|
13566
13719
|
visitor.visit_no_keywords_parameter_node(self)
|
13567
13720
|
end
|
13568
13721
|
|
13569
|
-
# def child_nodes: () -> Array[
|
13722
|
+
# def child_nodes: () -> Array[Node?]
|
13570
13723
|
def child_nodes
|
13571
13724
|
[]
|
13572
13725
|
end
|
@@ -13586,7 +13739,7 @@ module Prism
|
|
13586
13739
|
NoKeywordsParameterNode.new(source, node_id, location, flags, operator_loc, keyword_loc)
|
13587
13740
|
end
|
13588
13741
|
|
13589
|
-
# def deconstruct: () -> Array[
|
13742
|
+
# def deconstruct: () -> Array[Node?]
|
13590
13743
|
alias deconstruct child_nodes
|
13591
13744
|
|
13592
13745
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, keyword_loc: Location }
|
@@ -13673,7 +13826,7 @@ module Prism
|
|
13673
13826
|
visitor.visit_numbered_parameters_node(self)
|
13674
13827
|
end
|
13675
13828
|
|
13676
|
-
# def child_nodes: () -> Array[
|
13829
|
+
# def child_nodes: () -> Array[Node?]
|
13677
13830
|
def child_nodes
|
13678
13831
|
[]
|
13679
13832
|
end
|
@@ -13693,7 +13846,7 @@ module Prism
|
|
13693
13846
|
NumberedParametersNode.new(source, node_id, location, flags, maximum)
|
13694
13847
|
end
|
13695
13848
|
|
13696
|
-
# def deconstruct: () -> Array[
|
13849
|
+
# def deconstruct: () -> Array[Node?]
|
13697
13850
|
alias deconstruct child_nodes
|
13698
13851
|
|
13699
13852
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, maximum: Integer }
|
@@ -13746,7 +13899,7 @@ module Prism
|
|
13746
13899
|
visitor.visit_numbered_reference_read_node(self)
|
13747
13900
|
end
|
13748
13901
|
|
13749
|
-
# def child_nodes: () -> Array[
|
13902
|
+
# def child_nodes: () -> Array[Node?]
|
13750
13903
|
def child_nodes
|
13751
13904
|
[]
|
13752
13905
|
end
|
@@ -13766,7 +13919,7 @@ module Prism
|
|
13766
13919
|
NumberedReferenceReadNode.new(source, node_id, location, flags, number)
|
13767
13920
|
end
|
13768
13921
|
|
13769
|
-
# def deconstruct: () -> Array[
|
13922
|
+
# def deconstruct: () -> Array[Node?]
|
13770
13923
|
alias deconstruct child_nodes
|
13771
13924
|
|
13772
13925
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, number: Integer }
|
@@ -13828,7 +13981,7 @@ module Prism
|
|
13828
13981
|
visitor.visit_optional_keyword_parameter_node(self)
|
13829
13982
|
end
|
13830
13983
|
|
13831
|
-
# def child_nodes: () -> Array[
|
13984
|
+
# def child_nodes: () -> Array[Node?]
|
13832
13985
|
def child_nodes
|
13833
13986
|
[value]
|
13834
13987
|
end
|
@@ -13848,7 +14001,7 @@ module Prism
|
|
13848
14001
|
OptionalKeywordParameterNode.new(source, node_id, location, flags, name, name_loc, value)
|
13849
14002
|
end
|
13850
14003
|
|
13851
|
-
# def deconstruct: () -> Array[
|
14004
|
+
# def deconstruct: () -> Array[Node?]
|
13852
14005
|
alias deconstruct child_nodes
|
13853
14006
|
|
13854
14007
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node }
|
@@ -13929,7 +14082,7 @@ module Prism
|
|
13929
14082
|
visitor.visit_optional_parameter_node(self)
|
13930
14083
|
end
|
13931
14084
|
|
13932
|
-
# def child_nodes: () -> Array[
|
14085
|
+
# def child_nodes: () -> Array[Node?]
|
13933
14086
|
def child_nodes
|
13934
14087
|
[value]
|
13935
14088
|
end
|
@@ -13949,7 +14102,7 @@ module Prism
|
|
13949
14102
|
OptionalParameterNode.new(source, node_id, location, flags, name, name_loc, operator_loc, value)
|
13950
14103
|
end
|
13951
14104
|
|
13952
|
-
# def deconstruct: () -> Array[
|
14105
|
+
# def deconstruct: () -> Array[Node?]
|
13953
14106
|
alias deconstruct child_nodes
|
13954
14107
|
|
13955
14108
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node }
|
@@ -14047,7 +14200,7 @@ module Prism
|
|
14047
14200
|
visitor.visit_or_node(self)
|
14048
14201
|
end
|
14049
14202
|
|
14050
|
-
# def child_nodes: () -> Array[
|
14203
|
+
# def child_nodes: () -> Array[Node?]
|
14051
14204
|
def child_nodes
|
14052
14205
|
[left, right]
|
14053
14206
|
end
|
@@ -14067,7 +14220,7 @@ module Prism
|
|
14067
14220
|
OrNode.new(source, node_id, location, flags, left, right, operator_loc)
|
14068
14221
|
end
|
14069
14222
|
|
14070
|
-
# def deconstruct: () -> Array[
|
14223
|
+
# def deconstruct: () -> Array[Node?]
|
14071
14224
|
alias deconstruct child_nodes
|
14072
14225
|
|
14073
14226
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location }
|
@@ -14165,7 +14318,7 @@ module Prism
|
|
14165
14318
|
visitor.visit_parameters_node(self)
|
14166
14319
|
end
|
14167
14320
|
|
14168
|
-
# def child_nodes: () -> Array[
|
14321
|
+
# def child_nodes: () -> Array[Node?]
|
14169
14322
|
def child_nodes
|
14170
14323
|
[*requireds, *optionals, rest, *posts, *keywords, keyword_rest, block]
|
14171
14324
|
end
|
@@ -14193,7 +14346,7 @@ module Prism
|
|
14193
14346
|
ParametersNode.new(source, node_id, location, flags, requireds, optionals, rest, posts, keywords, keyword_rest, block)
|
14194
14347
|
end
|
14195
14348
|
|
14196
|
-
# def deconstruct: () -> Array[
|
14349
|
+
# def deconstruct: () -> Array[Node?]
|
14197
14350
|
alias deconstruct child_nodes
|
14198
14351
|
|
14199
14352
|
# 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 +14429,7 @@ module Prism
|
|
14276
14429
|
visitor.visit_parentheses_node(self)
|
14277
14430
|
end
|
14278
14431
|
|
14279
|
-
# def child_nodes: () -> Array[
|
14432
|
+
# def child_nodes: () -> Array[Node?]
|
14280
14433
|
def child_nodes
|
14281
14434
|
[body]
|
14282
14435
|
end
|
@@ -14298,7 +14451,7 @@ module Prism
|
|
14298
14451
|
ParenthesesNode.new(source, node_id, location, flags, body, opening_loc, closing_loc)
|
14299
14452
|
end
|
14300
14453
|
|
14301
|
-
# def deconstruct: () -> Array[
|
14454
|
+
# def deconstruct: () -> Array[Node?]
|
14302
14455
|
alias deconstruct child_nodes
|
14303
14456
|
|
14304
14457
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Prism::node?, opening_loc: Location, closing_loc: Location }
|
@@ -14306,6 +14459,11 @@ module Prism
|
|
14306
14459
|
{ node_id: node_id, location: location, body: body, opening_loc: opening_loc, closing_loc: closing_loc }
|
14307
14460
|
end
|
14308
14461
|
|
14462
|
+
# def multiple_statements?: () -> bool
|
14463
|
+
def multiple_statements?
|
14464
|
+
flags.anybits?(ParenthesesNodeFlags::MULTIPLE_STATEMENTS)
|
14465
|
+
end
|
14466
|
+
|
14309
14467
|
# attr_reader body: Prism::node?
|
14310
14468
|
attr_reader :body
|
14311
14469
|
|
@@ -14364,6 +14522,7 @@ module Prism
|
|
14364
14522
|
# comparing the value of locations. Locations are checked only for presence.
|
14365
14523
|
def ===(other)
|
14366
14524
|
other.is_a?(ParenthesesNode) &&
|
14525
|
+
(flags === other.flags) &&
|
14367
14526
|
(body === other.body) &&
|
14368
14527
|
(opening_loc.nil? == other.opening_loc.nil?) &&
|
14369
14528
|
(closing_loc.nil? == other.closing_loc.nil?)
|
@@ -14392,7 +14551,7 @@ module Prism
|
|
14392
14551
|
visitor.visit_pinned_expression_node(self)
|
14393
14552
|
end
|
14394
14553
|
|
14395
|
-
# def child_nodes: () -> Array[
|
14554
|
+
# def child_nodes: () -> Array[Node?]
|
14396
14555
|
def child_nodes
|
14397
14556
|
[expression]
|
14398
14557
|
end
|
@@ -14412,7 +14571,7 @@ module Prism
|
|
14412
14571
|
PinnedExpressionNode.new(source, node_id, location, flags, expression, operator_loc, lparen_loc, rparen_loc)
|
14413
14572
|
end
|
14414
14573
|
|
14415
|
-
# def deconstruct: () -> Array[
|
14574
|
+
# def deconstruct: () -> Array[Node?]
|
14416
14575
|
alias deconstruct child_nodes
|
14417
14576
|
|
14418
14577
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location }
|
@@ -14420,10 +14579,16 @@ module Prism
|
|
14420
14579
|
{ node_id: node_id, location: location, expression: expression, operator_loc: operator_loc, lparen_loc: lparen_loc, rparen_loc: rparen_loc }
|
14421
14580
|
end
|
14422
14581
|
|
14423
|
-
#
|
14582
|
+
# The expression used in the pinned expression
|
14583
|
+
#
|
14584
|
+
# foo in ^(bar)
|
14585
|
+
# ^^^
|
14424
14586
|
attr_reader :expression
|
14425
14587
|
|
14426
|
-
#
|
14588
|
+
# The location of the `^` operator
|
14589
|
+
#
|
14590
|
+
# foo in ^(bar)
|
14591
|
+
# ^
|
14427
14592
|
def operator_loc
|
14428
14593
|
location = @operator_loc
|
14429
14594
|
return location if location.is_a?(Location)
|
@@ -14436,7 +14601,10 @@ module Prism
|
|
14436
14601
|
repository.enter(node_id, :operator_loc)
|
14437
14602
|
end
|
14438
14603
|
|
14439
|
-
#
|
14604
|
+
# The location of the opening parenthesis.
|
14605
|
+
#
|
14606
|
+
# foo in ^(bar)
|
14607
|
+
# ^
|
14440
14608
|
def lparen_loc
|
14441
14609
|
location = @lparen_loc
|
14442
14610
|
return location if location.is_a?(Location)
|
@@ -14449,7 +14617,10 @@ module Prism
|
|
14449
14617
|
repository.enter(node_id, :lparen_loc)
|
14450
14618
|
end
|
14451
14619
|
|
14452
|
-
#
|
14620
|
+
# The location of the closing parenthesis.
|
14621
|
+
#
|
14622
|
+
# foo in ^(bar)
|
14623
|
+
# ^
|
14453
14624
|
def rparen_loc
|
14454
14625
|
location = @rparen_loc
|
14455
14626
|
return location if location.is_a?(Location)
|
@@ -14523,7 +14694,7 @@ module Prism
|
|
14523
14694
|
visitor.visit_pinned_variable_node(self)
|
14524
14695
|
end
|
14525
14696
|
|
14526
|
-
# def child_nodes: () -> Array[
|
14697
|
+
# def child_nodes: () -> Array[Node?]
|
14527
14698
|
def child_nodes
|
14528
14699
|
[variable]
|
14529
14700
|
end
|
@@ -14543,7 +14714,7 @@ module Prism
|
|
14543
14714
|
PinnedVariableNode.new(source, node_id, location, flags, variable, operator_loc)
|
14544
14715
|
end
|
14545
14716
|
|
14546
|
-
# def deconstruct: () -> Array[
|
14717
|
+
# def deconstruct: () -> Array[Node?]
|
14547
14718
|
alias deconstruct child_nodes
|
14548
14719
|
|
14549
14720
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, operator_loc: Location }
|
@@ -14551,10 +14722,16 @@ module Prism
|
|
14551
14722
|
{ node_id: node_id, location: location, variable: variable, operator_loc: operator_loc }
|
14552
14723
|
end
|
14553
14724
|
|
14554
|
-
#
|
14725
|
+
# The variable used in the pinned expression
|
14726
|
+
#
|
14727
|
+
# foo in ^bar
|
14728
|
+
# ^^^
|
14555
14729
|
attr_reader :variable
|
14556
14730
|
|
14557
|
-
#
|
14731
|
+
# The location of the `^` operator
|
14732
|
+
#
|
14733
|
+
# foo in ^bar
|
14734
|
+
# ^
|
14558
14735
|
def operator_loc
|
14559
14736
|
location = @operator_loc
|
14560
14737
|
return location if location.is_a?(Location)
|
@@ -14618,7 +14795,7 @@ module Prism
|
|
14618
14795
|
visitor.visit_post_execution_node(self)
|
14619
14796
|
end
|
14620
14797
|
|
14621
|
-
# def child_nodes: () -> Array[
|
14798
|
+
# def child_nodes: () -> Array[Node?]
|
14622
14799
|
def child_nodes
|
14623
14800
|
[statements]
|
14624
14801
|
end
|
@@ -14640,7 +14817,7 @@ module Prism
|
|
14640
14817
|
PostExecutionNode.new(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc)
|
14641
14818
|
end
|
14642
14819
|
|
14643
|
-
# def deconstruct: () -> Array[
|
14820
|
+
# def deconstruct: () -> Array[Node?]
|
14644
14821
|
alias deconstruct child_nodes
|
14645
14822
|
|
14646
14823
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location }
|
@@ -14753,7 +14930,7 @@ module Prism
|
|
14753
14930
|
visitor.visit_pre_execution_node(self)
|
14754
14931
|
end
|
14755
14932
|
|
14756
|
-
# def child_nodes: () -> Array[
|
14933
|
+
# def child_nodes: () -> Array[Node?]
|
14757
14934
|
def child_nodes
|
14758
14935
|
[statements]
|
14759
14936
|
end
|
@@ -14775,7 +14952,7 @@ module Prism
|
|
14775
14952
|
PreExecutionNode.new(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc)
|
14776
14953
|
end
|
14777
14954
|
|
14778
|
-
# def deconstruct: () -> Array[
|
14955
|
+
# def deconstruct: () -> Array[Node?]
|
14779
14956
|
alias deconstruct child_nodes
|
14780
14957
|
|
14781
14958
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location }
|
@@ -14883,7 +15060,7 @@ module Prism
|
|
14883
15060
|
visitor.visit_program_node(self)
|
14884
15061
|
end
|
14885
15062
|
|
14886
|
-
# def child_nodes: () -> Array[
|
15063
|
+
# def child_nodes: () -> Array[Node?]
|
14887
15064
|
def child_nodes
|
14888
15065
|
[statements]
|
14889
15066
|
end
|
@@ -14903,7 +15080,7 @@ module Prism
|
|
14903
15080
|
ProgramNode.new(source, node_id, location, flags, locals, statements)
|
14904
15081
|
end
|
14905
15082
|
|
14906
|
-
# def deconstruct: () -> Array[
|
15083
|
+
# def deconstruct: () -> Array[Node?]
|
14907
15084
|
alias deconstruct child_nodes
|
14908
15085
|
|
14909
15086
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], statements: StatementsNode }
|
@@ -14966,7 +15143,7 @@ module Prism
|
|
14966
15143
|
visitor.visit_range_node(self)
|
14967
15144
|
end
|
14968
15145
|
|
14969
|
-
# def child_nodes: () -> Array[
|
15146
|
+
# def child_nodes: () -> Array[Node?]
|
14970
15147
|
def child_nodes
|
14971
15148
|
[left, right]
|
14972
15149
|
end
|
@@ -14989,7 +15166,7 @@ module Prism
|
|
14989
15166
|
RangeNode.new(source, node_id, location, flags, left, right, operator_loc)
|
14990
15167
|
end
|
14991
15168
|
|
14992
|
-
# def deconstruct: () -> Array[
|
15169
|
+
# def deconstruct: () -> Array[Node?]
|
14993
15170
|
alias deconstruct child_nodes
|
14994
15171
|
|
14995
15172
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location }
|
@@ -15085,7 +15262,7 @@ module Prism
|
|
15085
15262
|
visitor.visit_rational_node(self)
|
15086
15263
|
end
|
15087
15264
|
|
15088
|
-
# def child_nodes: () -> Array[
|
15265
|
+
# def child_nodes: () -> Array[Node?]
|
15089
15266
|
def child_nodes
|
15090
15267
|
[]
|
15091
15268
|
end
|
@@ -15105,7 +15282,7 @@ module Prism
|
|
15105
15282
|
RationalNode.new(source, node_id, location, flags, numerator, denominator)
|
15106
15283
|
end
|
15107
15284
|
|
15108
|
-
# def deconstruct: () -> Array[
|
15285
|
+
# def deconstruct: () -> Array[Node?]
|
15109
15286
|
alias deconstruct child_nodes
|
15110
15287
|
|
15111
15288
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numerator: Integer, denominator: Integer }
|
@@ -15186,7 +15363,7 @@ module Prism
|
|
15186
15363
|
visitor.visit_redo_node(self)
|
15187
15364
|
end
|
15188
15365
|
|
15189
|
-
# def child_nodes: () -> Array[
|
15366
|
+
# def child_nodes: () -> Array[Node?]
|
15190
15367
|
def child_nodes
|
15191
15368
|
[]
|
15192
15369
|
end
|
@@ -15206,7 +15383,7 @@ module Prism
|
|
15206
15383
|
RedoNode.new(source, node_id, location, flags)
|
15207
15384
|
end
|
15208
15385
|
|
15209
|
-
# def deconstruct: () -> Array[
|
15386
|
+
# def deconstruct: () -> Array[Node?]
|
15210
15387
|
alias deconstruct child_nodes
|
15211
15388
|
|
15212
15389
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
@@ -15258,7 +15435,7 @@ module Prism
|
|
15258
15435
|
visitor.visit_regular_expression_node(self)
|
15259
15436
|
end
|
15260
15437
|
|
15261
|
-
# def child_nodes: () -> Array[
|
15438
|
+
# def child_nodes: () -> Array[Node?]
|
15262
15439
|
def child_nodes
|
15263
15440
|
[]
|
15264
15441
|
end
|
@@ -15278,7 +15455,7 @@ module Prism
|
|
15278
15455
|
RegularExpressionNode.new(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped)
|
15279
15456
|
end
|
15280
15457
|
|
15281
|
-
# def deconstruct: () -> Array[
|
15458
|
+
# def deconstruct: () -> Array[Node?]
|
15282
15459
|
alias deconstruct child_nodes
|
15283
15460
|
|
15284
15461
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String }
|
@@ -15446,7 +15623,7 @@ module Prism
|
|
15446
15623
|
visitor.visit_required_keyword_parameter_node(self)
|
15447
15624
|
end
|
15448
15625
|
|
15449
|
-
# def child_nodes: () -> Array[
|
15626
|
+
# def child_nodes: () -> Array[Node?]
|
15450
15627
|
def child_nodes
|
15451
15628
|
[]
|
15452
15629
|
end
|
@@ -15466,7 +15643,7 @@ module Prism
|
|
15466
15643
|
RequiredKeywordParameterNode.new(source, node_id, location, flags, name, name_loc)
|
15467
15644
|
end
|
15468
15645
|
|
15469
|
-
# def deconstruct: () -> Array[
|
15646
|
+
# def deconstruct: () -> Array[Node?]
|
15470
15647
|
alias deconstruct child_nodes
|
15471
15648
|
|
15472
15649
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location }
|
@@ -15540,7 +15717,7 @@ module Prism
|
|
15540
15717
|
visitor.visit_required_parameter_node(self)
|
15541
15718
|
end
|
15542
15719
|
|
15543
|
-
# def child_nodes: () -> Array[
|
15720
|
+
# def child_nodes: () -> Array[Node?]
|
15544
15721
|
def child_nodes
|
15545
15722
|
[]
|
15546
15723
|
end
|
@@ -15560,7 +15737,7 @@ module Prism
|
|
15560
15737
|
RequiredParameterNode.new(source, node_id, location, flags, name)
|
15561
15738
|
end
|
15562
15739
|
|
15563
|
-
# def deconstruct: () -> Array[
|
15740
|
+
# def deconstruct: () -> Array[Node?]
|
15564
15741
|
alias deconstruct child_nodes
|
15565
15742
|
|
15566
15743
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol }
|
@@ -15621,7 +15798,7 @@ module Prism
|
|
15621
15798
|
visitor.visit_rescue_modifier_node(self)
|
15622
15799
|
end
|
15623
15800
|
|
15624
|
-
# def child_nodes: () -> Array[
|
15801
|
+
# def child_nodes: () -> Array[Node?]
|
15625
15802
|
def child_nodes
|
15626
15803
|
[expression, rescue_expression]
|
15627
15804
|
end
|
@@ -15641,7 +15818,7 @@ module Prism
|
|
15641
15818
|
RescueModifierNode.new(source, node_id, location, flags, expression, keyword_loc, rescue_expression)
|
15642
15819
|
end
|
15643
15820
|
|
15644
|
-
# def deconstruct: () -> Array[
|
15821
|
+
# def deconstruct: () -> Array[Node?]
|
15645
15822
|
alias deconstruct child_nodes
|
15646
15823
|
|
15647
15824
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node }
|
@@ -15709,7 +15886,7 @@ module Prism
|
|
15709
15886
|
# `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `reference` field.
|
15710
15887
|
class RescueNode < Node
|
15711
15888
|
# Initialize a new RescueNode node.
|
15712
|
-
def initialize(source, node_id, location, flags, keyword_loc, exceptions, operator_loc, reference, statements, subsequent)
|
15889
|
+
def initialize(source, node_id, location, flags, keyword_loc, exceptions, operator_loc, reference, then_keyword_loc, statements, subsequent)
|
15713
15890
|
@source = source
|
15714
15891
|
@node_id = node_id
|
15715
15892
|
@location = location
|
@@ -15718,6 +15895,7 @@ module Prism
|
|
15718
15895
|
@exceptions = exceptions
|
15719
15896
|
@operator_loc = operator_loc
|
15720
15897
|
@reference = reference
|
15898
|
+
@then_keyword_loc = then_keyword_loc
|
15721
15899
|
@statements = statements
|
15722
15900
|
@subsequent = subsequent
|
15723
15901
|
end
|
@@ -15727,7 +15905,7 @@ module Prism
|
|
15727
15905
|
visitor.visit_rescue_node(self)
|
15728
15906
|
end
|
15729
15907
|
|
15730
|
-
# def child_nodes: () -> Array[
|
15908
|
+
# def child_nodes: () -> Array[Node?]
|
15731
15909
|
def child_nodes
|
15732
15910
|
[*exceptions, reference, statements, subsequent]
|
15733
15911
|
end
|
@@ -15744,20 +15922,20 @@ module Prism
|
|
15744
15922
|
|
15745
15923
|
# def comment_targets: () -> Array[Node | Location]
|
15746
15924
|
def comment_targets
|
15747
|
-
[keyword_loc, *exceptions, *operator_loc, *reference, *statements, *subsequent] #: Array[Prism::node | Location]
|
15925
|
+
[keyword_loc, *exceptions, *operator_loc, *reference, *then_keyword_loc, *statements, *subsequent] #: Array[Prism::node | Location]
|
15748
15926
|
end
|
15749
15927
|
|
15750
|
-
# def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, ?statements: StatementsNode?, ?subsequent: RescueNode?) -> RescueNode
|
15751
|
-
def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, exceptions: self.exceptions, operator_loc: self.operator_loc, reference: self.reference, statements: self.statements, subsequent: self.subsequent)
|
15752
|
-
RescueNode.new(source, node_id, location, flags, keyword_loc, exceptions, operator_loc, reference, statements, subsequent)
|
15928
|
+
# def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?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?) -> RescueNode
|
15929
|
+
def copy(node_id: self.node_id, location: self.location, flags: self.flags, keyword_loc: self.keyword_loc, exceptions: self.exceptions, operator_loc: self.operator_loc, reference: self.reference, then_keyword_loc: self.then_keyword_loc, statements: self.statements, subsequent: self.subsequent)
|
15930
|
+
RescueNode.new(source, node_id, location, flags, keyword_loc, exceptions, operator_loc, reference, then_keyword_loc, statements, subsequent)
|
15753
15931
|
end
|
15754
15932
|
|
15755
|
-
# def deconstruct: () -> Array[
|
15933
|
+
# def deconstruct: () -> Array[Node?]
|
15756
15934
|
alias deconstruct child_nodes
|
15757
15935
|
|
15758
|
-
# 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, statements: StatementsNode?, subsequent: RescueNode? }
|
15936
|
+
# 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? }
|
15759
15937
|
def deconstruct_keys(keys)
|
15760
|
-
{ node_id: node_id, location: location, keyword_loc: keyword_loc, exceptions: exceptions, operator_loc: operator_loc, reference: reference, statements: statements, subsequent: subsequent }
|
15938
|
+
{ node_id: node_id, location: location, keyword_loc: keyword_loc, exceptions: exceptions, operator_loc: operator_loc, reference: reference, then_keyword_loc: then_keyword_loc, statements: statements, subsequent: subsequent }
|
15761
15939
|
end
|
15762
15940
|
|
15763
15941
|
# attr_reader keyword_loc: Location
|
@@ -15798,6 +15976,25 @@ module Prism
|
|
15798
15976
|
# attr_reader reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil
|
15799
15977
|
attr_reader :reference
|
15800
15978
|
|
15979
|
+
# attr_reader then_keyword_loc: Location?
|
15980
|
+
def then_keyword_loc
|
15981
|
+
location = @then_keyword_loc
|
15982
|
+
case location
|
15983
|
+
when nil
|
15984
|
+
nil
|
15985
|
+
when Location
|
15986
|
+
location
|
15987
|
+
else
|
15988
|
+
@then_keyword_loc = Location.new(source, location >> 32, location & 0xFFFFFFFF)
|
15989
|
+
end
|
15990
|
+
end
|
15991
|
+
|
15992
|
+
# Save the then_keyword_loc location using the given saved source so that
|
15993
|
+
# it can be retrieved later.
|
15994
|
+
def save_then_keyword_loc(repository)
|
15995
|
+
repository.enter(node_id, :then_keyword_loc) unless @then_keyword_loc.nil?
|
15996
|
+
end
|
15997
|
+
|
15801
15998
|
# attr_reader statements: StatementsNode?
|
15802
15999
|
attr_reader :statements
|
15803
16000
|
|
@@ -15814,6 +16011,11 @@ module Prism
|
|
15814
16011
|
operator_loc&.slice
|
15815
16012
|
end
|
15816
16013
|
|
16014
|
+
# def then_keyword: () -> String?
|
16015
|
+
def then_keyword
|
16016
|
+
then_keyword_loc&.slice
|
16017
|
+
end
|
16018
|
+
|
15817
16019
|
# def inspect -> String
|
15818
16020
|
def inspect
|
15819
16021
|
InspectVisitor.compose(self)
|
@@ -15838,6 +16040,7 @@ module Prism
|
|
15838
16040
|
exceptions.zip(other.exceptions).all? { |left, right| left === right } &&
|
15839
16041
|
(operator_loc.nil? == other.operator_loc.nil?) &&
|
15840
16042
|
(reference === other.reference) &&
|
16043
|
+
(then_keyword_loc.nil? == other.then_keyword_loc.nil?) &&
|
15841
16044
|
(statements === other.statements) &&
|
15842
16045
|
(subsequent === other.subsequent)
|
15843
16046
|
end
|
@@ -15865,7 +16068,7 @@ module Prism
|
|
15865
16068
|
visitor.visit_rest_parameter_node(self)
|
15866
16069
|
end
|
15867
16070
|
|
15868
|
-
# def child_nodes: () -> Array[
|
16071
|
+
# def child_nodes: () -> Array[Node?]
|
15869
16072
|
def child_nodes
|
15870
16073
|
[]
|
15871
16074
|
end
|
@@ -15885,7 +16088,7 @@ module Prism
|
|
15885
16088
|
RestParameterNode.new(source, node_id, location, flags, name, name_loc, operator_loc)
|
15886
16089
|
end
|
15887
16090
|
|
15888
|
-
# def deconstruct: () -> Array[
|
16091
|
+
# def deconstruct: () -> Array[Node?]
|
15889
16092
|
alias deconstruct child_nodes
|
15890
16093
|
|
15891
16094
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location }
|
@@ -15982,7 +16185,7 @@ module Prism
|
|
15982
16185
|
visitor.visit_retry_node(self)
|
15983
16186
|
end
|
15984
16187
|
|
15985
|
-
# def child_nodes: () -> Array[
|
16188
|
+
# def child_nodes: () -> Array[Node?]
|
15986
16189
|
def child_nodes
|
15987
16190
|
[]
|
15988
16191
|
end
|
@@ -16002,7 +16205,7 @@ module Prism
|
|
16002
16205
|
RetryNode.new(source, node_id, location, flags)
|
16003
16206
|
end
|
16004
16207
|
|
16005
|
-
# def deconstruct: () -> Array[
|
16208
|
+
# def deconstruct: () -> Array[Node?]
|
16006
16209
|
alias deconstruct child_nodes
|
16007
16210
|
|
16008
16211
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
@@ -16052,7 +16255,7 @@ module Prism
|
|
16052
16255
|
visitor.visit_return_node(self)
|
16053
16256
|
end
|
16054
16257
|
|
16055
|
-
# def child_nodes: () -> Array[
|
16258
|
+
# def child_nodes: () -> Array[Node?]
|
16056
16259
|
def child_nodes
|
16057
16260
|
[arguments]
|
16058
16261
|
end
|
@@ -16074,7 +16277,7 @@ module Prism
|
|
16074
16277
|
ReturnNode.new(source, node_id, location, flags, keyword_loc, arguments)
|
16075
16278
|
end
|
16076
16279
|
|
16077
|
-
# def deconstruct: () -> Array[
|
16280
|
+
# def deconstruct: () -> Array[Node?]
|
16078
16281
|
alias deconstruct child_nodes
|
16079
16282
|
|
16080
16283
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, arguments: ArgumentsNode? }
|
@@ -16145,7 +16348,7 @@ module Prism
|
|
16145
16348
|
visitor.visit_self_node(self)
|
16146
16349
|
end
|
16147
16350
|
|
16148
|
-
# def child_nodes: () -> Array[
|
16351
|
+
# def child_nodes: () -> Array[Node?]
|
16149
16352
|
def child_nodes
|
16150
16353
|
[]
|
16151
16354
|
end
|
@@ -16165,7 +16368,7 @@ module Prism
|
|
16165
16368
|
SelfNode.new(source, node_id, location, flags)
|
16166
16369
|
end
|
16167
16370
|
|
16168
|
-
# def deconstruct: () -> Array[
|
16371
|
+
# def deconstruct: () -> Array[Node?]
|
16169
16372
|
alias deconstruct child_nodes
|
16170
16373
|
|
16171
16374
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
@@ -16215,7 +16418,7 @@ module Prism
|
|
16215
16418
|
visitor.visit_shareable_constant_node(self)
|
16216
16419
|
end
|
16217
16420
|
|
16218
|
-
# def child_nodes: () -> Array[
|
16421
|
+
# def child_nodes: () -> Array[Node?]
|
16219
16422
|
def child_nodes
|
16220
16423
|
[write]
|
16221
16424
|
end
|
@@ -16235,7 +16438,7 @@ module Prism
|
|
16235
16438
|
ShareableConstantNode.new(source, node_id, location, flags, write)
|
16236
16439
|
end
|
16237
16440
|
|
16238
|
-
# def deconstruct: () -> Array[
|
16441
|
+
# def deconstruct: () -> Array[Node?]
|
16239
16442
|
alias deconstruct child_nodes
|
16240
16443
|
|
16241
16444
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode }
|
@@ -16309,7 +16512,7 @@ module Prism
|
|
16309
16512
|
visitor.visit_singleton_class_node(self)
|
16310
16513
|
end
|
16311
16514
|
|
16312
|
-
# def child_nodes: () -> Array[
|
16515
|
+
# def child_nodes: () -> Array[Node?]
|
16313
16516
|
def child_nodes
|
16314
16517
|
[expression, body]
|
16315
16518
|
end
|
@@ -16332,7 +16535,7 @@ module Prism
|
|
16332
16535
|
SingletonClassNode.new(source, node_id, location, flags, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc)
|
16333
16536
|
end
|
16334
16537
|
|
16335
|
-
# def deconstruct: () -> Array[
|
16538
|
+
# def deconstruct: () -> Array[Node?]
|
16336
16539
|
alias deconstruct child_nodes
|
16337
16540
|
|
16338
16541
|
# 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 }
|
@@ -16450,7 +16653,7 @@ module Prism
|
|
16450
16653
|
visitor.visit_source_encoding_node(self)
|
16451
16654
|
end
|
16452
16655
|
|
16453
|
-
# def child_nodes: () -> Array[
|
16656
|
+
# def child_nodes: () -> Array[Node?]
|
16454
16657
|
def child_nodes
|
16455
16658
|
[]
|
16456
16659
|
end
|
@@ -16470,7 +16673,7 @@ module Prism
|
|
16470
16673
|
SourceEncodingNode.new(source, node_id, location, flags)
|
16471
16674
|
end
|
16472
16675
|
|
16473
|
-
# def deconstruct: () -> Array[
|
16676
|
+
# def deconstruct: () -> Array[Node?]
|
16474
16677
|
alias deconstruct child_nodes
|
16475
16678
|
|
16476
16679
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
@@ -16519,7 +16722,7 @@ module Prism
|
|
16519
16722
|
visitor.visit_source_file_node(self)
|
16520
16723
|
end
|
16521
16724
|
|
16522
|
-
# def child_nodes: () -> Array[
|
16725
|
+
# def child_nodes: () -> Array[Node?]
|
16523
16726
|
def child_nodes
|
16524
16727
|
[]
|
16525
16728
|
end
|
@@ -16539,7 +16742,7 @@ module Prism
|
|
16539
16742
|
SourceFileNode.new(source, node_id, location, flags, filepath)
|
16540
16743
|
end
|
16541
16744
|
|
16542
|
-
# def deconstruct: () -> Array[
|
16745
|
+
# def deconstruct: () -> Array[Node?]
|
16543
16746
|
alias deconstruct child_nodes
|
16544
16747
|
|
16545
16748
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, filepath: String }
|
@@ -16612,7 +16815,7 @@ module Prism
|
|
16612
16815
|
visitor.visit_source_line_node(self)
|
16613
16816
|
end
|
16614
16817
|
|
16615
|
-
# def child_nodes: () -> Array[
|
16818
|
+
# def child_nodes: () -> Array[Node?]
|
16616
16819
|
def child_nodes
|
16617
16820
|
[]
|
16618
16821
|
end
|
@@ -16632,7 +16835,7 @@ module Prism
|
|
16632
16835
|
SourceLineNode.new(source, node_id, location, flags)
|
16633
16836
|
end
|
16634
16837
|
|
16635
|
-
# def deconstruct: () -> Array[
|
16838
|
+
# def deconstruct: () -> Array[Node?]
|
16636
16839
|
alias deconstruct child_nodes
|
16637
16840
|
|
16638
16841
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
@@ -16682,7 +16885,7 @@ module Prism
|
|
16682
16885
|
visitor.visit_splat_node(self)
|
16683
16886
|
end
|
16684
16887
|
|
16685
|
-
# def child_nodes: () -> Array[
|
16888
|
+
# def child_nodes: () -> Array[Node?]
|
16686
16889
|
def child_nodes
|
16687
16890
|
[expression]
|
16688
16891
|
end
|
@@ -16704,7 +16907,7 @@ module Prism
|
|
16704
16907
|
SplatNode.new(source, node_id, location, flags, operator_loc, expression)
|
16705
16908
|
end
|
16706
16909
|
|
16707
|
-
# def deconstruct: () -> Array[
|
16910
|
+
# def deconstruct: () -> Array[Node?]
|
16708
16911
|
alias deconstruct child_nodes
|
16709
16912
|
|
16710
16913
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, expression: Prism::node? }
|
@@ -16776,7 +16979,7 @@ module Prism
|
|
16776
16979
|
visitor.visit_statements_node(self)
|
16777
16980
|
end
|
16778
16981
|
|
16779
|
-
# def child_nodes: () -> Array[
|
16982
|
+
# def child_nodes: () -> Array[Node?]
|
16780
16983
|
def child_nodes
|
16781
16984
|
[*body]
|
16782
16985
|
end
|
@@ -16796,7 +16999,7 @@ module Prism
|
|
16796
16999
|
StatementsNode.new(source, node_id, location, flags, body)
|
16797
17000
|
end
|
16798
17001
|
|
16799
|
-
# def deconstruct: () -> Array[
|
17002
|
+
# def deconstruct: () -> Array[Node?]
|
16800
17003
|
alias deconstruct child_nodes
|
16801
17004
|
|
16802
17005
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Array[Prism::node] }
|
@@ -16859,7 +17062,7 @@ module Prism
|
|
16859
17062
|
visitor.visit_string_node(self)
|
16860
17063
|
end
|
16861
17064
|
|
16862
|
-
# def child_nodes: () -> Array[
|
17065
|
+
# def child_nodes: () -> Array[Node?]
|
16863
17066
|
def child_nodes
|
16864
17067
|
[]
|
16865
17068
|
end
|
@@ -16879,7 +17082,7 @@ module Prism
|
|
16879
17082
|
StringNode.new(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped)
|
16880
17083
|
end
|
16881
17084
|
|
16882
|
-
# def deconstruct: () -> Array[
|
17085
|
+
# def deconstruct: () -> Array[Node?]
|
16883
17086
|
alias deconstruct child_nodes
|
16884
17087
|
|
16885
17088
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String }
|
@@ -17029,7 +17232,7 @@ module Prism
|
|
17029
17232
|
visitor.visit_super_node(self)
|
17030
17233
|
end
|
17031
17234
|
|
17032
|
-
# def child_nodes: () -> Array[
|
17235
|
+
# def child_nodes: () -> Array[Node?]
|
17033
17236
|
def child_nodes
|
17034
17237
|
[arguments, block]
|
17035
17238
|
end
|
@@ -17052,7 +17255,7 @@ module Prism
|
|
17052
17255
|
SuperNode.new(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc, block)
|
17053
17256
|
end
|
17054
17257
|
|
17055
|
-
# def deconstruct: () -> Array[
|
17258
|
+
# def deconstruct: () -> Array[Node?]
|
17056
17259
|
alias deconstruct child_nodes
|
17057
17260
|
|
17058
17261
|
# 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 }
|
@@ -17184,7 +17387,7 @@ module Prism
|
|
17184
17387
|
visitor.visit_symbol_node(self)
|
17185
17388
|
end
|
17186
17389
|
|
17187
|
-
# def child_nodes: () -> Array[
|
17390
|
+
# def child_nodes: () -> Array[Node?]
|
17188
17391
|
def child_nodes
|
17189
17392
|
[]
|
17190
17393
|
end
|
@@ -17204,7 +17407,7 @@ module Prism
|
|
17204
17407
|
SymbolNode.new(source, node_id, location, flags, opening_loc, value_loc, closing_loc, unescaped)
|
17205
17408
|
end
|
17206
17409
|
|
17207
|
-
# def deconstruct: () -> Array[
|
17410
|
+
# def deconstruct: () -> Array[Node?]
|
17208
17411
|
alias deconstruct child_nodes
|
17209
17412
|
|
17210
17413
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String }
|
@@ -17347,7 +17550,7 @@ module Prism
|
|
17347
17550
|
visitor.visit_true_node(self)
|
17348
17551
|
end
|
17349
17552
|
|
17350
|
-
# def child_nodes: () -> Array[
|
17553
|
+
# def child_nodes: () -> Array[Node?]
|
17351
17554
|
def child_nodes
|
17352
17555
|
[]
|
17353
17556
|
end
|
@@ -17367,7 +17570,7 @@ module Prism
|
|
17367
17570
|
TrueNode.new(source, node_id, location, flags)
|
17368
17571
|
end
|
17369
17572
|
|
17370
|
-
# def deconstruct: () -> Array[
|
17573
|
+
# def deconstruct: () -> Array[Node?]
|
17371
17574
|
alias deconstruct child_nodes
|
17372
17575
|
|
17373
17576
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location }
|
@@ -17417,7 +17620,7 @@ module Prism
|
|
17417
17620
|
visitor.visit_undef_node(self)
|
17418
17621
|
end
|
17419
17622
|
|
17420
|
-
# def child_nodes: () -> Array[
|
17623
|
+
# def child_nodes: () -> Array[Node?]
|
17421
17624
|
def child_nodes
|
17422
17625
|
[*names]
|
17423
17626
|
end
|
@@ -17437,7 +17640,7 @@ module Prism
|
|
17437
17640
|
UndefNode.new(source, node_id, location, flags, names, keyword_loc)
|
17438
17641
|
end
|
17439
17642
|
|
17440
|
-
# def deconstruct: () -> Array[
|
17643
|
+
# def deconstruct: () -> Array[Node?]
|
17441
17644
|
alias deconstruct child_nodes
|
17442
17645
|
|
17443
17646
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location }
|
@@ -17518,7 +17721,7 @@ module Prism
|
|
17518
17721
|
visitor.visit_unless_node(self)
|
17519
17722
|
end
|
17520
17723
|
|
17521
|
-
# def child_nodes: () -> Array[
|
17724
|
+
# def child_nodes: () -> Array[Node?]
|
17522
17725
|
def child_nodes
|
17523
17726
|
[predicate, statements, else_clause]
|
17524
17727
|
end
|
@@ -17542,7 +17745,7 @@ module Prism
|
|
17542
17745
|
UnlessNode.new(source, node_id, location, flags, keyword_loc, predicate, then_keyword_loc, statements, else_clause, end_keyword_loc)
|
17543
17746
|
end
|
17544
17747
|
|
17545
|
-
# def deconstruct: () -> Array[
|
17748
|
+
# def deconstruct: () -> Array[Node?]
|
17546
17749
|
alias deconstruct child_nodes
|
17547
17750
|
|
17548
17751
|
# 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? }
|
@@ -17704,7 +17907,7 @@ module Prism
|
|
17704
17907
|
visitor.visit_until_node(self)
|
17705
17908
|
end
|
17706
17909
|
|
17707
|
-
# def child_nodes: () -> Array[
|
17910
|
+
# def child_nodes: () -> Array[Node?]
|
17708
17911
|
def child_nodes
|
17709
17912
|
[predicate, statements]
|
17710
17913
|
end
|
@@ -17727,7 +17930,7 @@ module Prism
|
|
17727
17930
|
UntilNode.new(source, node_id, location, flags, keyword_loc, do_keyword_loc, closing_loc, predicate, statements)
|
17728
17931
|
end
|
17729
17932
|
|
17730
|
-
# def deconstruct: () -> Array[
|
17933
|
+
# def deconstruct: () -> Array[Node?]
|
17731
17934
|
alias deconstruct child_nodes
|
17732
17935
|
|
17733
17936
|
# 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? }
|
@@ -17864,7 +18067,7 @@ module Prism
|
|
17864
18067
|
visitor.visit_when_node(self)
|
17865
18068
|
end
|
17866
18069
|
|
17867
|
-
# def child_nodes: () -> Array[
|
18070
|
+
# def child_nodes: () -> Array[Node?]
|
17868
18071
|
def child_nodes
|
17869
18072
|
[*conditions, statements]
|
17870
18073
|
end
|
@@ -17887,7 +18090,7 @@ module Prism
|
|
17887
18090
|
WhenNode.new(source, node_id, location, flags, keyword_loc, conditions, then_keyword_loc, statements)
|
17888
18091
|
end
|
17889
18092
|
|
17890
|
-
# def deconstruct: () -> Array[
|
18093
|
+
# def deconstruct: () -> Array[Node?]
|
17891
18094
|
alias deconstruct child_nodes
|
17892
18095
|
|
17893
18096
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode? }
|
@@ -17996,7 +18199,7 @@ module Prism
|
|
17996
18199
|
visitor.visit_while_node(self)
|
17997
18200
|
end
|
17998
18201
|
|
17999
|
-
# def child_nodes: () -> Array[
|
18202
|
+
# def child_nodes: () -> Array[Node?]
|
18000
18203
|
def child_nodes
|
18001
18204
|
[predicate, statements]
|
18002
18205
|
end
|
@@ -18019,7 +18222,7 @@ module Prism
|
|
18019
18222
|
WhileNode.new(source, node_id, location, flags, keyword_loc, do_keyword_loc, closing_loc, predicate, statements)
|
18020
18223
|
end
|
18021
18224
|
|
18022
|
-
# def deconstruct: () -> Array[
|
18225
|
+
# def deconstruct: () -> Array[Node?]
|
18023
18226
|
alias deconstruct child_nodes
|
18024
18227
|
|
18025
18228
|
# 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? }
|
@@ -18154,7 +18357,7 @@ module Prism
|
|
18154
18357
|
visitor.visit_x_string_node(self)
|
18155
18358
|
end
|
18156
18359
|
|
18157
|
-
# def child_nodes: () -> Array[
|
18360
|
+
# def child_nodes: () -> Array[Node?]
|
18158
18361
|
def child_nodes
|
18159
18362
|
[]
|
18160
18363
|
end
|
@@ -18174,7 +18377,7 @@ module Prism
|
|
18174
18377
|
XStringNode.new(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped)
|
18175
18378
|
end
|
18176
18379
|
|
18177
|
-
# def deconstruct: () -> Array[
|
18380
|
+
# def deconstruct: () -> Array[Node?]
|
18178
18381
|
alias deconstruct child_nodes
|
18179
18382
|
|
18180
18383
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String }
|
@@ -18298,7 +18501,7 @@ module Prism
|
|
18298
18501
|
visitor.visit_yield_node(self)
|
18299
18502
|
end
|
18300
18503
|
|
18301
|
-
# def child_nodes: () -> Array[
|
18504
|
+
# def child_nodes: () -> Array[Node?]
|
18302
18505
|
def child_nodes
|
18303
18506
|
[arguments]
|
18304
18507
|
end
|
@@ -18320,7 +18523,7 @@ module Prism
|
|
18320
18523
|
YieldNode.new(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc)
|
18321
18524
|
end
|
18322
18525
|
|
18323
|
-
# def deconstruct: () -> Array[
|
18526
|
+
# def deconstruct: () -> Array[Node?]
|
18324
18527
|
alias deconstruct child_nodes
|
18325
18528
|
|
18326
18529
|
# def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location? }
|
@@ -18513,6 +18716,12 @@ module Prism
|
|
18513
18716
|
REPEATED_PARAMETER = 1 << 2
|
18514
18717
|
end
|
18515
18718
|
|
18719
|
+
# Flags for parentheses nodes.
|
18720
|
+
module ParenthesesNodeFlags
|
18721
|
+
# parentheses that contain multiple potentially void statements
|
18722
|
+
MULTIPLE_STATEMENTS = 1 << 2
|
18723
|
+
end
|
18724
|
+
|
18516
18725
|
# Flags for range and flip-flop nodes.
|
18517
18726
|
module RangeFlags
|
18518
18727
|
# ... operator
|