jruby-prism-parser 0.23.0.pre.SNAPSHOT-java → 0.24.0-java

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.
data/lib/prism/dsl.rb CHANGED
@@ -16,10 +16,12 @@ module Prism
16
16
  # Prism::IntegerNode.new(
17
17
  # Prism::IntegerBaseFlags::DECIMAL,
18
18
  # Prism::Location.new(source, 1, 1),
19
+ # source
19
20
  # )
20
21
  # ],
21
22
  # Prism::Location.new(source, 0, 1),
22
- # Prism::Location.new(source, 2, 1)
23
+ # Prism::Location.new(source, 2, 1),
24
+ # source
23
25
  # )
24
26
  #
25
27
  # you could instead write:
@@ -27,9 +29,10 @@ module Prism
27
29
  # source = Prism::Source.new("[1]")
28
30
  #
29
31
  # ArrayNode(
30
- # IntegerNode(Prism::IntegerBaseFlags::DECIMAL, Location(source, 1, 1))),
32
+ # IntegerNode(Prism::IntegerBaseFlags::DECIMAL, Location(source, 1, 1)), source),
31
33
  # Location(source, 0, 1),
32
- # Location(source, 2, 1)
34
+ # Location(source, 2, 1),
35
+ # source
33
36
  # )
34
37
  #
35
38
  # This is mostly helpful in the context of writing tests, but can also be used
@@ -43,743 +46,743 @@ module Prism
43
46
  end
44
47
 
45
48
  # Create a new AliasGlobalVariableNode node
46
- def AliasGlobalVariableNode(new_name, old_name, keyword_loc, location = Location())
47
- AliasGlobalVariableNode.new(new_name, old_name, keyword_loc, location)
49
+ def AliasGlobalVariableNode(new_name, old_name, keyword_loc, source = nil, location = Location())
50
+ AliasGlobalVariableNode.new(source, new_name, old_name, keyword_loc, location)
48
51
  end
49
52
 
50
53
  # Create a new AliasMethodNode node
51
- def AliasMethodNode(new_name, old_name, keyword_loc, location = Location())
52
- AliasMethodNode.new(new_name, old_name, keyword_loc, location)
54
+ def AliasMethodNode(new_name, old_name, keyword_loc, source = nil, location = Location())
55
+ AliasMethodNode.new(source, new_name, old_name, keyword_loc, location)
53
56
  end
54
57
 
55
58
  # Create a new AlternationPatternNode node
56
- def AlternationPatternNode(left, right, operator_loc, location = Location())
57
- AlternationPatternNode.new(left, right, operator_loc, location)
59
+ def AlternationPatternNode(left, right, operator_loc, source = nil, location = Location())
60
+ AlternationPatternNode.new(source, left, right, operator_loc, location)
58
61
  end
59
62
 
60
63
  # Create a new AndNode node
61
- def AndNode(left, right, operator_loc, location = Location())
62
- AndNode.new(left, right, operator_loc, location)
64
+ def AndNode(left, right, operator_loc, source = nil, location = Location())
65
+ AndNode.new(source, left, right, operator_loc, location)
63
66
  end
64
67
 
65
68
  # Create a new ArgumentsNode node
66
- def ArgumentsNode(flags, arguments, location = Location())
67
- ArgumentsNode.new(flags, arguments, location)
69
+ def ArgumentsNode(flags, arguments, source = nil, location = Location())
70
+ ArgumentsNode.new(source, flags, arguments, location)
68
71
  end
69
72
 
70
73
  # Create a new ArrayNode node
71
- def ArrayNode(flags, elements, opening_loc, closing_loc, location = Location())
72
- ArrayNode.new(flags, elements, opening_loc, closing_loc, location)
74
+ def ArrayNode(flags, elements, opening_loc, closing_loc, source = nil, location = Location())
75
+ ArrayNode.new(source, flags, elements, opening_loc, closing_loc, location)
73
76
  end
74
77
 
75
78
  # Create a new ArrayPatternNode node
76
- def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, location = Location())
77
- ArrayPatternNode.new(constant, requireds, rest, posts, opening_loc, closing_loc, location)
79
+ def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, source = nil, location = Location())
80
+ ArrayPatternNode.new(source, constant, requireds, rest, posts, opening_loc, closing_loc, location)
78
81
  end
79
82
 
80
83
  # Create a new AssocNode node
81
- def AssocNode(key, value, operator_loc, location = Location())
82
- AssocNode.new(key, value, operator_loc, location)
84
+ def AssocNode(key, value, operator_loc, source = nil, location = Location())
85
+ AssocNode.new(source, key, value, operator_loc, location)
83
86
  end
84
87
 
85
88
  # Create a new AssocSplatNode node
86
- def AssocSplatNode(value, operator_loc, location = Location())
87
- AssocSplatNode.new(value, operator_loc, location)
89
+ def AssocSplatNode(value, operator_loc, source = nil, location = Location())
90
+ AssocSplatNode.new(source, value, operator_loc, location)
88
91
  end
89
92
 
90
93
  # Create a new BackReferenceReadNode node
91
- def BackReferenceReadNode(name, location = Location())
92
- BackReferenceReadNode.new(name, location)
94
+ def BackReferenceReadNode(name, source = nil, location = Location())
95
+ BackReferenceReadNode.new(source, name, location)
93
96
  end
94
97
 
95
98
  # Create a new BeginNode node
96
- def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location = Location())
97
- BeginNode.new(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location)
99
+ def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, source = nil, location = Location())
100
+ BeginNode.new(source, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location)
98
101
  end
99
102
 
100
103
  # Create a new BlockArgumentNode node
101
- def BlockArgumentNode(expression, operator_loc, location = Location())
102
- BlockArgumentNode.new(expression, operator_loc, location)
104
+ def BlockArgumentNode(expression, operator_loc, source = nil, location = Location())
105
+ BlockArgumentNode.new(source, expression, operator_loc, location)
103
106
  end
104
107
 
105
108
  # Create a new BlockLocalVariableNode node
106
- def BlockLocalVariableNode(flags, name, location = Location())
107
- BlockLocalVariableNode.new(flags, name, location)
109
+ def BlockLocalVariableNode(flags, name, source = nil, location = Location())
110
+ BlockLocalVariableNode.new(source, flags, name, location)
108
111
  end
109
112
 
110
113
  # Create a new BlockNode node
111
- def BlockNode(locals, parameters, body, opening_loc, closing_loc, location = Location())
112
- BlockNode.new(locals, parameters, body, opening_loc, closing_loc, location)
114
+ def BlockNode(locals, parameters, body, opening_loc, closing_loc, source = nil, location = Location())
115
+ BlockNode.new(source, locals, parameters, body, opening_loc, closing_loc, location)
113
116
  end
114
117
 
115
118
  # Create a new BlockParameterNode node
116
- def BlockParameterNode(flags, name, name_loc, operator_loc, location = Location())
117
- BlockParameterNode.new(flags, name, name_loc, operator_loc, location)
119
+ def BlockParameterNode(flags, name, name_loc, operator_loc, source = nil, location = Location())
120
+ BlockParameterNode.new(source, flags, name, name_loc, operator_loc, location)
118
121
  end
