prism 0.24.0 → 0.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/BSDmakefile +58 -0
- data/CHANGELOG.md +69 -1
- data/Makefile +22 -16
- data/README.md +45 -6
- data/config.yml +510 -4
- data/docs/build_system.md +31 -0
- data/docs/configuration.md +3 -0
- data/docs/cruby_compilation.md +1 -1
- data/docs/parser_translation.md +14 -9
- data/docs/releasing.md +7 -9
- data/docs/ripper_translation.md +50 -0
- data/docs/ruby_api.md +1 -0
- data/docs/serialization.md +26 -5
- data/ext/prism/api_node.c +911 -815
- data/ext/prism/api_pack.c +9 -0
- data/ext/prism/extconf.rb +34 -13
- data/ext/prism/extension.c +341 -68
- data/ext/prism/extension.h +5 -4
- data/include/prism/ast.h +213 -64
- data/include/prism/defines.h +106 -2
- data/include/prism/diagnostic.h +146 -72
- data/include/prism/encoding.h +22 -4
- data/include/prism/node.h +93 -0
- data/include/prism/options.h +82 -7
- data/include/prism/pack.h +11 -0
- data/include/prism/parser.h +203 -54
- data/include/prism/prettyprint.h +8 -0
- data/include/prism/static_literals.h +118 -0
- data/include/prism/util/pm_buffer.h +65 -2
- data/include/prism/util/pm_constant_pool.h +18 -1
- data/include/prism/util/pm_integer.h +119 -0
- data/include/prism/util/pm_list.h +1 -1
- data/include/prism/util/pm_newline_list.h +8 -0
- data/include/prism/util/pm_string.h +26 -2
- data/include/prism/version.h +2 -2
- data/include/prism.h +59 -1
- data/lib/prism/compiler.rb +8 -1
- data/lib/prism/debug.rb +46 -3
- data/lib/prism/desugar_compiler.rb +4 -2
- data/lib/prism/dispatcher.rb +29 -0
- data/lib/prism/dot_visitor.rb +87 -16
- data/lib/prism/dsl.rb +24 -12
- data/lib/prism/ffi.rb +77 -12
- data/lib/prism/lex_compat.rb +17 -15
- data/lib/prism/mutation_compiler.rb +11 -0
- data/lib/prism/node.rb +2112 -2499
- data/lib/prism/node_ext.rb +77 -29
- data/lib/prism/pack.rb +4 -0
- data/lib/prism/parse_result/comments.rb +34 -17
- data/lib/prism/parse_result/newlines.rb +3 -1
- data/lib/prism/parse_result.rb +83 -32
- data/lib/prism/pattern.rb +16 -4
- data/lib/prism/polyfill/string.rb +12 -0
- data/lib/prism/reflection.rb +421 -0
- data/lib/prism/serialize.rb +450 -102
- data/lib/prism/translation/parser/compiler.rb +189 -50
- data/lib/prism/translation/parser/lexer.rb +103 -22
- data/lib/prism/translation/parser/rubocop.rb +41 -13
- data/lib/prism/translation/parser.rb +119 -7
- data/lib/prism/translation/parser33.rb +1 -1
- data/lib/prism/translation/parser34.rb +1 -1
- data/lib/prism/translation/ripper/sexp.rb +125 -0
- data/lib/prism/translation/ripper/shim.rb +5 -0
- data/lib/prism/translation/ripper.rb +3212 -462
- data/lib/prism/translation/ruby_parser.rb +35 -18
- data/lib/prism/translation.rb +3 -1
- data/lib/prism/visitor.rb +10 -0
- data/lib/prism.rb +9 -18
- data/prism.gemspec +39 -6
- data/rbi/prism/compiler.rbi +14 -0
- data/rbi/prism/desugar_compiler.rbi +5 -0
- data/rbi/prism/mutation_compiler.rbi +5 -0
- data/rbi/prism/node.rbi +8674 -0
- data/rbi/prism/node_ext.rbi +102 -0
- data/rbi/prism/parse_result.rbi +307 -0
- data/rbi/prism/reflection.rbi +64 -0
- data/rbi/prism/translation/parser/compiler.rbi +13 -0
- data/rbi/prism/translation/parser.rbi +11 -0
- data/rbi/prism/translation/parser33.rbi +6 -0
- data/rbi/prism/translation/parser34.rbi +6 -0
- data/rbi/prism/translation/ripper/ripper_compiler.rbi +5 -0
- data/rbi/prism/translation/ripper.rbi +25 -0
- data/rbi/prism/translation/ruby_parser.rbi +11 -0
- data/rbi/prism/visitor.rbi +470 -0
- data/rbi/prism.rbi +38 -7748
- data/sig/prism/compiler.rbs +9 -0
- data/sig/prism/dispatcher.rbs +16 -0
- data/sig/prism/dot_visitor.rbs +6 -0
- data/sig/prism/dsl.rbs +462 -0
- data/sig/prism/mutation_compiler.rbs +158 -0
- data/sig/prism/node.rbs +3538 -0
- data/sig/prism/node_ext.rbs +78 -0
- data/sig/prism/pack.rbs +43 -0
- data/sig/prism/parse_result.rbs +128 -0
- data/sig/prism/pattern.rbs +13 -0
- data/sig/prism/reflection.rbs +56 -0
- data/sig/prism/serialize.rbs +7 -0
- data/sig/prism/visitor.rbs +168 -0
- data/sig/prism.rbs +188 -4767
- data/src/diagnostic.c +597 -230
- data/src/encoding.c +211 -108
- data/src/node.c +7526 -447
- data/src/options.c +66 -31
- data/src/pack.c +33 -17
- data/src/prettyprint.c +1294 -1385
- data/src/prism.c +4015 -1149
- data/src/regexp.c +17 -2
- data/src/serialize.c +47 -28
- data/src/static_literals.c +552 -0
- data/src/token_type.c +4 -3
- data/src/util/pm_buffer.c +147 -20
- data/src/util/pm_char.c +4 -4
- data/src/util/pm_constant_pool.c +35 -11
- data/src/util/pm_integer.c +635 -0
- data/src/util/pm_list.c +1 -1
- data/src/util/pm_newline_list.c +14 -5
- data/src/util/pm_string.c +134 -5
- data/src/util/pm_string_list.c +2 -2
- metadata +41 -8
- data/docs/ripper.md +0 -36
- data/include/prism/util/pm_state_stack.h +0 -42
- data/rbi/prism_static.rbi +0 -207
- data/sig/prism_static.rbs +0 -201
- data/src/util/pm_state_stack.c +0 -25
@@ -0,0 +1,16 @@
|
|
1
|
+
module Prism
|
2
|
+
class Dispatcher < Visitor
|
3
|
+
attr_reader listeners: Hash[Symbol, Array[untyped]]
|
4
|
+
|
5
|
+
def initialize: () -> void
|
6
|
+
def register: (untyped, *Symbol) -> void
|
7
|
+
def dispatch: (Prism::node) -> void
|
8
|
+
def dispatch_once: (Prism::node) -> void
|
9
|
+
|
10
|
+
class DispatchOnce < Visitor
|
11
|
+
attr_reader listeners: Hash[Symbol, Array[untyped]]
|
12
|
+
|
13
|
+
def initialize: (Hash[Symbol, Array[untyped]]) -> void
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/sig/prism/dsl.rbs
ADDED
@@ -0,0 +1,462 @@
|
|
1
|
+
# This file is generated by the templates/template.rb script and should not be
|
2
|
+
# modified manually. See templates/sig/prism/dsl.rbs.erb
|
3
|
+
# if you are looking to modify the template
|
4
|
+
|
5
|
+
module Prism
|
6
|
+
module DSL
|
7
|
+
private
|
8
|
+
|
9
|
+
# Create a new Location object
|
10
|
+
def Location: (?Source source, ?Integer start_offset, ?Integer length) -> Location
|
11
|
+
|
12
|
+
# Create a new AliasGlobalVariableNode node
|
13
|
+
def AliasGlobalVariableNode: (Prism::node new_name, Prism::node old_name, Location keyword_loc, ?Source source, ?Location location) -> AliasGlobalVariableNode
|
14
|
+
|
15
|
+
# Create a new AliasMethodNode node
|
16
|
+
def AliasMethodNode: (Prism::node new_name, Prism::node old_name, Location keyword_loc, ?Source source, ?Location location) -> AliasMethodNode
|
17
|
+
|
18
|
+
# Create a new AlternationPatternNode node
|
19
|
+
def AlternationPatternNode: (Prism::node left, Prism::node right, Location operator_loc, ?Source source, ?Location location) -> AlternationPatternNode
|
20
|
+
|
21
|
+
# Create a new AndNode node
|
22
|
+
def AndNode: (Prism::node left, Prism::node right, Location operator_loc, ?Source source, ?Location location) -> AndNode
|
23
|
+
|
24
|
+
# Create a new ArgumentsNode node
|
25
|
+
def ArgumentsNode: (Integer flags, Array[Prism::node] arguments, ?Source source, ?Location location) -> ArgumentsNode
|
26
|
+
|
27
|
+
# Create a new ArrayNode node
|
28
|
+
def ArrayNode: (Integer flags, Array[Prism::node] elements, Location? opening_loc, Location? closing_loc, ?Source source, ?Location location) -> ArrayNode
|
29
|
+
|
30
|
+
# Create a new ArrayPatternNode node
|
31
|
+
def ArrayPatternNode: (Prism::node? constant, Array[Prism::node] requireds, Prism::node? rest, Array[Prism::node] posts, Location? opening_loc, Location? closing_loc, ?Source source, ?Location location) -> ArrayPatternNode
|
32
|
+
|
33
|
+
# Create a new AssocNode node
|
34
|
+
def AssocNode: (Prism::node key, Prism::node value, Location? operator_loc, ?Source source, ?Location location) -> AssocNode
|
35
|
+
|
36
|
+
# Create a new AssocSplatNode node
|
37
|
+
def AssocSplatNode: (Prism::node? value, Location operator_loc, ?Source source, ?Location location) -> AssocSplatNode
|
38
|
+
|
39
|
+
# Create a new BackReferenceReadNode node
|
40
|
+
def BackReferenceReadNode: (Symbol name, ?Source source, ?Location location) -> BackReferenceReadNode
|
41
|
+
|
42
|
+
# Create a new BeginNode node
|
43
|
+
def BeginNode: (Location? begin_keyword_loc, StatementsNode? statements, RescueNode? rescue_clause, ElseNode? else_clause, EnsureNode? ensure_clause, Location? end_keyword_loc, ?Source source, ?Location location) -> BeginNode
|
44
|
+
|
45
|
+
# Create a new BlockArgumentNode node
|
46
|
+
def BlockArgumentNode: (Prism::node? expression, Location operator_loc, ?Source source, ?Location location) -> BlockArgumentNode
|
47
|
+
|
48
|
+
# Create a new BlockLocalVariableNode node
|
49
|
+
def BlockLocalVariableNode: (Integer flags, Symbol name, ?Source source, ?Location location) -> BlockLocalVariableNode
|
50
|
+
|
51
|
+
# Create a new BlockNode node
|
52
|
+
def BlockNode: (Array[Symbol] locals, Prism::node? parameters, Prism::node? body, Location opening_loc, Location closing_loc, ?Source source, ?Location location) -> BlockNode
|
53
|
+
|
54
|
+
# Create a new BlockParameterNode node
|
55
|
+
def BlockParameterNode: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, ?Source source, ?Location location) -> BlockParameterNode
|
56
|
+
|
57
|
+
# Create a new BlockParametersNode node
|
58
|
+
def BlockParametersNode: (ParametersNode? parameters, Array[BlockLocalVariableNode] locals, Location? opening_loc, Location? closing_loc, ?Source source, ?Location location) -> BlockParametersNode
|
59
|
+
|
60
|
+
# Create a new BreakNode node
|
61
|
+
def BreakNode: (ArgumentsNode? arguments, Location keyword_loc, ?Source source, ?Location location) -> BreakNode
|
62
|
+
|
63
|
+
# Create a new CallAndWriteNode node
|
64
|
+
def CallAndWriteNode: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> CallAndWriteNode
|
65
|
+
|
66
|
+
# Create a new CallNode node
|
67
|
+
def CallNode: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Symbol name, Location? message_loc, Location? opening_loc, ArgumentsNode? arguments, Location? closing_loc, Prism::node? block, ?Source source, ?Location location) -> CallNode
|
68
|
+
|
69
|
+
# Create a new CallOperatorWriteNode node
|
70
|
+
def CallOperatorWriteNode: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol operator, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> CallOperatorWriteNode
|
71
|
+
|
72
|
+
# Create a new CallOrWriteNode node
|
73
|
+
def CallOrWriteNode: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> CallOrWriteNode
|
74
|
+
|
75
|
+
# Create a new CallTargetNode node
|
76
|
+
def CallTargetNode: (Integer flags, Prism::node receiver, Location call_operator_loc, Symbol name, Location message_loc, ?Source source, ?Location location) -> CallTargetNode
|
77
|
+
|
78
|
+
# Create a new CapturePatternNode node
|
79
|
+
def CapturePatternNode: (Prism::node value, Prism::node target, Location operator_loc, ?Source source, ?Location location) -> CapturePatternNode
|
80
|
+
|
81
|
+
# Create a new CaseMatchNode node
|
82
|
+
def CaseMatchNode: (Prism::node? predicate, Array[Prism::node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, ?Source source, ?Location location) -> CaseMatchNode
|
83
|
+
|
84
|
+
# Create a new CaseNode node
|
85
|
+
def CaseNode: (Prism::node? predicate, Array[Prism::node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, ?Source source, ?Location location) -> CaseNode
|
86
|
+
|
87
|
+
# Create a new ClassNode node
|
88
|
+
def ClassNode: (Array[Symbol] locals, Location class_keyword_loc, Prism::node constant_path, Location? inheritance_operator_loc, Prism::node? superclass, Prism::node? body, Location end_keyword_loc, Symbol name, ?Source source, ?Location location) -> ClassNode
|
89
|
+
|
90
|
+
# Create a new ClassVariableAndWriteNode node
|
91
|
+
def ClassVariableAndWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> ClassVariableAndWriteNode
|
92
|
+
|
93
|
+
# Create a new ClassVariableOperatorWriteNode node
|
94
|
+
def ClassVariableOperatorWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, ?Source source, ?Location location) -> ClassVariableOperatorWriteNode
|
95
|
+
|
96
|
+
# Create a new ClassVariableOrWriteNode node
|
97
|
+
def ClassVariableOrWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> ClassVariableOrWriteNode
|
98
|
+
|
99
|
+
# Create a new ClassVariableReadNode node
|
100
|
+
def ClassVariableReadNode: (Symbol name, ?Source source, ?Location location) -> ClassVariableReadNode
|
101
|
+
|
102
|
+
# Create a new ClassVariableTargetNode node
|
103
|
+
def ClassVariableTargetNode: (Symbol name, ?Source source, ?Location location) -> ClassVariableTargetNode
|
104
|
+
|
105
|
+
# Create a new ClassVariableWriteNode node
|
106
|
+
def ClassVariableWriteNode: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, ?Source source, ?Location location) -> ClassVariableWriteNode
|
107
|
+
|
108
|
+
# Create a new ConstantAndWriteNode node
|
109
|
+
def ConstantAndWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> ConstantAndWriteNode
|
110
|
+
|
111
|
+
# Create a new ConstantOperatorWriteNode node
|
112
|
+
def ConstantOperatorWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, ?Source source, ?Location location) -> ConstantOperatorWriteNode
|
113
|
+
|
114
|
+
# Create a new ConstantOrWriteNode node
|
115
|
+
def ConstantOrWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> ConstantOrWriteNode
|
116
|
+
|
117
|
+
# Create a new ConstantPathAndWriteNode node
|
118
|
+
def ConstantPathAndWriteNode: (ConstantPathNode target, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> ConstantPathAndWriteNode
|
119
|
+
|
120
|
+
# Create a new ConstantPathNode node
|
121
|
+
def ConstantPathNode: (Prism::node? parent, ConstantReadNode | MissingNode child, Location delimiter_loc, ?Source source, ?Location location) -> ConstantPathNode
|
122
|
+
|
123
|
+
# Create a new ConstantPathOperatorWriteNode node
|
124
|
+
def ConstantPathOperatorWriteNode: (ConstantPathNode target, Location operator_loc, Prism::node value, Symbol operator, ?Source source, ?Location location) -> ConstantPathOperatorWriteNode
|
125
|
+
|
126
|
+
# Create a new ConstantPathOrWriteNode node
|
127
|
+
def ConstantPathOrWriteNode: (ConstantPathNode target, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> ConstantPathOrWriteNode
|
128
|
+
|
129
|
+
# Create a new ConstantPathTargetNode node
|
130
|
+
def ConstantPathTargetNode: (Prism::node? parent, ConstantReadNode | MissingNode child, Location delimiter_loc, ?Source source, ?Location location) -> ConstantPathTargetNode
|
131
|
+
|
132
|
+
# Create a new ConstantPathWriteNode node
|
133
|
+
def ConstantPathWriteNode: (ConstantPathNode target, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> ConstantPathWriteNode
|
134
|
+
|
135
|
+
# Create a new ConstantReadNode node
|
136
|
+
def ConstantReadNode: (Symbol name, ?Source source, ?Location location) -> ConstantReadNode
|
137
|
+
|
138
|
+
# Create a new ConstantTargetNode node
|
139
|
+
def ConstantTargetNode: (Symbol name, ?Source source, ?Location location) -> ConstantTargetNode
|
140
|
+
|
141
|
+
# Create a new ConstantWriteNode node
|
142
|
+
def ConstantWriteNode: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, ?Source source, ?Location location) -> ConstantWriteNode
|
143
|
+
|
144
|
+
# Create a new DefNode node
|
145
|
+
def DefNode: (Symbol name, Location name_loc, Prism::node? receiver, ParametersNode? parameters, Prism::node? body, Array[Symbol] locals, Location def_keyword_loc, Location? operator_loc, Location? lparen_loc, Location? rparen_loc, Location? equal_loc, Location? end_keyword_loc, ?Source source, ?Location location) -> DefNode
|
146
|
+
|
147
|
+
# Create a new DefinedNode node
|
148
|
+
def DefinedNode: (Location? lparen_loc, Prism::node value, Location? rparen_loc, Location keyword_loc, ?Source source, ?Location location) -> DefinedNode
|
149
|
+
|
150
|
+
# Create a new ElseNode node
|
151
|
+
def ElseNode: (Location else_keyword_loc, StatementsNode? statements, Location? end_keyword_loc, ?Source source, ?Location location) -> ElseNode
|
152
|
+
|
153
|
+
# Create a new EmbeddedStatementsNode node
|
154
|
+
def EmbeddedStatementsNode: (Location opening_loc, StatementsNode? statements, Location closing_loc, ?Source source, ?Location location) -> EmbeddedStatementsNode
|
155
|
+
|
156
|
+
# Create a new EmbeddedVariableNode node
|
157
|
+
def EmbeddedVariableNode: (Location operator_loc, Prism::node variable, ?Source source, ?Location location) -> EmbeddedVariableNode
|
158
|
+
|
159
|
+
# Create a new EnsureNode node
|
160
|
+
def EnsureNode: (Location ensure_keyword_loc, StatementsNode? statements, Location end_keyword_loc, ?Source source, ?Location location) -> EnsureNode
|
161
|
+
|
162
|
+
# Create a new FalseNode node
|
163
|
+
def FalseNode: (?Source source, ?Location location) -> FalseNode
|
164
|
+
|
165
|
+
# Create a new FindPatternNode node
|
166
|
+
def FindPatternNode: (Prism::node? constant, Prism::node left, Array[Prism::node] requireds, Prism::node right, Location? opening_loc, Location? closing_loc, ?Source source, ?Location location) -> FindPatternNode
|
167
|
+
|
168
|
+
# Create a new FlipFlopNode node
|
169
|
+
def FlipFlopNode: (Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, ?Source source, ?Location location) -> FlipFlopNode
|
170
|
+
|
171
|
+
# Create a new FloatNode node
|
172
|
+
def FloatNode: (Float value, ?Source source, ?Location location) -> FloatNode
|
173
|
+
|
174
|
+
# Create a new ForNode node
|
175
|
+
def ForNode: (Prism::node index, Prism::node collection, StatementsNode? statements, Location for_keyword_loc, Location in_keyword_loc, Location? do_keyword_loc, Location end_keyword_loc, ?Source source, ?Location location) -> ForNode
|
176
|
+
|
177
|
+
# Create a new ForwardingArgumentsNode node
|
178
|
+
def ForwardingArgumentsNode: (?Source source, ?Location location) -> ForwardingArgumentsNode
|
179
|
+
|
180
|
+
# Create a new ForwardingParameterNode node
|
181
|
+
def ForwardingParameterNode: (?Source source, ?Location location) -> ForwardingParameterNode
|
182
|
+
|
183
|
+
# Create a new ForwardingSuperNode node
|
184
|
+
def ForwardingSuperNode: (BlockNode? block, ?Source source, ?Location location) -> ForwardingSuperNode
|
185
|
+
|
186
|
+
# Create a new GlobalVariableAndWriteNode node
|
187
|
+
def GlobalVariableAndWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> GlobalVariableAndWriteNode
|
188
|
+
|
189
|
+
# Create a new GlobalVariableOperatorWriteNode node
|
190
|
+
def GlobalVariableOperatorWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, ?Source source, ?Location location) -> GlobalVariableOperatorWriteNode
|
191
|
+
|
192
|
+
# Create a new GlobalVariableOrWriteNode node
|
193
|
+
def GlobalVariableOrWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> GlobalVariableOrWriteNode
|
194
|
+
|
195
|
+
# Create a new GlobalVariableReadNode node
|
196
|
+
def GlobalVariableReadNode: (Symbol name, ?Source source, ?Location location) -> GlobalVariableReadNode
|
197
|
+
|
198
|
+
# Create a new GlobalVariableTargetNode node
|
199
|
+
def GlobalVariableTargetNode: (Symbol name, ?Source source, ?Location location) -> GlobalVariableTargetNode
|
200
|
+
|
201
|
+
# Create a new GlobalVariableWriteNode node
|
202
|
+
def GlobalVariableWriteNode: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, ?Source source, ?Location location) -> GlobalVariableWriteNode
|
203
|
+
|
204
|
+
# Create a new HashNode node
|
205
|
+
def HashNode: (Location opening_loc, Array[AssocNode | AssocSplatNode] elements, Location closing_loc, ?Source source, ?Location location) -> HashNode
|
206
|
+
|
207
|
+
# Create a new HashPatternNode node
|
208
|
+
def HashPatternNode: (Prism::node? constant, Array[AssocNode] elements, AssocSplatNode | NoKeywordsParameterNode | nil rest, Location? opening_loc, Location? closing_loc, ?Source source, ?Location location) -> HashPatternNode
|
209
|
+
|
210
|
+
# Create a new IfNode node
|
211
|
+
def IfNode: (Location? if_keyword_loc, Prism::node predicate, Location? then_keyword_loc, StatementsNode? statements, Prism::node? consequent, Location? end_keyword_loc, ?Source source, ?Location location) -> IfNode
|
212
|
+
|
213
|
+
# Create a new ImaginaryNode node
|
214
|
+
def ImaginaryNode: (FloatNode | IntegerNode | RationalNode numeric, ?Source source, ?Location location) -> ImaginaryNode
|
215
|
+
|
216
|
+
# Create a new ImplicitNode node
|
217
|
+
def ImplicitNode: (Prism::node value, ?Source source, ?Location location) -> ImplicitNode
|
218
|
+
|
219
|
+
# Create a new ImplicitRestNode node
|
220
|
+
def ImplicitRestNode: (?Source source, ?Location location) -> ImplicitRestNode
|
221
|
+
|
222
|
+
# Create a new InNode node
|
223
|
+
def InNode: (Prism::node pattern, StatementsNode? statements, Location in_loc, Location? then_loc, ?Source source, ?Location location) -> InNode
|
224
|
+
|
225
|
+
# Create a new IndexAndWriteNode node
|
226
|
+
def IndexAndWriteNode: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> IndexAndWriteNode
|
227
|
+
|
228
|
+
# Create a new IndexOperatorWriteNode node
|
229
|
+
def IndexOperatorWriteNode: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Symbol operator, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> IndexOperatorWriteNode
|
230
|
+
|
231
|
+
# Create a new IndexOrWriteNode node
|
232
|
+
def IndexOrWriteNode: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> IndexOrWriteNode
|
233
|
+
|
234
|
+
# Create a new IndexTargetNode node
|
235
|
+
def IndexTargetNode: (Integer flags, Prism::node receiver, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, ?Source source, ?Location location) -> IndexTargetNode
|
236
|
+
|
237
|
+
# Create a new InstanceVariableAndWriteNode node
|
238
|
+
def InstanceVariableAndWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> InstanceVariableAndWriteNode
|
239
|
+
|
240
|
+
# Create a new InstanceVariableOperatorWriteNode node
|
241
|
+
def InstanceVariableOperatorWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, ?Source source, ?Location location) -> InstanceVariableOperatorWriteNode
|
242
|
+
|
243
|
+
# Create a new InstanceVariableOrWriteNode node
|
244
|
+
def InstanceVariableOrWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> InstanceVariableOrWriteNode
|
245
|
+
|
246
|
+
# Create a new InstanceVariableReadNode node
|
247
|
+
def InstanceVariableReadNode: (Symbol name, ?Source source, ?Location location) -> InstanceVariableReadNode
|
248
|
+
|
249
|
+
# Create a new InstanceVariableTargetNode node
|
250
|
+
def InstanceVariableTargetNode: (Symbol name, ?Source source, ?Location location) -> InstanceVariableTargetNode
|
251
|
+
|
252
|
+
# Create a new InstanceVariableWriteNode node
|
253
|
+
def InstanceVariableWriteNode: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, ?Source source, ?Location location) -> InstanceVariableWriteNode
|
254
|
+
|
255
|
+
# Create a new IntegerNode node
|
256
|
+
def IntegerNode: (Integer flags, Integer value, ?Source source, ?Location location) -> IntegerNode
|
257
|
+
|
258
|
+
# Create a new InterpolatedMatchLastLineNode node
|
259
|
+
def InterpolatedMatchLastLineNode: (Integer flags, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, ?Source source, ?Location location) -> InterpolatedMatchLastLineNode
|
260
|
+
|
261
|
+
# Create a new InterpolatedRegularExpressionNode node
|
262
|
+
def InterpolatedRegularExpressionNode: (Integer flags, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, ?Source source, ?Location location) -> InterpolatedRegularExpressionNode
|
263
|
+
|
264
|
+
# Create a new InterpolatedStringNode node
|
265
|
+
def InterpolatedStringNode: (Integer flags, Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] parts, Location? closing_loc, ?Source source, ?Location location) -> InterpolatedStringNode
|
266
|
+
|
267
|
+
# Create a new InterpolatedSymbolNode node
|
268
|
+
def InterpolatedSymbolNode: (Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location? closing_loc, ?Source source, ?Location location) -> InterpolatedSymbolNode
|
269
|
+
|
270
|
+
# Create a new InterpolatedXStringNode node
|
271
|
+
def InterpolatedXStringNode: (Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, ?Source source, ?Location location) -> InterpolatedXStringNode
|
272
|
+
|
273
|
+
# Create a new ItParametersNode node
|
274
|
+
def ItParametersNode: (?Source source, ?Location location) -> ItParametersNode
|
275
|
+
|
276
|
+
# Create a new KeywordHashNode node
|
277
|
+
def KeywordHashNode: (Integer flags, Array[AssocNode | AssocSplatNode] elements, ?Source source, ?Location location) -> KeywordHashNode
|
278
|
+
|
279
|
+
# Create a new KeywordRestParameterNode node
|
280
|
+
def KeywordRestParameterNode: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, ?Source source, ?Location location) -> KeywordRestParameterNode
|
281
|
+
|
282
|
+
# Create a new LambdaNode node
|
283
|
+
def LambdaNode: (Array[Symbol] locals, Location operator_loc, Location opening_loc, Location closing_loc, Prism::node? parameters, Prism::node? body, ?Source source, ?Location location) -> LambdaNode
|
284
|
+
|
285
|
+
# Create a new LocalVariableAndWriteNode node
|
286
|
+
def LocalVariableAndWriteNode: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, ?Source source, ?Location location) -> LocalVariableAndWriteNode
|
287
|
+
|
288
|
+
# Create a new LocalVariableOperatorWriteNode node
|
289
|
+
def LocalVariableOperatorWriteNode: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Symbol operator, Integer depth, ?Source source, ?Location location) -> LocalVariableOperatorWriteNode
|
290
|
+
|
291
|
+
# Create a new LocalVariableOrWriteNode node
|
292
|
+
def LocalVariableOrWriteNode: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, ?Source source, ?Location location) -> LocalVariableOrWriteNode
|
293
|
+
|
294
|
+
# Create a new LocalVariableReadNode node
|
295
|
+
def LocalVariableReadNode: (Symbol name, Integer depth, ?Source source, ?Location location) -> LocalVariableReadNode
|
296
|
+
|
297
|
+
# Create a new LocalVariableTargetNode node
|
298
|
+
def LocalVariableTargetNode: (Symbol name, Integer depth, ?Source source, ?Location location) -> LocalVariableTargetNode
|
299
|
+
|
300
|
+
# Create a new LocalVariableWriteNode node
|
301
|
+
def LocalVariableWriteNode: (Symbol name, Integer depth, Location name_loc, Prism::node value, Location operator_loc, ?Source source, ?Location location) -> LocalVariableWriteNode
|
302
|
+
|
303
|
+
# Create a new MatchLastLineNode node
|
304
|
+
def MatchLastLineNode: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, ?Source source, ?Location location) -> MatchLastLineNode
|
305
|
+
|
306
|
+
# Create a new MatchPredicateNode node
|
307
|
+
def MatchPredicateNode: (Prism::node value, Prism::node pattern, Location operator_loc, ?Source source, ?Location location) -> MatchPredicateNode
|
308
|
+
|
309
|
+
# Create a new MatchRequiredNode node
|
310
|
+
def MatchRequiredNode: (Prism::node value, Prism::node pattern, Location operator_loc, ?Source source, ?Location location) -> MatchRequiredNode
|
311
|
+
|
312
|
+
# Create a new MatchWriteNode node
|
313
|
+
def MatchWriteNode: (CallNode call, Array[LocalVariableTargetNode] targets, ?Source source, ?Location location) -> MatchWriteNode
|
314
|
+
|
315
|
+
# Create a new MissingNode node
|
316
|
+
def MissingNode: (?Source source, ?Location location) -> MissingNode
|
317
|
+
|
318
|
+
# Create a new ModuleNode node
|
319
|
+
def ModuleNode: (Array[Symbol] locals, Location module_keyword_loc, Prism::node constant_path, Prism::node? body, Location end_keyword_loc, Symbol name, ?Source source, ?Location location) -> ModuleNode
|
320
|
+
|
321
|
+
# Create a new MultiTargetNode node
|
322
|
+
def MultiTargetNode: (Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] lefts, Prism::node? rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] rights, Location? lparen_loc, Location? rparen_loc, ?Source source, ?Location location) -> MultiTargetNode
|
323
|
+
|
324
|
+
# Create a new MultiWriteNode node
|
325
|
+
def MultiWriteNode: (Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] lefts, Prism::node? rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] rights, Location? lparen_loc, Location? rparen_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> MultiWriteNode
|
326
|
+
|
327
|
+
# Create a new NextNode node
|
328
|
+
def NextNode: (ArgumentsNode? arguments, Location keyword_loc, ?Source source, ?Location location) -> NextNode
|
329
|
+
|
330
|
+
# Create a new NilNode node
|
331
|
+
def NilNode: (?Source source, ?Location location) -> NilNode
|
332
|
+
|
333
|
+
# Create a new NoKeywordsParameterNode node
|
334
|
+
def NoKeywordsParameterNode: (Location operator_loc, Location keyword_loc, ?Source source, ?Location location) -> NoKeywordsParameterNode
|
335
|
+
|
336
|
+
# Create a new NumberedParametersNode node
|
337
|
+
def NumberedParametersNode: (Integer maximum, ?Source source, ?Location location) -> NumberedParametersNode
|
338
|
+
|
339
|
+
# Create a new NumberedReferenceReadNode node
|
340
|
+
def NumberedReferenceReadNode: (Integer number, ?Source source, ?Location location) -> NumberedReferenceReadNode
|
341
|
+
|
342
|
+
# Create a new OptionalKeywordParameterNode node
|
343
|
+
def OptionalKeywordParameterNode: (Integer flags, Symbol name, Location name_loc, Prism::node value, ?Source source, ?Location location) -> OptionalKeywordParameterNode
|
344
|
+
|
345
|
+
# Create a new OptionalParameterNode node
|
346
|
+
def OptionalParameterNode: (Integer flags, Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> OptionalParameterNode
|
347
|
+
|
348
|
+
# Create a new OrNode node
|
349
|
+
def OrNode: (Prism::node left, Prism::node right, Location operator_loc, ?Source source, ?Location location) -> OrNode
|
350
|
+
|
351
|
+
# Create a new ParametersNode node
|
352
|
+
def ParametersNode: (Array[RequiredParameterNode | MultiTargetNode] requireds, Array[OptionalParameterNode] optionals, RestParameterNode | ImplicitRestNode | nil rest, Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode] posts, Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] keywords, KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil keyword_rest, BlockParameterNode? block, ?Source source, ?Location location) -> ParametersNode
|
353
|
+
|
354
|
+
# Create a new ParenthesesNode node
|
355
|
+
def ParenthesesNode: (Prism::node? body, Location opening_loc, Location closing_loc, ?Source source, ?Location location) -> ParenthesesNode
|
356
|
+
|
357
|
+
# Create a new PinnedExpressionNode node
|
358
|
+
def PinnedExpressionNode: (Prism::node expression, Location operator_loc, Location lparen_loc, Location rparen_loc, ?Source source, ?Location location) -> PinnedExpressionNode
|
359
|
+
|
360
|
+
# Create a new PinnedVariableNode node
|
361
|
+
def PinnedVariableNode: (Prism::node variable, Location operator_loc, ?Source source, ?Location location) -> PinnedVariableNode
|
362
|
+
|
363
|
+
# Create a new PostExecutionNode node
|
364
|
+
def PostExecutionNode: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, ?Source source, ?Location location) -> PostExecutionNode
|
365
|
+
|
366
|
+
# Create a new PreExecutionNode node
|
367
|
+
def PreExecutionNode: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, ?Source source, ?Location location) -> PreExecutionNode
|
368
|
+
|
369
|
+
# Create a new ProgramNode node
|
370
|
+
def ProgramNode: (Array[Symbol] locals, StatementsNode statements, ?Source source, ?Location location) -> ProgramNode
|
371
|
+
|
372
|
+
# Create a new RangeNode node
|
373
|
+
def RangeNode: (Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, ?Source source, ?Location location) -> RangeNode
|
374
|
+
|
375
|
+
# Create a new RationalNode node
|
376
|
+
def RationalNode: (Prism::node numeric, ?Source source, ?Location location) -> RationalNode
|
377
|
+
|
378
|
+
# Create a new RedoNode node
|
379
|
+
def RedoNode: (?Source source, ?Location location) -> RedoNode
|
380
|
+
|
381
|
+
# Create a new RegularExpressionNode node
|
382
|
+
def RegularExpressionNode: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, ?Source source, ?Location location) -> RegularExpressionNode
|
383
|
+
|
384
|
+
# Create a new RequiredKeywordParameterNode node
|
385
|
+
def RequiredKeywordParameterNode: (Integer flags, Symbol name, Location name_loc, ?Source source, ?Location location) -> RequiredKeywordParameterNode
|
386
|
+
|
387
|
+
# Create a new RequiredParameterNode node
|
388
|
+
def RequiredParameterNode: (Integer flags, Symbol name, ?Source source, ?Location location) -> RequiredParameterNode
|
389
|
+
|
390
|
+
# Create a new RescueModifierNode node
|
391
|
+
def RescueModifierNode: (Prism::node expression, Location keyword_loc, Prism::node rescue_expression, ?Source source, ?Location location) -> RescueModifierNode
|
392
|
+
|
393
|
+
# Create a new RescueNode node
|
394
|
+
def RescueNode: (Location keyword_loc, Array[Prism::node] exceptions, Location? operator_loc, Prism::node? reference, StatementsNode? statements, RescueNode? consequent, ?Source source, ?Location location) -> RescueNode
|
395
|
+
|
396
|
+
# Create a new RestParameterNode node
|
397
|
+
def RestParameterNode: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, ?Source source, ?Location location) -> RestParameterNode
|
398
|
+
|
399
|
+
# Create a new RetryNode node
|
400
|
+
def RetryNode: (?Source source, ?Location location) -> RetryNode
|
401
|
+
|
402
|
+
# Create a new ReturnNode node
|
403
|
+
def ReturnNode: (Location keyword_loc, ArgumentsNode? arguments, ?Source source, ?Location location) -> ReturnNode
|
404
|
+
|
405
|
+
# Create a new SelfNode node
|
406
|
+
def SelfNode: (?Source source, ?Location location) -> SelfNode
|
407
|
+
|
408
|
+
# Create a new ShareableConstantNode node
|
409
|
+
def ShareableConstantNode: (Integer flags, ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode write, ?Source source, ?Location location) -> ShareableConstantNode
|
410
|
+
|
411
|
+
# Create a new SingletonClassNode node
|
412
|
+
def SingletonClassNode: (Array[Symbol] locals, Location class_keyword_loc, Location operator_loc, Prism::node expression, Prism::node? body, Location end_keyword_loc, ?Source source, ?Location location) -> SingletonClassNode
|
413
|
+
|
414
|
+
# Create a new SourceEncodingNode node
|
415
|
+
def SourceEncodingNode: (?Source source, ?Location location) -> SourceEncodingNode
|
416
|
+
|
417
|
+
# Create a new SourceFileNode node
|
418
|
+
def SourceFileNode: (Integer flags, String filepath, ?Source source, ?Location location) -> SourceFileNode
|
419
|
+
|
420
|
+
# Create a new SourceLineNode node
|
421
|
+
def SourceLineNode: (?Source source, ?Location location) -> SourceLineNode
|
422
|
+
|
423
|
+
# Create a new SplatNode node
|
424
|
+
def SplatNode: (Location operator_loc, Prism::node? expression, ?Source source, ?Location location) -> SplatNode
|
425
|
+
|
426
|
+
# Create a new StatementsNode node
|
427
|
+
def StatementsNode: (Array[Prism::node] body, ?Source source, ?Location location) -> StatementsNode
|
428
|
+
|
429
|
+
# Create a new StringNode node
|
430
|
+
def StringNode: (Integer flags, Location? opening_loc, Location content_loc, Location? closing_loc, String unescaped, ?Source source, ?Location location) -> StringNode
|
431
|
+
|
432
|
+
# Create a new SuperNode node
|
433
|
+
def SuperNode: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Prism::node? block, ?Source source, ?Location location) -> SuperNode
|
434
|
+
|
435
|
+
# Create a new SymbolNode node
|
436
|
+
def SymbolNode: (Integer flags, Location? opening_loc, Location? value_loc, Location? closing_loc, String unescaped, ?Source source, ?Location location) -> SymbolNode
|
437
|
+
|
438
|
+
# Create a new TrueNode node
|
439
|
+
def TrueNode: (?Source source, ?Location location) -> TrueNode
|
440
|
+
|
441
|
+
# Create a new UndefNode node
|
442
|
+
def UndefNode: (Array[SymbolNode | InterpolatedSymbolNode] names, Location keyword_loc, ?Source source, ?Location location) -> UndefNode
|
443
|
+
|
444
|
+
# Create a new UnlessNode node
|
445
|
+
def UnlessNode: (Location keyword_loc, Prism::node predicate, Location? then_keyword_loc, StatementsNode? statements, ElseNode? consequent, Location? end_keyword_loc, ?Source source, ?Location location) -> UnlessNode
|
446
|
+
|
447
|
+
# Create a new UntilNode node
|
448
|
+
def UntilNode: (Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, ?Source source, ?Location location) -> UntilNode
|
449
|
+
|
450
|
+
# Create a new WhenNode node
|
451
|
+
def WhenNode: (Location keyword_loc, Array[Prism::node] conditions, Location? then_keyword_loc, StatementsNode? statements, ?Source source, ?Location location) -> WhenNode
|
452
|
+
|
453
|
+
# Create a new WhileNode node
|
454
|
+
def WhileNode: (Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, ?Source source, ?Location location) -> WhileNode
|
455
|
+
|
456
|
+
# Create a new XStringNode node
|
457
|
+
def XStringNode: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, ?Source source, ?Location location) -> XStringNode
|
458
|
+
|
459
|
+
# Create a new YieldNode node
|
460
|
+
def YieldNode: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, ?Source source, ?Location location) -> YieldNode
|
461
|
+
end
|
462
|
+
end
|