prism 1.0.0 → 1.1.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 +26 -1
- data/README.md +1 -0
- data/config.yml +257 -20
- data/docs/parsing_rules.md +4 -1
- data/ext/prism/extension.c +63 -26
- data/ext/prism/extension.h +1 -1
- data/include/prism/ast.h +559 -327
- data/include/prism/defines.h +27 -0
- data/include/prism/diagnostic.h +5 -1
- data/include/prism/options.h +39 -2
- data/include/prism/parser.h +7 -0
- data/include/prism/util/pm_string.h +27 -4
- data/include/prism/version.h +2 -2
- data/lib/prism/dot_visitor.rb +2 -0
- data/lib/prism/dsl.rb +10 -8
- data/lib/prism/ffi.rb +37 -3
- data/lib/prism/inspect_visitor.rb +1 -1
- data/lib/prism/lex_compat.rb +1 -1
- data/lib/prism/node.rb +132 -89
- data/lib/prism/parse_result.rb +1 -1
- data/lib/prism/reflection.rb +1 -1
- data/lib/prism/serialize.rb +6 -2
- data/lib/prism/translation/parser/lexer.rb +25 -3
- data/lib/prism/translation/ruby_parser.rb +7 -1
- data/prism.gemspec +1 -2
- data/rbi/prism/dsl.rbi +32 -32
- data/rbi/prism/node.rbi +69 -59
- data/rbi/prism.rbi +34 -34
- data/sig/prism/dsl.rbs +24 -24
- data/sig/prism/node.rbs +113 -105
- data/sig/prism.rbs +90 -72
- data/src/diagnostic.c +15 -7
- data/src/node.c +10 -0
- data/src/options.c +58 -27
- data/src/prettyprint.c +10 -0
- data/src/prism.c +588 -385
- data/src/util/pm_string.c +123 -65
- metadata +2 -3
- data/lib/prism/translation/parser/rubocop.rb +0 -73
data/sig/prism/node.rbs
CHANGED
@@ -137,12 +137,16 @@ module Prism
|
|
137
137
|
class ArgumentsNode < Node
|
138
138
|
include _Node
|
139
139
|
|
140
|
+
def contains_forwarding?: () -> bool
|
141
|
+
|
140
142
|
def contains_keywords?: () -> bool
|
141
143
|
|
142
144
|
def contains_keyword_splat?: () -> bool
|
143
145
|
|
144
146
|
def contains_splat?: () -> bool
|
145
147
|
|
148
|
+
def contains_multiple_splats?: () -> bool
|
149
|
+
|
146
150
|
attr_reader arguments: Array[Prism::node]
|
147
151
|
|
148
152
|
def initialize: (Source source, Integer node_id, Location location, Integer flags, Array[Prism::node] arguments) -> void
|
@@ -195,16 +199,16 @@ module Prism
|
|
195
199
|
class ArrayPatternNode < Node
|
196
200
|
include _Node
|
197
201
|
|
198
|
-
attr_reader constant:
|
202
|
+
attr_reader constant: ConstantReadNode | ConstantPathNode | nil
|
199
203
|
attr_reader requireds: Array[Prism::node]
|
200
204
|
attr_reader rest: Prism::node?
|
201
205
|
attr_reader posts: Array[Prism::node]
|
202
206
|
attr_reader opening_loc: Location?
|
203
207
|
attr_reader closing_loc: Location?
|
204
208
|
|
205
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags,
|
206
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant:
|
207
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant:
|
209
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, ConstantReadNode | ConstantPathNode | nil constant, Array[Prism::node] requireds, Prism::node? rest, Array[Prism::node] posts, Location? opening_loc, Location? closing_loc) -> void
|
210
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayPatternNode
|
211
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location? }
|
208
212
|
def opening: () -> String?
|
209
213
|
def closing: () -> String?
|
210
214
|
def type: () -> :array_pattern_node
|
@@ -494,11 +498,11 @@ module Prism
|
|
494
498
|
attr_reader opening_loc: Location?
|
495
499
|
attr_reader arguments: ArgumentsNode?
|
496
500
|
attr_reader closing_loc: Location?
|
497
|
-
attr_reader block:
|
501
|
+
attr_reader block: BlockNode | BlockArgumentNode | nil
|
498
502
|
|
499
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Prism::node? receiver, Location? call_operator_loc, Symbol name, Location? message_loc, Location? opening_loc, ArgumentsNode? arguments, Location? closing_loc,
|
500
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?block:
|
501
|
-
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:
|
503
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Prism::node? receiver, Location? call_operator_loc, Symbol name, Location? message_loc, Location? opening_loc, ArgumentsNode? arguments, Location? closing_loc, BlockNode | BlockArgumentNode | nil block) -> void
|
504
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> CallNode
|
505
|
+
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 }
|
502
506
|
def call_operator: () -> String?
|
503
507
|
def message: () -> String?
|
504
508
|
def opening: () -> String?
|
@@ -622,12 +626,12 @@ module Prism
|
|
622
626
|
include _Node
|
623
627
|
|
624
628
|
attr_reader value: Prism::node
|
625
|
-
attr_reader target:
|
629
|
+
attr_reader target: LocalVariableTargetNode
|
626
630
|
attr_reader operator_loc: Location
|
627
631
|
|
628
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Prism::node value,
|
629
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?target:
|
630
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, target:
|
632
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Prism::node value, LocalVariableTargetNode target, Location operator_loc) -> void
|
633
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?target: LocalVariableTargetNode, ?operator_loc: Location) -> CapturePatternNode
|
634
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, target: LocalVariableTargetNode, operator_loc: Location }
|
631
635
|
def operator: () -> String
|
632
636
|
def type: () -> :capture_pattern_node
|
633
637
|
| ...
|
@@ -644,14 +648,14 @@ module Prism
|
|
644
648
|
include _Node
|
645
649
|
|
646
650
|
attr_reader predicate: Prism::node?
|
647
|
-
attr_reader conditions: Array[
|
651
|
+
attr_reader conditions: Array[InNode]
|
648
652
|
attr_reader else_clause: ElseNode?
|
649
653
|
attr_reader case_keyword_loc: Location
|
650
654
|
attr_reader end_keyword_loc: Location
|
651
655
|
|
652
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Prism::node? predicate, Array[
|
653
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[
|
654
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[
|
656
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Prism::node? predicate, Array[InNode] conditions, ElseNode? else_clause, Location case_keyword_loc, Location end_keyword_loc) -> void
|
657
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[InNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseMatchNode
|
658
|
+
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 }
|
655
659
|
def case_keyword: () -> String
|
656
660
|
def end_keyword: () -> String
|
657
661
|
def type: () -> :case_match_node
|
@@ -669,14 +673,14 @@ module Prism
|
|
669
673
|
include _Node
|
670
674
|
|
671
675
|
attr_reader predicate: Prism::node?
|
672
|
-
attr_reader conditions: Array[
|
676
|
+
attr_reader conditions: Array[WhenNode]
|
673
677
|
attr_reader else_clause: ElseNode?
|
674
678
|
attr_reader case_keyword_loc: Location
|
675
679
|
attr_reader end_keyword_loc: Location
|
676
680
|
|
677
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Prism::node? predicate, Array[
|
678
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[
|
679
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[
|
681
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Prism::node? predicate, Array[WhenNode] conditions, ElseNode? else_clause, Location case_keyword_loc, Location end_keyword_loc) -> void
|
682
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[WhenNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseNode
|
683
|
+
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 }
|
680
684
|
def case_keyword: () -> String
|
681
685
|
def end_keyword: () -> String
|
682
686
|
def type: () -> :case_node
|
@@ -693,16 +697,16 @@ module Prism
|
|
693
697
|
|
694
698
|
attr_reader locals: Array[Symbol]
|
695
699
|
attr_reader class_keyword_loc: Location
|
696
|
-
attr_reader constant_path:
|
700
|
+
attr_reader constant_path: ConstantReadNode | ConstantPathNode | CallNode
|
697
701
|
attr_reader inheritance_operator_loc: Location?
|
698
702
|
attr_reader superclass: Prism::node?
|
699
|
-
attr_reader body:
|
703
|
+
attr_reader body: StatementsNode | BeginNode | nil
|
700
704
|
attr_reader end_keyword_loc: Location
|
701
705
|
attr_reader name: Symbol
|
702
706
|
|
703
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Array[Symbol] locals, Location class_keyword_loc,
|
704
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path:
|
705
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, constant_path:
|
707
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Array[Symbol] locals, Location class_keyword_loc, ConstantReadNode | ConstantPathNode | CallNode constant_path, Location? inheritance_operator_loc, Prism::node? superclass, StatementsNode | BeginNode | nil body, Location end_keyword_loc, Symbol name) -> void
|
708
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?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) -> ClassNode
|
709
|
+
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 }
|
706
710
|
def class_keyword: () -> String
|
707
711
|
def inheritance_operator: () -> String?
|
708
712
|
def end_keyword: () -> String
|
@@ -1087,7 +1091,7 @@ module Prism
|
|
1087
1091
|
attr_reader name_loc: Location
|
1088
1092
|
attr_reader receiver: Prism::node?
|
1089
1093
|
attr_reader parameters: ParametersNode?
|
1090
|
-
attr_reader body:
|
1094
|
+
attr_reader body: StatementsNode | BeginNode | nil
|
1091
1095
|
attr_reader locals: Array[Symbol]
|
1092
1096
|
attr_reader def_keyword_loc: Location
|
1093
1097
|
attr_reader operator_loc: Location?
|
@@ -1096,9 +1100,9 @@ module Prism
|
|
1096
1100
|
attr_reader equal_loc: Location?
|
1097
1101
|
attr_reader end_keyword_loc: Location?
|
1098
1102
|
|
1099
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Symbol name, Location name_loc, Prism::node? receiver, ParametersNode? parameters,
|
1100
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body:
|
1101
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body:
|
1103
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Symbol name, Location name_loc, Prism::node? receiver, ParametersNode? parameters, StatementsNode | BeginNode | nil body, Array[Symbol] locals, Location def_keyword_loc, Location? operator_loc, Location? lparen_loc, Location? rparen_loc, Location? equal_loc, Location? end_keyword_loc) -> void
|
1104
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?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?) -> DefNode
|
1105
|
+
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? }
|
1102
1106
|
def def_keyword: () -> String
|
1103
1107
|
def operator: () -> String?
|
1104
1108
|
def lparen: () -> String?
|
@@ -1183,11 +1187,11 @@ module Prism
|
|
1183
1187
|
include _Node
|
1184
1188
|
|
1185
1189
|
attr_reader operator_loc: Location
|
1186
|
-
attr_reader variable:
|
1190
|
+
attr_reader variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode
|
1187
1191
|
|
1188
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Location operator_loc,
|
1189
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?variable:
|
1190
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, variable:
|
1192
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Location operator_loc, InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode variable) -> void
|
1193
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode) -> EmbeddedVariableNode
|
1194
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode }
|
1191
1195
|
def operator: () -> String
|
1192
1196
|
def type: () -> :embedded_variable_node
|
1193
1197
|
| ...
|
@@ -1248,16 +1252,16 @@ module Prism
|
|
1248
1252
|
class FindPatternNode < Node
|
1249
1253
|
include _Node
|
1250
1254
|
|
1251
|
-
attr_reader constant:
|
1252
|
-
attr_reader left:
|
1255
|
+
attr_reader constant: ConstantReadNode | ConstantPathNode | nil
|
1256
|
+
attr_reader left: SplatNode
|
1253
1257
|
attr_reader requireds: Array[Prism::node]
|
1254
|
-
attr_reader right:
|
1258
|
+
attr_reader right: SplatNode | MissingNode
|
1255
1259
|
attr_reader opening_loc: Location?
|
1256
1260
|
attr_reader closing_loc: Location?
|
1257
1261
|
|
1258
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags,
|
1259
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant:
|
1260
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant:
|
1262
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, ConstantReadNode | ConstantPathNode | nil constant, SplatNode left, Array[Prism::node] requireds, SplatNode | MissingNode right, Location? opening_loc, Location? closing_loc) -> void
|
1263
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?left: SplatNode, ?requireds: Array[Prism::node], ?right: SplatNode | MissingNode, ?opening_loc: Location?, ?closing_loc: Location?) -> FindPatternNode
|
1264
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, left: SplatNode, requireds: Array[Prism::node], right: SplatNode | MissingNode, opening_loc: Location?, closing_loc: Location? }
|
1261
1265
|
def opening: () -> String?
|
1262
1266
|
def closing: () -> String?
|
1263
1267
|
def type: () -> :find_pattern_node
|
@@ -1311,7 +1315,7 @@ module Prism
|
|
1311
1315
|
class ForNode < Node
|
1312
1316
|
include _Node
|
1313
1317
|
|
1314
|
-
attr_reader index:
|
1318
|
+
attr_reader index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode
|
1315
1319
|
attr_reader collection: Prism::node
|
1316
1320
|
attr_reader statements: StatementsNode?
|
1317
1321
|
attr_reader for_keyword_loc: Location
|
@@ -1319,9 +1323,9 @@ module Prism
|
|
1319
1323
|
attr_reader do_keyword_loc: Location?
|
1320
1324
|
attr_reader end_keyword_loc: Location
|
1321
1325
|
|
1322
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags,
|
1323
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?index:
|
1324
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, index:
|
1326
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode index, Prism::node collection, StatementsNode? statements, Location for_keyword_loc, Location in_keyword_loc, Location? do_keyword_loc, Location end_keyword_loc) -> void
|
1327
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?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) -> ForNode
|
1328
|
+
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 }
|
1325
1329
|
def for_keyword: () -> String
|
1326
1330
|
def in_keyword: () -> String
|
1327
1331
|
def do_keyword: () -> String?
|
@@ -1532,15 +1536,15 @@ module Prism
|
|
1532
1536
|
class HashPatternNode < Node
|
1533
1537
|
include _Node
|
1534
1538
|
|
1535
|
-
attr_reader constant:
|
1539
|
+
attr_reader constant: ConstantReadNode | ConstantPathNode | nil
|
1536
1540
|
attr_reader elements: Array[AssocNode]
|
1537
1541
|
attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil
|
1538
1542
|
attr_reader opening_loc: Location?
|
1539
1543
|
attr_reader closing_loc: Location?
|
1540
1544
|
|
1541
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags,
|
1542
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant:
|
1543
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant:
|
1545
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, ConstantReadNode | ConstantPathNode | nil constant, Array[AssocNode] elements, AssocSplatNode | NoKeywordsParameterNode | nil rest, Location? opening_loc, Location? closing_loc) -> void
|
1546
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?) -> HashPatternNode
|
1547
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location? }
|
1544
1548
|
def opening: () -> String?
|
1545
1549
|
def closing: () -> String?
|
1546
1550
|
def type: () -> :hash_pattern_node
|
@@ -1609,11 +1613,11 @@ module Prism
|
|
1609
1613
|
class ImplicitNode < Node
|
1610
1614
|
include _Node
|
1611
1615
|
|
1612
|
-
attr_reader value:
|
1616
|
+
attr_reader value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode
|
1613
1617
|
|
1614
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags,
|
1615
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value:
|
1616
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value:
|
1618
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode value) -> void
|
1619
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode) -> ImplicitNode
|
1620
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode }
|
1617
1621
|
def type: () -> :implicit_node
|
1618
1622
|
| ...
|
1619
1623
|
def self.type: () -> :implicit_node
|
@@ -1686,13 +1690,13 @@ module Prism
|
|
1686
1690
|
attr_reader opening_loc: Location
|
1687
1691
|
attr_reader arguments: ArgumentsNode?
|
1688
1692
|
attr_reader closing_loc: Location
|
1689
|
-
attr_reader block:
|
1693
|
+
attr_reader block: BlockArgumentNode?
|
1690
1694
|
attr_reader operator_loc: Location
|
1691
1695
|
attr_reader value: Prism::node
|
1692
1696
|
|
1693
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc,
|
1694
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block:
|
1695
|
-
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:
|
1697
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, BlockArgumentNode? block, Location operator_loc, Prism::node value) -> void
|
1698
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexAndWriteNode
|
1699
|
+
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 }
|
1696
1700
|
def call_operator: () -> String?
|
1697
1701
|
def opening: () -> String
|
1698
1702
|
def closing: () -> String
|
@@ -1722,14 +1726,14 @@ module Prism
|
|
1722
1726
|
attr_reader opening_loc: Location
|
1723
1727
|
attr_reader arguments: ArgumentsNode?
|
1724
1728
|
attr_reader closing_loc: Location
|
1725
|
-
attr_reader block:
|
1729
|
+
attr_reader block: BlockArgumentNode?
|
1726
1730
|
attr_reader binary_operator: Symbol
|
1727
1731
|
attr_reader binary_operator_loc: Location
|
1728
1732
|
attr_reader value: Prism::node
|
1729
1733
|
|
1730
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc,
|
1731
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block:
|
1732
|
-
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:
|
1734
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, BlockArgumentNode? block, Symbol binary_operator, Location binary_operator_loc, Prism::node value) -> void
|
1735
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?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) -> IndexOperatorWriteNode
|
1736
|
+
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 }
|
1733
1737
|
def call_operator: () -> String?
|
1734
1738
|
def opening: () -> String
|
1735
1739
|
def closing: () -> String
|
@@ -1758,13 +1762,13 @@ module Prism
|
|
1758
1762
|
attr_reader opening_loc: Location
|
1759
1763
|
attr_reader arguments: ArgumentsNode?
|
1760
1764
|
attr_reader closing_loc: Location
|
1761
|
-
attr_reader block:
|
1765
|
+
attr_reader block: BlockArgumentNode?
|
1762
1766
|
attr_reader operator_loc: Location
|
1763
1767
|
attr_reader value: Prism::node
|
1764
1768
|
|
1765
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc,
|
1766
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block:
|
1767
|
-
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:
|
1769
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, BlockArgumentNode? block, Location operator_loc, Prism::node value) -> void
|
1770
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexOrWriteNode
|
1771
|
+
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 }
|
1768
1772
|
def call_operator: () -> String?
|
1769
1773
|
def opening: () -> String
|
1770
1774
|
def closing: () -> String
|
@@ -1801,11 +1805,11 @@ module Prism
|
|
1801
1805
|
attr_reader opening_loc: Location
|
1802
1806
|
attr_reader arguments: ArgumentsNode?
|
1803
1807
|
attr_reader closing_loc: Location
|
1804
|
-
attr_reader block:
|
1808
|
+
attr_reader block: BlockArgumentNode?
|
1805
1809
|
|
1806
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Prism::node receiver, Location opening_loc, ArgumentsNode? arguments, Location closing_loc,
|
1807
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block:
|
1808
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block:
|
1810
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Prism::node receiver, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, BlockArgumentNode? block) -> void
|
1811
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?) -> IndexTargetNode
|
1812
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode? }
|
1809
1813
|
def opening: () -> String
|
1810
1814
|
def closing: () -> String
|
1811
1815
|
def type: () -> :index_target_node
|
@@ -2194,12 +2198,12 @@ module Prism
|
|
2194
2198
|
attr_reader operator_loc: Location
|
2195
2199
|
attr_reader opening_loc: Location
|
2196
2200
|
attr_reader closing_loc: Location
|
2197
|
-
attr_reader parameters:
|
2198
|
-
attr_reader body:
|
2201
|
+
attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil
|
2202
|
+
attr_reader body: StatementsNode | BeginNode | nil
|
2199
2203
|
|
2200
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Array[Symbol] locals, Location operator_loc, Location opening_loc, Location closing_loc,
|
2201
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters:
|
2202
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters:
|
2204
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Array[Symbol] locals, Location operator_loc, Location opening_loc, Location closing_loc, BlockParametersNode | NumberedParametersNode | ItParametersNode | nil parameters, StatementsNode | BeginNode | nil body) -> void
|
2205
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil) -> LambdaNode
|
2206
|
+
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 }
|
2203
2207
|
def operator: () -> String
|
2204
2208
|
def opening: () -> String
|
2205
2209
|
def closing: () -> String
|
@@ -2457,14 +2461,14 @@ module Prism
|
|
2457
2461
|
|
2458
2462
|
attr_reader locals: Array[Symbol]
|
2459
2463
|
attr_reader module_keyword_loc: Location
|
2460
|
-
attr_reader constant_path:
|
2461
|
-
attr_reader body:
|
2464
|
+
attr_reader constant_path: ConstantReadNode | ConstantPathNode | MissingNode
|
2465
|
+
attr_reader body: StatementsNode | BeginNode | nil
|
2462
2466
|
attr_reader end_keyword_loc: Location
|
2463
2467
|
attr_reader name: Symbol
|
2464
2468
|
|
2465
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Array[Symbol] locals, Location module_keyword_loc,
|
2466
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path:
|
2467
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], module_keyword_loc: Location, constant_path:
|
2469
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Array[Symbol] locals, Location module_keyword_loc, ConstantReadNode | ConstantPathNode | MissingNode constant_path, StatementsNode | BeginNode | nil body, Location end_keyword_loc, Symbol name) -> void
|
2470
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | MissingNode, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ModuleNode
|
2471
|
+
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 }
|
2468
2472
|
def module_keyword: () -> String
|
2469
2473
|
def end_keyword: () -> String
|
2470
2474
|
def type: () -> :module_node
|
@@ -2486,13 +2490,13 @@ module Prism
|
|
2486
2490
|
|
2487
2491
|
attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode]
|
2488
2492
|
attr_reader rest: ImplicitRestNode | SplatNode | nil
|
2489
|
-
attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode]
|
2493
|
+
attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode]
|
2490
2494
|
attr_reader lparen_loc: Location?
|
2491
2495
|
attr_reader rparen_loc: Location?
|
2492
2496
|
|
2493
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] lefts, ImplicitRestNode | SplatNode | nil rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] rights, Location? lparen_loc, Location? rparen_loc) -> void
|
2494
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?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], ?lparen_loc: Location?, ?rparen_loc: Location?) -> MultiTargetNode
|
2495
|
-
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], lparen_loc: Location?, rparen_loc: Location? }
|
2497
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] lefts, ImplicitRestNode | SplatNode | nil rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] rights, Location? lparen_loc, Location? rparen_loc) -> void
|
2498
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?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?) -> MultiTargetNode
|
2499
|
+
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? }
|
2496
2500
|
def lparen: () -> String?
|
2497
2501
|
def rparen: () -> String?
|
2498
2502
|
def type: () -> :multi_target_node
|
@@ -2507,17 +2511,17 @@ module Prism
|
|
2507
2511
|
class MultiWriteNode < Node
|
2508
2512
|
include _Node
|
2509
2513
|
|
2510
|
-
attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode]
|
2514
|
+
attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode]
|
2511
2515
|
attr_reader rest: ImplicitRestNode | SplatNode | nil
|
2512
|
-
attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode]
|
2516
|
+
attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode]
|
2513
2517
|
attr_reader lparen_loc: Location?
|
2514
2518
|
attr_reader rparen_loc: Location?
|
2515
2519
|
attr_reader operator_loc: Location
|
2516
2520
|
attr_reader value: Prism::node
|
2517
2521
|
|
2518
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] lefts, ImplicitRestNode | SplatNode | nil rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] rights, Location? lparen_loc, Location? rparen_loc, Location operator_loc, Prism::node value) -> void
|
2519
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node) -> MultiWriteNode
|
2520
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node }
|
2522
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode] lefts, ImplicitRestNode | SplatNode | nil rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode] rights, Location? lparen_loc, Location? rparen_loc, Location operator_loc, Prism::node value) -> void
|
2523
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?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) -> MultiWriteNode
|
2524
|
+
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 }
|
2521
2525
|
def lparen: () -> String?
|
2522
2526
|
def rparen: () -> String?
|
2523
2527
|
def operator: () -> String
|
@@ -2757,12 +2761,12 @@ module Prism
|
|
2757
2761
|
class PinnedVariableNode < Node
|
2758
2762
|
include _Node
|
2759
2763
|
|
2760
|
-
attr_reader variable:
|
2764
|
+
attr_reader variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode
|
2761
2765
|
attr_reader operator_loc: Location
|
2762
2766
|
|
2763
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags,
|
2764
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?variable:
|
2765
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, variable:
|
2767
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode variable, Location operator_loc) -> void
|
2768
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, ?operator_loc: Location) -> PinnedVariableNode
|
2769
|
+
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, operator_loc: Location }
|
2766
2770
|
def operator: () -> String
|
2767
2771
|
def type: () -> :pinned_variable_node
|
2768
2772
|
| ...
|
@@ -3018,13 +3022,13 @@ module Prism
|
|
3018
3022
|
attr_reader keyword_loc: Location
|
3019
3023
|
attr_reader exceptions: Array[Prism::node]
|
3020
3024
|
attr_reader operator_loc: Location?
|
3021
|
-
attr_reader reference:
|
3025
|
+
attr_reader reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil
|
3022
3026
|
attr_reader statements: StatementsNode?
|
3023
3027
|
attr_reader subsequent: RescueNode?
|
3024
3028
|
|
3025
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Location keyword_loc, Array[Prism::node] exceptions, Location? operator_loc,
|
3026
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference:
|
3027
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference:
|
3029
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Location keyword_loc, Array[Prism::node] exceptions, Location? operator_loc, LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil reference, StatementsNode? statements, RescueNode? subsequent) -> void
|
3030
|
+
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
|
3031
|
+
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? }
|
3028
3032
|
def keyword: () -> String
|
3029
3033
|
def operator: () -> String?
|
3030
3034
|
def type: () -> :rescue_node
|
@@ -3141,12 +3145,12 @@ module Prism
|
|
3141
3145
|
attr_reader class_keyword_loc: Location
|
3142
3146
|
attr_reader operator_loc: Location
|
3143
3147
|
attr_reader expression: Prism::node
|
3144
|
-
attr_reader body:
|
3148
|
+
attr_reader body: StatementsNode | BeginNode | nil
|
3145
3149
|
attr_reader end_keyword_loc: Location
|
3146
3150
|
|
3147
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Array[Symbol] locals, Location class_keyword_loc, Location operator_loc, Prism::node expression,
|
3148
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body:
|
3149
|
-
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:
|
3151
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Array[Symbol] locals, Location class_keyword_loc, Location operator_loc, Prism::node expression, StatementsNode | BeginNode | nil body, Location end_keyword_loc) -> void
|
3152
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location) -> SingletonClassNode
|
3153
|
+
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 }
|
3150
3154
|
def class_keyword: () -> String
|
3151
3155
|
def operator: () -> String
|
3152
3156
|
def end_keyword: () -> String
|
@@ -3299,11 +3303,11 @@ module Prism
|
|
3299
3303
|
attr_reader lparen_loc: Location?
|
3300
3304
|
attr_reader arguments: ArgumentsNode?
|
3301
3305
|
attr_reader rparen_loc: Location?
|
3302
|
-
attr_reader block:
|
3306
|
+
attr_reader block: BlockNode | BlockArgumentNode | nil
|
3303
3307
|
|
3304
|
-
def initialize: (Source source, Integer node_id, Location location, Integer flags, Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc,
|
3305
|
-
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block:
|
3306
|
-
def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block:
|
3308
|
+
def initialize: (Source source, Integer node_id, Location location, Integer flags, Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, BlockNode | BlockArgumentNode | nil block) -> void
|
3309
|
+
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> SuperNode
|
3310
|
+
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 }
|
3307
3311
|
def keyword: () -> String
|
3308
3312
|
def lparen: () -> String?
|
3309
3313
|
def rparen: () -> String?
|
@@ -3537,12 +3541,16 @@ module Prism
|
|
3537
3541
|
|
3538
3542
|
# Flags for arguments nodes.
|
3539
3543
|
module ArgumentsNodeFlags
|
3540
|
-
# if arguments contain
|
3544
|
+
# if the arguments contain forwarding
|
3545
|
+
CONTAINS_FORWARDING: Integer
|
3546
|
+
# if the arguments contain keywords
|
3541
3547
|
CONTAINS_KEYWORDS: Integer
|
3542
|
-
# if arguments contain keyword splat
|
3548
|
+
# if the arguments contain a keyword splat
|
3543
3549
|
CONTAINS_KEYWORD_SPLAT: Integer
|
3544
|
-
# if arguments contain splat
|
3550
|
+
# if the arguments contain a splat
|
3545
3551
|
CONTAINS_SPLAT: Integer
|
3552
|
+
# if the arguments contain multiple splats
|
3553
|
+
CONTAINS_MULTIPLE_SPLATS: Integer
|
3546
3554
|
end
|
3547
3555
|
|
3548
3556
|
# Flags for array nodes.
|