119
122
 
120
123
  # Create a new BlockParametersNode node
121
- def BlockParametersNode(parameters, locals, opening_loc, closing_loc, location = Location())
122
- BlockParametersNode.new(parameters, locals, opening_loc, closing_loc, location)
124
+ def BlockParametersNode(parameters, locals, opening_loc, closing_loc, source = nil, location = Location())
125
+ BlockParametersNode.new(source, parameters, locals, opening_loc, closing_loc, location)
123
126
  end
124
127
 
125
128
  # Create a new BreakNode node
126
- def BreakNode(arguments, keyword_loc, location = Location())
127
- BreakNode.new(arguments, keyword_loc, location)
129
+ def BreakNode(arguments, keyword_loc, source = nil, location = Location())
130
+ BreakNode.new(source, arguments, keyword_loc, location)
128
131
  end
129
132
 
130
133
  # Create a new CallAndWriteNode node
131
- def CallAndWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location = Location())
132
- CallAndWriteNode.new(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location)
134
+ def CallAndWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = nil, location = Location())
135
+ CallAndWriteNode.new(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location)
133
136
  end
134
137
 
135
138
  # Create a new CallNode node
136
- def CallNode(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location = Location())
137
- CallNode.new(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location)
139
+ def CallNode(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, source = nil, location = Location())
140
+ CallNode.new(source, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location)
138
141
  end
139
142
 
140
143
  # Create a new CallOperatorWriteNode node
141
- def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, location = Location())
142
- CallOperatorWriteNode.new(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, location)
144
+ def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, source = nil, location = Location())
145
+ CallOperatorWriteNode.new(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, location)
143
146
  end
144
147
 
145
148
  # Create a new CallOrWriteNode node
146
- def CallOrWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location = Location())
147
- CallOrWriteNode.new(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location)
149
+ def CallOrWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = nil, location = Location())
150
+ CallOrWriteNode.new(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location)
148
151
  end
149
152
 
150
153
  # Create a new CallTargetNode node
151
- def CallTargetNode(flags, receiver, call_operator_loc, name, message_loc, location = Location())
152
- CallTargetNode.new(flags, receiver, call_operator_loc, name, message_loc, location)
154
+ def CallTargetNode(flags, receiver, call_operator_loc, name, message_loc, source = nil, location = Location())
155
+ CallTargetNode.new(source, flags, receiver, call_operator_loc, name, message_loc, location)
153
156
  end
154
157
 
155
158
  # Create a new CapturePatternNode node
156
- def CapturePatternNode(value, target, operator_loc, location = Location())
157
- CapturePatternNode.new(value, target, operator_loc, location)
159
+ def CapturePatternNode(value, target, operator_loc, source = nil, location = Location())
160
+ CapturePatternNode.new(source, value, target, operator_loc, location)
158
161
  end
159
162
 
160
163
  # Create a new CaseMatchNode node
161
- def CaseMatchNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location = Location())
162
- CaseMatchNode.new(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location)
164
+ def CaseMatchNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = nil, location = Location())
165
+ CaseMatchNode.new(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location)
163
166
  end
164
167
 
165
168
  # Create a new CaseNode node
166
- def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location = Location())
167
- CaseNode.new(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location)
169
+ def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = nil, location = Location())
170
+ CaseNode.new(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location)
168
171
  end
169
172
 
170
173
  # Create a new ClassNode node
171
- def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location = Location())
172
- ClassNode.new(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location)
174
+ def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, source = nil, location = Location())
175
+ ClassNode.new(source, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location)
173
176
  end
174
177
 
175
178
  # Create a new ClassVariableAndWriteNode node
176
- def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, location = Location())
177
- ClassVariableAndWriteNode.new(name, name_loc, operator_loc, value, location)
179
+ def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, source = nil, location = Location())
180
+ ClassVariableAndWriteNode.new(source, name, name_loc, operator_loc, value, location)
178
181
  end
179
182
 
180
183
  # Create a new ClassVariableOperatorWriteNode node
181
- def ClassVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = Location())
182
- ClassVariableOperatorWriteNode.new(name, name_loc, operator_loc, value, operator, location)
184
+ def ClassVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = nil, location = Location())
185
+ ClassVariableOperatorWriteNode.new(source, name, name_loc, operator_loc, value, operator, location)
183
186
  end
184
187
 
185
188
  # Create a new ClassVariableOrWriteNode node
186
- def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, location = Location())
187
- ClassVariableOrWriteNode.new(name, name_loc, operator_loc, value, location)
189
+ def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, source = nil, location = Location())
190
+ ClassVariableOrWriteNode.new(source, name, name_loc, operator_loc, value, location)
188
191
  end
189
192
 
190
193
  # Create a new ClassVariableReadNode node
191
- def ClassVariableReadNode(name, location = Location())
192
- ClassVariableReadNode.new(name, location)
194
+ def ClassVariableReadNode(name, source = nil, location = Location())
195
+ ClassVariableReadNode.new(source, name, location)
193
196
  end
194
197
 
195
198
  # Create a new ClassVariableTargetNode node
196
- def ClassVariableTargetNode(name, location = Location())
197
- ClassVariableTargetNode.new(name, location)
199
+ def ClassVariableTargetNode(name, source = nil, location = Location())
200
+ ClassVariableTargetNode.new(source, name, location)
198
201
  end
199
202
 
200
203
  # Create a new ClassVariableWriteNode node
201
- def ClassVariableWriteNode(name, name_loc, value, operator_loc, location = Location())
202
- ClassVariableWriteNode.new(name, name_loc, value, operator_loc, location)
204
+ def ClassVariableWriteNode(name, name_loc, value, operator_loc, source = nil, location = Location())
205
+ ClassVariableWriteNode.new(source, name, name_loc, value, operator_loc, location)
203
206
  end
204
207
 
205
208
  # Create a new ConstantAndWriteNode node
206
- def ConstantAndWriteNode(name, name_loc, operator_loc, value, location = Location())
207
- ConstantAndWriteNode.new(name, name_loc, operator_loc, value, location)
209
+ def ConstantAndWriteNode(name, name_loc, operator_loc, value, source = nil, location = Location())
210
+ ConstantAndWriteNode.new(source, name, name_loc, operator_loc, value, location)
208
211
  end
209
212
 
210
213
  # Create a new ConstantOperatorWriteNode node
211
- def ConstantOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = Location())
212
- ConstantOperatorWriteNode.new(name, name_loc, operator_loc, value, operator, location)
214
+ def ConstantOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = nil, location = Location())
215
+ ConstantOperatorWriteNode.new(source, name, name_loc, operator_loc, value, operator, location)
213
216
  end
214
217
 
215
218
  # Create a new ConstantOrWriteNode node
216
- def ConstantOrWriteNode(name, name_loc, operator_loc, value, location = Location())
217
- ConstantOrWriteNode.new(name, name_loc, operator_loc, value, location)
219
+ def ConstantOrWriteNode(name, name_loc, operator_loc, value, source = nil, location = Location())
220
+ ConstantOrWriteNode.new(source, name, name_loc, operator_loc, value, location)
218
221
  end
219
222
 
220
223
  # Create a new ConstantPathAndWriteNode node
221
- def ConstantPathAndWriteNode(target, operator_loc, value, location = Location())
222
- ConstantPathAndWriteNode.new(target, operator_loc, value, location)
224
+ def ConstantPathAndWriteNode(target, operator_loc, value, source = nil, location = Location())
225
+ ConstantPathAndWriteNode.new(source, target, operator_loc, value, location)
223
226
  end
224
227
 
225
228
  # Create a new ConstantPathNode node
226
- def ConstantPathNode(parent, child, delimiter_loc, location = Location())
227
- ConstantPathNode.new(parent, child, delimiter_loc, location)
229
+ def ConstantPathNode(parent, child, delimiter_loc, source = nil, location = Location())
230
+ ConstantPathNode.new(source, parent, child, delimiter_loc, location)
228
231
  end
229
232
 
230
233
  # Create a new ConstantPathOperatorWriteNode node
231
- def ConstantPathOperatorWriteNode(target, operator_loc, value, operator, location = Location())
232
- ConstantPathOperatorWriteNode.new(target, operator_loc, value, operator, location)
234
+ def ConstantPathOperatorWriteNode(target, operator_loc, value, operator, source = nil, location = Location())
235
+ ConstantPathOperatorWriteNode.new(source, target, operator_loc, value, operator, location)
233
236
  end
234
237
 
235
238
  # Create a new ConstantPathOrWriteNode node
236
- def ConstantPathOrWriteNode(target, operator_loc, value, location = Location())
237
- ConstantPathOrWriteNode.new(target, operator_loc, value, location)
239
+ def ConstantPathOrWriteNode(target, operator_loc, value, source = nil, location = Location())
240
+ ConstantPathOrWriteNode.new(source, target, operator_loc, value, location)
238
241
  end
239
242
 
240
243
  # Create a new ConstantPathTargetNode node
241
- def ConstantPathTargetNode(parent, child, delimiter_loc, location = Location())
242
- ConstantPathTargetNode.new(parent, child, delimiter_loc, location)
244
+ def ConstantPathTargetNode(parent, child, delimiter_loc, source = nil, location = Location())
245
+ ConstantPathTargetNode.new(source, parent, child, delimiter_loc, location)
243
246
  end
244
247
 
245
248
  # Create a new ConstantPathWriteNode node
246
- def ConstantPathWriteNode(target, operator_loc, value, location = Location())
247
- ConstantPathWriteNode.new(target, operator_loc, value, location)
249
+ def ConstantPathWriteNode(target, operator_loc, value, source = nil, location = Location())
250
+ ConstantPathWriteNode.new(source, target, operator_loc, value, location)
248
251
  end
249
252
 
250
253
  # Create a new ConstantReadNode node
251
- def ConstantReadNode(name, location = Location())
252
- ConstantReadNode.new(name, location)
254
+ def ConstantReadNode(name, source = nil, location = Location())
255
+ ConstantReadNode.new(source, name, location)
253
256
  end
254
257
 
255
258
  # Create a new ConstantTargetNode node
256
- def ConstantTargetNode(name, location = Location())
257
- ConstantTargetNode.new(name, location)
259
+ def ConstantTargetNode(name, source = nil, location = Location())
260
+ ConstantTargetNode.new(source, name, location)
258
261
  end
259
262
 
260
263
  # Create a new ConstantWriteNode node
261
- def ConstantWriteNode(name, name_loc, value, operator_loc, location = Location())
262
- ConstantWriteNode.new(name, name_loc, value, operator_loc, location)
264
+ def ConstantWriteNode(name, name_loc, value, operator_loc, source = nil, location = Location())
265
+ ConstantWriteNode.new(source, name, name_loc, value, operator_loc, location)
263
266
  end
264
267
 
265
268
  # Create a new DefNode node
266
- def DefNode(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location = Location())
267
- DefNode.new(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location)
269
+ def DefNode(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, source = nil, location = Location())
270
+ DefNode.new(source, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location)
268
271
  end
269
272
 
270
273
  # Create a new DefinedNode node
271
- def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, location = Location())
272
- DefinedNode.new(lparen_loc, value, rparen_loc, keyword_loc, location)
274
+ def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, source = nil, location = Location())
275
+ DefinedNode.new(source, lparen_loc, value, rparen_loc, keyword_loc, location)
273
276
  end
274
277
 
275
278
  # Create a new ElseNode node
276
- def ElseNode(else_keyword_loc, statements, end_keyword_loc, location = Location())
277
- ElseNode.new(else_keyword_loc, statements, end_keyword_loc, location)
279
+ def ElseNode(else_keyword_loc, statements, end_keyword_loc, source = nil, location = Location())
280
+ ElseNode.new(source, else_keyword_loc, statements, end_keyword_loc, location)
278
281
  end
279
282
 
280
283
  # Create a new EmbeddedStatementsNode node
281
- def EmbeddedStatementsNode(opening_loc, statements, closing_loc, location = Location())
282
- EmbeddedStatementsNode.new(opening_loc, statements, closing_loc, location)
284
+ def EmbeddedStatementsNode(opening_loc, statements, closing_loc, source = nil, location = Location())
285
+ EmbeddedStatementsNode.new(source, opening_loc, statements, closing_loc, location)
283
286
  end
284
287
 
285
288
  # Create a new EmbeddedVariableNode node
286
- def EmbeddedVariableNode(operator_loc, variable, location = Location())
287
- EmbeddedVariableNode.new(operator_loc, variable, location)
289
+ def EmbeddedVariableNode(operator_loc, variable, source = nil, location = Location())
290
+ EmbeddedVariableNode.new(source, operator_loc, variable, location)
288
291
  end
289
292
 
290
293
  # Create a new EnsureNode node
291
- def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, location = Location())
292
- EnsureNode.new(ensure_keyword_loc, statements, end_keyword_loc, location)
294
+ def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, source = nil, location = Location())
295
+ EnsureNode.new(source, ensure_keyword_loc, statements, end_keyword_loc, location)
293
296
  end
294
297
 
295
298
  # Create a new FalseNode node
296
- def FalseNode(location = Location())
297
- FalseNode.new(location)
299
+ def FalseNode(source = nil, location = Location())
300
+ FalseNode.new(source, location)
298
301
  end
299
302
 
300
303
  # Create a new FindPatternNode node
301
- def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, location = Location())
302
- FindPatternNode.new(constant, left, requireds, right, opening_loc, closing_loc, location)
304
+ def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, source = nil, location = Location())
305
+ FindPatternNode.new(source, constant, left, requireds, right, opening_loc, closing_loc, location)
303
306
  end
304
307
 
305
308
  # Create a new FlipFlopNode node
306
- def FlipFlopNode(flags, left, right, operator_loc, location = Location())
307
- FlipFlopNode.new(flags, left, right, operator_loc, location)
309
+ def FlipFlopNode(flags, left, right, operator_loc, source = nil, location = Location())
310
+ FlipFlopNode.new(source, flags, left, right, operator_loc, location)
308
311
  end
309
312
 
310
313
  # Create a new FloatNode node
311
- def FloatNode(location = Location())
312
- FloatNode.new(location)
314
+ def FloatNode(source = nil, location = Location())
315
+ FloatNode.new(source, location)
313
316
  end
314
317
 
315
318
  # Create a new ForNode node
316
- def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location = Location())
317
- ForNode.new(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location)
319
+ def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, source = nil, location = Location())
320
+ ForNode.new(source, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location)
318
321
  end
319
322
 
320
323
  # Create a new ForwardingArgumentsNode node
321
- def ForwardingArgumentsNode(location = Location())
322
- ForwardingArgumentsNode.new(location)
324
+ def ForwardingArgumentsNode(source = nil, location = Location())
325
+ ForwardingArgumentsNode.new(source, location)
323
326
  end
324
327
 
325
328
  # Create a new ForwardingParameterNode node
326
- def ForwardingParameterNode(location = Location())
327
- ForwardingParameterNode.new(location)
329
+ def ForwardingParameterNode(source = nil, location = Location())
330
+ ForwardingParameterNode.new(source, location)
328
331
  end
329
332
 
330
333
  # Create a new ForwardingSuperNode node
331
- def ForwardingSuperNode(block, location = Location())
332
- ForwardingSuperNode.new(block, location)
334
+ def ForwardingSuperNode(block, source = nil, location = Location())
335
+ ForwardingSuperNode.new(source, block, location)
333
336
  end
334
337
 
335
338
  # Create a new GlobalVariableAndWriteNode node
336
- def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, location = Location())
337
- GlobalVariableAndWriteNode.new(name, name_loc, operator_loc, value, location)
339
+ def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, source = nil, location = Location())
340
+ GlobalVariableAndWriteNode.new(source, name, name_loc, operator_loc, value, location)
338
341
  end
339
342
 
340
343
  # Create a new GlobalVariableOperatorWriteNode node
341
- def GlobalVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = Location())
342
- GlobalVariableOperatorWriteNode.new(name, name_loc, operator_loc, value, operator, location)
344
+ def GlobalVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = nil, location = Location())
345
+ GlobalVariableOperatorWriteNode.new(source, name, name_loc, operator_loc, value, operator, location)
343
346
  end
344
347
 
345
348
  # Create a new GlobalVariableOrWriteNode node
346
- def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, location = Location())
347
- GlobalVariableOrWriteNode.new(name, name_loc, operator_loc, value, location)
349
+ def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, source = nil, location = Location())
350
+ GlobalVariableOrWriteNode.new(source, name, name_loc, operator_loc, value, location)
348
351
  end
349
352
 
350
353
  # Create a new GlobalVariableReadNode node
351
- def GlobalVariableReadNode(name, location = Location())
352
- GlobalVariableReadNode.new(name, location)
354
+ def GlobalVariableReadNode(name, source = nil, location = Location())
355
+ GlobalVariableReadNode.new(source, name, location)
353
356
  end
354
357
 
355
358
  # Create a new GlobalVariableTargetNode node
356
- def GlobalVariableTargetNode(name, location = Location())
357
- GlobalVariableTargetNode.new(name, location)
359
+ def GlobalVariableTargetNode(name, source = nil, location = Location())
360
+ GlobalVariableTargetNode.new(source, name, location)
358
361
  end
359
362
 
360
363
  # Create a new GlobalVariableWriteNode node
361
- def GlobalVariableWriteNode(name, name_loc, value, operator_loc, location = Location())
362
- GlobalVariableWriteNode.new(name, name_loc, value, operator_loc, location)
364
+ def GlobalVariableWriteNode(name, name_loc, value, operator_loc, source = nil, location = Location())
365
+ GlobalVariableWriteNode.new(source, name, name_loc, value, operator_loc, location)
363
366
  end
364
367
 
365
368
  # Create a new HashNode node
366
- def HashNode(opening_loc, elements, closing_loc, location = Location())
367
- HashNode.new(opening_loc, elements, closing_loc, location)
369
+ def HashNode(opening_loc, elements, closing_loc, source = nil, location = Location())
370
+ HashNode.new(source, opening_loc, elements, closing_loc, location)
368
371
  end
369
372
 
370
373
  # Create a new HashPatternNode node
371
- def HashPatternNode(constant, elements, rest, opening_loc, closing_loc, location = Location())
372
- HashPatternNode.new(constant, elements, rest, opening_loc, closing_loc, location)
374
+ def HashPatternNode(constant, elements, rest, opening_loc, closing_loc, source = nil, location = Location())
375
+ HashPatternNode.new(source, constant, elements, rest, opening_loc, closing_loc, location)
373
376
  end
374
377
 
375
378
  # Create a new IfNode node
376
- def IfNode(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location = Location())
377
- IfNode.new(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location)
379
+ def IfNode(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = nil, location = Location())
380
+ IfNode.new(source, if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location)
378
381
  end
379
382
 
380
383
  # Create a new ImaginaryNode node
381
- def ImaginaryNode(numeric, location = Location())
382
- ImaginaryNode.new(numeric, location)
384
+ def ImaginaryNode(numeric, source = nil, location = Location())
385
+ ImaginaryNode.new(source, numeric, location)
383
386
  end
384
387
 
385
388
  # Create a new ImplicitNode node
386
- def ImplicitNode(value, location = Location())
387
- ImplicitNode.new(value, location)
389
+ def ImplicitNode(value, source = nil, location = Location())
390
+ ImplicitNode.new(source, value, location)
388
391
  end
389
392
 
390
393
  # Create a new ImplicitRestNode node
391
- def ImplicitRestNode(location = Location())
392
- ImplicitRestNode.new(location)
394
+ def ImplicitRestNode(source = nil, location = Location())
395
+ ImplicitRestNode.new(source, location)
393
396
  end
394
397
 
395
398
  # Create a new InNode node
396
- def InNode(pattern, statements, in_loc, then_loc, location = Location())
397
- InNode.new(pattern, statements, in_loc, then_loc, location)
399
+ def InNode(pattern, statements, in_loc, then_loc, source = nil, location = Location())
400
+ InNode.new(source, pattern, statements, in_loc, then_loc, location)
398
401
  end
399
402
 
400
403
  # Create a new IndexAndWriteNode node
401
- def IndexAndWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location = Location())
402
- IndexAndWriteNode.new(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location)
404
+ def IndexAndWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = nil, location = Location())
405
+ IndexAndWriteNode.new(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location)
403
406
  end
404
407
 
405
408
  # Create a new IndexOperatorWriteNode node
406
- def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, location = Location())
407
- IndexOperatorWriteNode.new(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, location)
409
+ def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, source = nil, location = Location())
410
+ IndexOperatorWriteNode.new(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, location)
408
411
  end
409
412
 
410
413
  # Create a new IndexOrWriteNode node
411
- def IndexOrWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location = Location())
412
- IndexOrWriteNode.new(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location)
414
+ def IndexOrWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = nil, location = Location())
415
+ IndexOrWriteNode.new(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location)
413
416
  end
414
417
 
415
418
  # Create a new IndexTargetNode node
416
- def IndexTargetNode(flags, receiver, opening_loc, arguments, closing_loc, block, location = Location())
417
- IndexTargetNode.new(flags, receiver, opening_loc, arguments, closing_loc, block, location)
419
+ def IndexTargetNode(flags, receiver, opening_loc, arguments, closing_loc, block, source = nil, location = Location())
420
+ IndexTargetNode.new(source, flags, receiver, opening_loc, arguments, closing_loc, block, location)
418
421
  end
419
422
 
420
423
  # Create a new InstanceVariableAndWriteNode node
421
- def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, location = Location())
422
- InstanceVariableAndWriteNode.new(name, name_loc, operator_loc, value, location)
424
+ def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, source = nil, location = Location())
425
+ InstanceVariableAndWriteNode.new(source, name, name_loc, operator_loc, value, location)
423
426
  end
424
427
 
425
428
  # Create a new InstanceVariableOperatorWriteNode node
426
- def InstanceVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = Location())
427
- InstanceVariableOperatorWriteNode.new(name, name_loc, operator_loc, value, operator, location)
429
+ def InstanceVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = nil, location = Location())
430
+ InstanceVariableOperatorWriteNode.new(source, name, name_loc, operator_loc, value, operator, location)
428
431
  end
429
432
 
430
433
  # Create a new InstanceVariableOrWriteNode node
431
- def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, location = Location())
432
- InstanceVariableOrWriteNode.new(name, name_loc, operator_loc, value, location)
434
+ def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, source = nil, location = Location())
435
+ InstanceVariableOrWriteNode.new(source, name, name_loc, operator_loc, value, location)
433
436
  end
434
437
 
435
438
  # Create a new InstanceVariableReadNode node
436
- def InstanceVariableReadNode(name, location = Location())
437
- InstanceVariableReadNode.new(name, location)
439
+ def InstanceVariableReadNode(name, source = nil, location = Location())
440
+ InstanceVariableReadNode.new(source, name, location)
438
441
  end
439
442
 
440
443
  # Create a new InstanceVariableTargetNode node
441
- def InstanceVariableTargetNode(name, location = Location())
442
- InstanceVariableTargetNode.new(name, location)
444
+ def InstanceVariableTargetNode(name, source = nil, location = Location())
445
+ InstanceVariableTargetNode.new(source, name, location)
443
446
  end
444
447
 
445
448
  # Create a new InstanceVariableWriteNode node
446
- def InstanceVariableWriteNode(name, name_loc, value, operator_loc, location = Location())
447
- InstanceVariableWriteNode.new(name, name_loc, value, operator_loc, location)
449
+ def InstanceVariableWriteNode(name, name_loc, value, operator_loc, source = nil, location = Location())
450
+ InstanceVariableWriteNode.new(source, name, name_loc, value, operator_loc, location)
448
451
  end
449
452
 
450
453
  # Create a new IntegerNode node
451
- def IntegerNode(flags, location = Location())
452
- IntegerNode.new(flags, location)
454
+ def IntegerNode(flags, source = nil, location = Location())
455
+ IntegerNode.new(source, flags, location)
453
456
  end
454
457
 
455
458
  # Create a new InterpolatedMatchLastLineNode node
456
- def InterpolatedMatchLastLineNode(flags, opening_loc, parts, closing_loc, location = Location())
457
- InterpolatedMatchLastLineNode.new(flags, opening_loc, parts, closing_loc, location)
459
+ def InterpolatedMatchLastLineNode(flags, opening_loc, parts, closing_loc, source = nil, location = Location())
460
+ InterpolatedMatchLastLineNode.new(source, flags, opening_loc, parts, closing_loc, location)
458
461
  end
459
462
 
460
463
  # Create a new InterpolatedRegularExpressionNode node
461
- def InterpolatedRegularExpressionNode(flags, opening_loc, parts, closing_loc, location = Location())
462
- InterpolatedRegularExpressionNode.new(flags, opening_loc, parts, closing_loc, location)
464
+ def InterpolatedRegularExpressionNode(flags, opening_loc, parts, closing_loc, source = nil, location = Location())
465
+ InterpolatedRegularExpressionNode.new(source, flags, opening_loc, parts, closing_loc, location)
463
466
  end
464
467
 
465
468
  # Create a new InterpolatedStringNode node
466
- def InterpolatedStringNode(opening_loc, parts, closing_loc, location = Location())
467
- InterpolatedStringNode.new(opening_loc, parts, closing_loc, location)
469
+ def InterpolatedStringNode(opening_loc, parts, closing_loc, source = nil, location = Location())
470
+ InterpolatedStringNode.new(source, opening_loc, parts, closing_loc, location)
468
471
  end
469
472
 
470
473
  # Create a new InterpolatedSymbolNode node
471
- def InterpolatedSymbolNode(opening_loc, parts, closing_loc, location = Location())
472
- InterpolatedSymbolNode.new(opening_loc, parts, closing_loc, location)
474
+ def InterpolatedSymbolNode(opening_loc, parts, closing_loc, source = nil, location = Location())
475
+ InterpolatedSymbolNode.new(source, opening_loc, parts, closing_loc, location)
473
476
  end
474
477
 
475
478
  # Create a new InterpolatedXStringNode node
476
- def InterpolatedXStringNode(opening_loc, parts, closing_loc, location = Location())
477
- InterpolatedXStringNode.new(opening_loc, parts, closing_loc, location)
479
+ def InterpolatedXStringNode(opening_loc, parts, closing_loc, source = nil, location = Location())
480
+ InterpolatedXStringNode.new(source, opening_loc, parts, closing_loc, location)
478
481
  end
479
482
 
480
483
  # Create a new KeywordHashNode node
481
- def KeywordHashNode(flags, elements, location = Location())
482
- KeywordHashNode.new(flags, elements, location)
484
+ def KeywordHashNode(flags, elements, source = nil, location = Location())
485
+ KeywordHashNode.new(source, flags, elements, location)
483
486
  end
484
487
 
485
488
  # Create a new KeywordRestParameterNode node
486
- def KeywordRestParameterNode(flags, name, name_loc, operator_loc, location = Location())
487
- KeywordRestParameterNode.new(flags, name, name_loc, operator_loc, location)
489
+ def KeywordRestParameterNode(flags, name, name_loc, operator_loc, source = nil, location = Location())
490
+ KeywordRestParameterNode.new(source, flags, name, name_loc, operator_loc, location)
488
491
  end
489
492
 
490
493
  # Create a new LambdaNode node
491
- def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, location = Location())
492
- LambdaNode.new(locals, operator_loc, opening_loc, closing_loc, parameters, body, location)
494
+ def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, source = nil, location = Location())
495
+ LambdaNode.new(source, locals, operator_loc, opening_loc, closing_loc, parameters, body, location)
493
496
  end
494
497
 
495
498
  # Create a new LocalVariableAndWriteNode node
496
- def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, location = Location())
497
- LocalVariableAndWriteNode.new(name_loc, operator_loc, value, name, depth, location)
499
+ def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, source = nil, location = Location())
500
+ LocalVariableAndWriteNode.new(source, name_loc, operator_loc, value, name, depth, location)
498
501
  end
499
502
 
500
503
  # Create a new LocalVariableOperatorWriteNode node
501
- def LocalVariableOperatorWriteNode(name_loc, operator_loc, value, name, operator, depth, location = Location())
502
- LocalVariableOperatorWriteNode.new(name_loc, operator_loc, value, name, operator, depth, location)
504
+ def LocalVariableOperatorWriteNode(name_loc, operator_loc, value, name, operator, depth, source = nil, location = Location())
505
+ LocalVariableOperatorWriteNode.new(source, name_loc, operator_loc, value, name, operator, depth, location)
503
506
  end
504
507
 
505
508
  # Create a new LocalVariableOrWriteNode node
506
- def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, location = Location())
507
- LocalVariableOrWriteNode.new(name_loc, operator_loc, value, name, depth, location)
509
+ def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, source = nil, location = Location())
510
+ LocalVariableOrWriteNode.new(source, name_loc, operator_loc, value, name, depth, location)
508
511
  end
509
512
 
510
513
  # Create a new LocalVariableReadNode node
511
- def LocalVariableReadNode(name, depth, location = Location())
512
- LocalVariableReadNode.new(name, depth, location)
514
+ def LocalVariableReadNode(name, depth, source = nil, location = Location())
515
+ LocalVariableReadNode.new(source, name, depth, location)
513
516
  end
514
517
 
515
518
  # Create a new LocalVariableTargetNode node
516
- def LocalVariableTargetNode(name, depth, location = Location())
517
- LocalVariableTargetNode.new(name, depth, location)
519
+ def LocalVariableTargetNode(name, depth, source = nil, location = Location())
520
+ LocalVariableTargetNode.new(source, name, depth, location)
518
521
  end
519
522
 
520
523
  # Create a new LocalVariableWriteNode node
521
- def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, location = Location())
522
- LocalVariableWriteNode.new(name, depth, name_loc, value, operator_loc, location)
524
+ def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, source = nil, location = Location())
525
+ LocalVariableWriteNode.new(source, name, depth, name_loc, value, operator_loc, location)
523
526
  end
524
527
 
525
528
  # Create a new MatchLastLineNode node
526
- def MatchLastLineNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = Location())
527
- MatchLastLineNode.new(flags, opening_loc, content_loc, closing_loc, unescaped, location)
529
+ def MatchLastLineNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = nil, location = Location())
530
+ MatchLastLineNode.new(source, flags, opening_loc, content_loc, closing_loc, unescaped, location)
528
531
  end
529
532
 
530
533
  # Create a new MatchPredicateNode node
531
- def MatchPredicateNode(value, pattern, operator_loc, location = Location())
532
- MatchPredicateNode.new(value, pattern, operator_loc, location)
534
+ def MatchPredicateNode(value, pattern, operator_loc, source = nil, location = Location())
535
+ MatchPredicateNode.new(source, value, pattern, operator_loc, location)
533
536
  end
534
537
 
535
538
  # Create a new MatchRequiredNode node
536
- def MatchRequiredNode(value, pattern, operator_loc, location = Location())
537
- MatchRequiredNode.new(value, pattern, operator_loc, location)
539
+ def MatchRequiredNode(value, pattern, operator_loc, source = nil, location = Location())
540
+ MatchRequiredNode.new(source, value, pattern, operator_loc, location)
538
541
  end
539
542
 
540
543
  # Create a new MatchWriteNode node
541
- def MatchWriteNode(call, targets, location = Location())
542
- MatchWriteNode.new(call, targets, location)
544
+ def MatchWriteNode(call, targets, source = nil, location = Location())
545
+ MatchWriteNode.new(source, call, targets, location)
543
546
  end
544
547
 
545
548
  # Create a new MissingNode node
546
- def MissingNode(location = Location())
547
- MissingNode.new(location)
549
+ def MissingNode(source = nil, location = Location())
550
+ MissingNode.new(source, location)
548
551
  end
549
552
 
550
553
  # Create a new ModuleNode node
551
- def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location = Location())
552
- ModuleNode.new(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location)
554
+ def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, source = nil, location = Location())
555
+ ModuleNode.new(source, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location)
553
556
  end
554
557
 
555
558
  # Create a new MultiTargetNode node
556
- def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, location = Location())
557
- MultiTargetNode.new(lefts, rest, rights, lparen_loc, rparen_loc, location)
559
+ def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, source = nil, location = Location())
560
+ MultiTargetNode.new(source, lefts, rest, rights, lparen_loc, rparen_loc, location)
558
561
  end
559
562
 
560
563
  # Create a new MultiWriteNode node
561
- def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location = Location())
562
- MultiWriteNode.new(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location)
564
+ def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, source = nil, location = Location())
565
+ MultiWriteNode.new(source, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location)
563
566
  end
564
567
 
565
568
  # Create a new NextNode node
566
- def NextNode(arguments, keyword_loc, location = Location())
567
- NextNode.new(arguments, keyword_loc, location)
569
+ def NextNode(arguments, keyword_loc, source = nil, location = Location())
570
+ NextNode.new(source, arguments, keyword_loc, location)
568
571
  end
569
572
 
570
573
  # Create a new NilNode node
571
- def NilNode(location = Location())
572
- NilNode.new(location)
574
+ def NilNode(source = nil, location = Location())
575
+ NilNode.new(source, location)
573
576
  end
574
577
 
575
578
  # Create a new NoKeywordsParameterNode node
576
- def NoKeywordsParameterNode(operator_loc, keyword_loc, location = Location())
577
- NoKeywordsParameterNode.new(operator_loc, keyword_loc, location)
579
+ def NoKeywordsParameterNode(operator_loc, keyword_loc, source = nil, location = Location())
580
+ NoKeywordsParameterNode.new(source, operator_loc, keyword_loc, location)
578
581
  end
579
582
 
580
583
  # Create a new NumberedParametersNode node
581
- def NumberedParametersNode(maximum, location = Location())
582
- NumberedParametersNode.new(maximum, location)
584
+ def NumberedParametersNode(maximum, source = nil, location = Location())
585
+ NumberedParametersNode.new(source, maximum, location)
583
586
  end
584
587
 
585
588
  # Create a new NumberedReferenceReadNode node
586
- def NumberedReferenceReadNode(number, location = Location())
587
- NumberedReferenceReadNode.new(number, location)
589
+ def NumberedReferenceReadNode(number, source = nil, location = Location())
590
+ NumberedReferenceReadNode.new(source, number, location)
588
591
  end
589
592
 
590
593
  # Create a new OptionalKeywordParameterNode node
591
- def OptionalKeywordParameterNode(flags, name, name_loc, value, location = Location())
592
- OptionalKeywordParameterNode.new(flags, name, name_loc, value, location)
594
+ def OptionalKeywordParameterNode(flags, name, name_loc, value, source = nil, location = Location())
595
+ OptionalKeywordParameterNode.new(source, flags, name, name_loc, value, location)
593
596
  end
594
597
 
595
598
  # Create a new OptionalParameterNode node
596
- def OptionalParameterNode(flags, name, name_loc, operator_loc, value, location = Location())
597
- OptionalParameterNode.new(flags, name, name_loc, operator_loc, value, location)
599
+ def OptionalParameterNode(flags, name, name_loc, operator_loc, value, source = nil, location = Location())
600
+ OptionalParameterNode.new(source, flags, name, name_loc, operator_loc, value, location)
598
601
  end
599
602
 
600
603
  # Create a new OrNode node
601
- def OrNode(left, right, operator_loc, location = Location())
602
- OrNode.new(left, right, operator_loc, location)
604
+ def OrNode(left, right, operator_loc, source = nil, location = Location())
605
+ OrNode.new(source, left, right, operator_loc, location)
603
606
  end
604
607
 
605
608
  # Create a new ParametersNode node
606
- def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, location = Location())
607
- ParametersNode.new(requireds, optionals, rest, posts, keywords, keyword_rest, block, location)
609
+ def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, source = nil, location = Location())
610
+ ParametersNode.new(source, requireds, optionals, rest, posts, keywords, keyword_rest, block, location)
608
611
  end
609
612
 
610
613
  # Create a new ParenthesesNode node
611
- def ParenthesesNode(body, opening_loc, closing_loc, location = Location())
612
- ParenthesesNode.new(body, opening_loc, closing_loc, location)
614
+ def ParenthesesNode(body, opening_loc, closing_loc, source = nil, location = Location())
615
+ ParenthesesNode.new(source, body, opening_loc, closing_loc, location)
613
616
  end
614
617
 
615
618
  # Create a new PinnedExpressionNode node
616
- def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, location = Location())
617
- PinnedExpressionNode.new(expression, operator_loc, lparen_loc, rparen_loc, location)
619
+ def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, source = nil, location = Location())
620
+ PinnedExpressionNode.new(source, expression, operator_loc, lparen_loc, rparen_loc, location)
618
621
  end
619
622
 
620
623
  # Create a new PinnedVariableNode node
621
- def PinnedVariableNode(variable, operator_loc, location = Location())
622
- PinnedVariableNode.new(variable, operator_loc, location)
624
+ def PinnedVariableNode(variable, operator_loc, source = nil, location = Location())
625
+ PinnedVariableNode.new(source, variable, operator_loc, location)
623
626
  end
624
627
 
625
628
  # Create a new PostExecutionNode node
626
- def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = Location())
627
- PostExecutionNode.new(statements, keyword_loc, opening_loc, closing_loc, location)
629
+ def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = nil, location = Location())
630
+ PostExecutionNode.new(source, statements, keyword_loc, opening_loc, closing_loc, location)
628
631
  end
629
632
 
630
633
  # Create a new PreExecutionNode node
631
- def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = Location())
632
- PreExecutionNode.new(statements, keyword_loc, opening_loc, closing_loc, location)
634
+ def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = nil, location = Location())
635
+ PreExecutionNode.new(source, statements, keyword_loc, opening_loc, closing_loc, location)
633
636
  end
634
637
 
635
638
  # Create a new ProgramNode node
636
- def ProgramNode(locals, statements, location = Location())
637
- ProgramNode.new(locals, statements, location)
639
+ def ProgramNode(locals, statements, source = nil, location = Location())
640
+ ProgramNode.new(source, locals, statements, location)
638
641
  end
639
642
 
640
643
  # Create a new RangeNode node
641
- def RangeNode(flags, left, right, operator_loc, location = Location())
642
- RangeNode.new(flags, left, right, operator_loc, location)
644
+ def RangeNode(flags, left, right, operator_loc, source = nil, location = Location())
645
+ RangeNode.new(source, flags, left, right, operator_loc, location)
643
646
  end
644
647
 
645
648
  # Create a new RationalNode node
646
- def RationalNode(numeric, location = Location())
647
- RationalNode.new(numeric, location)
649
+ def RationalNode(numeric, source = nil, location = Location())
650
+ RationalNode.new(source, numeric, location)
648
651
  end
649
652
 
650
653
  # Create a new RedoNode node
651
- def RedoNode(location = Location())
652
- RedoNode.new(location)
654
+ def RedoNode(source = nil, location = Location())
655
+ RedoNode.new(source, location)
653
656
  end
654
657
 
655
658
  # Create a new RegularExpressionNode node
656
- def RegularExpressionNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = Location())
657
- RegularExpressionNode.new(flags, opening_loc, content_loc, closing_loc, unescaped, location)
659
+ def RegularExpressionNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = nil, location = Location())
660
+ RegularExpressionNode.new(source, flags, opening_loc, content_loc, closing_loc, unescaped, location)
658
661
  end
659
662
 
660
663
  # Create a new RequiredKeywordParameterNode node
661
- def RequiredKeywordParameterNode(flags, name, name_loc, location = Location())
662
- RequiredKeywordParameterNode.new(flags, name, name_loc, location)
664
+ def RequiredKeywordParameterNode(flags, name, name_loc, source = nil, location = Location())
665
+ RequiredKeywordParameterNode.new(source, flags, name, name_loc, location)
663
666
  end
664
667
 
665
668
  # Create a new RequiredParameterNode node
666
- def RequiredParameterNode(flags, name, location = Location())
667
- RequiredParameterNode.new(flags, name, location)
669
+ def RequiredParameterNode(flags, name, source = nil, location = Location())
670
+ RequiredParameterNode.new(source, flags, name, location)
668
671
  end
669
672
 
670
673
  # Create a new RescueModifierNode node
671
- def RescueModifierNode(expression, keyword_loc, rescue_expression, location = Location())
672
- RescueModifierNode.new(expression, keyword_loc, rescue_expression, location)
674
+ def RescueModifierNode(expression, keyword_loc, rescue_expression, source = nil, location = Location())
675
+ RescueModifierNode.new(source, expression, keyword_loc, rescue_expression, location)
673
676
  end
674
677
 
675
678
  # Create a new RescueNode node
676
- def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location = Location())
677
- RescueNode.new(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location)
679
+ def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, source = nil, location = Location())
680
+ RescueNode.new(source, keyword_loc, exceptions, operator_loc, reference, statements, consequent, location)
678
681
  end
679
682
 
680
683
  # Create a new RestParameterNode node
681
- def RestParameterNode(flags, name, name_loc, operator_loc, location = Location())
682
- RestParameterNode.new(flags, name, name_loc, operator_loc, location)
684
+ def RestParameterNode(flags, name, name_loc, operator_loc, source = nil, location = Location())
685
+ RestParameterNode.new(source, flags, name, name_loc, operator_loc, location)
683
686
  end
684
687
 
685
688
  # Create a new RetryNode node
686
- def RetryNode(location = Location())
687
- RetryNode.new(location)
689
+ def RetryNode(source = nil, location = Location())
690
+ RetryNode.new(source, location)
688
691
  end
689
692
 
690
693
  # Create a new ReturnNode node
691
- def ReturnNode(keyword_loc, arguments, location = Location())
692
- ReturnNode.new(keyword_loc, arguments, location)
694
+ def ReturnNode(keyword_loc, arguments, source = nil, location = Location())
695
+ ReturnNode.new(source, keyword_loc, arguments, location)
693
696
  end
694
697
 
695
698
  # Create a new SelfNode node
696
- def SelfNode(location = Location())
697
- SelfNode.new(location)
699
+ def SelfNode(source = nil, location = Location())
700
+ SelfNode.new(source, location)
698
701
  end
699
702
 
700
703
  # Create a new SingletonClassNode node
701
- def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location = Location())
702
- SingletonClassNode.new(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location)
704
+ def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, source = nil, location = Location())
705
+ SingletonClassNode.new(source, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location)
703
706
  end
704
707
 
705
708
  # Create a new SourceEncodingNode node
706
- def SourceEncodingNode(location = Location())
707
- SourceEncodingNode.new(location)
709
+ def SourceEncodingNode(source = nil, location = Location())
710
+ SourceEncodingNode.new(source, location)
708
711
  end
709
712
 
710
713
  # Create a new SourceFileNode node
711
- def SourceFileNode(filepath, location = Location())
712
- SourceFileNode.new(filepath, location)
714
+ def SourceFileNode(filepath, source = nil, location = Location())
715
+ SourceFileNode.new(source, filepath, location)
713
716
  end
714
717
 
715
718
  # Create a new SourceLineNode node
716
- def SourceLineNode(location = Location())
717
- SourceLineNode.new(location)
719
+ def SourceLineNode(source = nil, location = Location())
720
+ SourceLineNode.new(source, location)
718
721
  end
719
722
 
720
723
  # Create a new SplatNode node
721
- def SplatNode(operator_loc, expression, location = Location())
722
- SplatNode.new(operator_loc, expression, location)
724
+ def SplatNode(operator_loc, expression, source = nil, location = Location())
725
+ SplatNode.new(source, operator_loc, expression, location)
723
726
  end
724
727
 
725
728
  # Create a new StatementsNode node
726
- def StatementsNode(body, location = Location())
727
- StatementsNode.new(body, location)
729
+ def StatementsNode(body, source = nil, location = Location())
730
+ StatementsNode.new(source, body, location)
728
731
  end
729
732
 
730
733
  # Create a new StringNode node
731
- def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = Location())
732
- StringNode.new(flags, opening_loc, content_loc, closing_loc, unescaped, location)
734
+ def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = nil, location = Location())
735
+ StringNode.new(source, flags, opening_loc, content_loc, closing_loc, unescaped, location)
733
736
  end
734
737
 
735
738
  # Create a new SuperNode node
736
- def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, location = Location())
737
- SuperNode.new(keyword_loc, lparen_loc, arguments, rparen_loc, block, location)
739
+ def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, source = nil, location = Location())
740
+ SuperNode.new(source, keyword_loc, lparen_loc, arguments, rparen_loc, block, location)
738
741
  end
739
742
 
740
743
  # Create a new SymbolNode node
741
- def SymbolNode(flags, opening_loc, value_loc, closing_loc, unescaped, location = Location())
742
- SymbolNode.new(flags, opening_loc, value_loc, closing_loc, unescaped, location)
744
+ def SymbolNode(flags, opening_loc, value_loc, closing_loc, unescaped, source = nil, location = Location())
745
+ SymbolNode.new(source, flags, opening_loc, value_loc, closing_loc, unescaped, location)
743
746
  end
744
747
 
745
748
  # Create a new TrueNode node
746
- def TrueNode(location = Location())
747
- TrueNode.new(location)
749
+ def TrueNode(source = nil, location = Location())
750
+ TrueNode.new(source, location)
748
751
  end
749
752
 
750
753
  # Create a new UndefNode node
751
- def UndefNode(names, keyword_loc, location = Location())
752
- UndefNode.new(names, keyword_loc, location)
754
+ def UndefNode(names, keyword_loc, source = nil, location = Location())
755
+ UndefNode.new(source, names, keyword_loc, location)
753
756
  end
754
757
 
755
758
  # Create a new UnlessNode node
756
- def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location = Location())
757
- UnlessNode.new(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location)
759
+ def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = nil, location = Location())
760
+ UnlessNode.new(source, keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location)
758
761
  end
759
762
 
760
763
  # Create a new UntilNode node
761
- def UntilNode(flags, keyword_loc, closing_loc, predicate, statements, location = Location())
762
- UntilNode.new(flags, keyword_loc, closing_loc, predicate, statements, location)
764
+ def UntilNode(flags, keyword_loc, closing_loc, predicate, statements, source = nil, location = Location())
765
+ UntilNode.new(source, flags, keyword_loc, closing_loc, predicate, statements, location)
763
766
  end
764
767
 
765
768
  # Create a new WhenNode node
766
- def WhenNode(keyword_loc, conditions, statements, location = Location())
767
- WhenNode.new(keyword_loc, conditions, statements, location)
769
+ def WhenNode(keyword_loc, conditions, statements, source = nil, location = Location())
770
+ WhenNode.new(source, keyword_loc, conditions, statements, location)
768
771
  end
769
772
 
770
773
  # Create a new WhileNode node
771
- def WhileNode(flags, keyword_loc, closing_loc, predicate, statements, location = Location())
772
- WhileNode.new(flags, keyword_loc, closing_loc, predicate, statements, location)
774
+ def WhileNode(flags, keyword_loc, closing_loc, predicate, statements, source = nil, location = Location())
775
+ WhileNode.new(source, flags, keyword_loc, closing_loc, predicate, statements, location)
773
776
  end
774
777
 
775
778
  # Create a new XStringNode node
776
- def XStringNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = Location())
777
- XStringNode.new(flags, opening_loc, content_loc, closing_loc, unescaped, location)
779
+ def XStringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = nil, location = Location())
780
+ XStringNode.new(source, flags, opening_loc, content_loc, closing_loc, unescaped, location)
778
781
  end
779
782
 
780
783
  # Create a new YieldNode node
781
- def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, location = Location())
782
- YieldNode.new(keyword_loc, lparen_loc, arguments, rparen_loc, location)
784
+ def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, source = nil, location = Location())
785
+ YieldNode.new(source, keyword_loc, lparen_loc, arguments, rparen_loc, location)
783
786
  end
784
787
  end
785
788
  end