Ruby: prism/api_node.c Source File

Ruby 4.0.5p0 (2026-05-20 revision 64336ffd0ee9e1f4c05891695a3d7b49cb709721)

api_node.c
1/* :markup: markdown */
2
3/*----------------------------------------------------------------------------*/
4/* This file is generated by the templates/template.rb script and should not */
5/* be modified manually. See */
6/* templates/ext/prism/api_node.c.erb */
7/* if you are looking to modify the */
8/* template */
9/*----------------------------------------------------------------------------*/
10
11#line 2 "prism/templates/ext/prism/api_node.c.erb"
12#include "prism/extension.h"
13
14extern VALUE rb_cPrism;
15extern VALUE rb_cPrismNode;
16extern VALUE rb_cPrismSource;
17extern VALUE rb_cPrismToken;
18extern VALUE rb_cPrismLocation;
19
20static VALUE rb_cPrismAliasGlobalVariableNode;
21static VALUE rb_cPrismAliasMethodNode;
22static VALUE rb_cPrismAlternationPatternNode;
23static VALUE rb_cPrismAndNode;
24static VALUE rb_cPrismArgumentsNode;
25static VALUE rb_cPrismArrayNode;
26static VALUE rb_cPrismArrayPatternNode;
27static VALUE rb_cPrismAssocNode;
28static VALUE rb_cPrismAssocSplatNode;
29static VALUE rb_cPrismBackReferenceReadNode;
30static VALUE rb_cPrismBeginNode;
31static VALUE rb_cPrismBlockArgumentNode;
32static VALUE rb_cPrismBlockLocalVariableNode;
33static VALUE rb_cPrismBlockNode;
34static VALUE rb_cPrismBlockParameterNode;
35static VALUE rb_cPrismBlockParametersNode;
36static VALUE rb_cPrismBreakNode;
37static VALUE rb_cPrismCallAndWriteNode;
38static VALUE rb_cPrismCallNode;
39static VALUE rb_cPrismCallOperatorWriteNode;
40static VALUE rb_cPrismCallOrWriteNode;
41static VALUE rb_cPrismCallTargetNode;
42static VALUE rb_cPrismCapturePatternNode;
43static VALUE rb_cPrismCaseMatchNode;
44static VALUE rb_cPrismCaseNode;
45static VALUE rb_cPrismClassNode;
46static VALUE rb_cPrismClassVariableAndWriteNode;
47static VALUE rb_cPrismClassVariableOperatorWriteNode;
48static VALUE rb_cPrismClassVariableOrWriteNode;
49static VALUE rb_cPrismClassVariableReadNode;
50static VALUE rb_cPrismClassVariableTargetNode;
51static VALUE rb_cPrismClassVariableWriteNode;
52static VALUE rb_cPrismConstantAndWriteNode;
53static VALUE rb_cPrismConstantOperatorWriteNode;
54static VALUE rb_cPrismConstantOrWriteNode;
55static VALUE rb_cPrismConstantPathAndWriteNode;
56static VALUE rb_cPrismConstantPathNode;
57static VALUE rb_cPrismConstantPathOperatorWriteNode;
58static VALUE rb_cPrismConstantPathOrWriteNode;
59static VALUE rb_cPrismConstantPathTargetNode;
60static VALUE rb_cPrismConstantPathWriteNode;
61static VALUE rb_cPrismConstantReadNode;
62static VALUE rb_cPrismConstantTargetNode;
63static VALUE rb_cPrismConstantWriteNode;
64static VALUE rb_cPrismDefNode;
65static VALUE rb_cPrismDefinedNode;
66static VALUE rb_cPrismElseNode;
67static VALUE rb_cPrismEmbeddedStatementsNode;
68static VALUE rb_cPrismEmbeddedVariableNode;
69static VALUE rb_cPrismEnsureNode;
70static VALUE rb_cPrismFalseNode;
71static VALUE rb_cPrismFindPatternNode;
72static VALUE rb_cPrismFlipFlopNode;
73static VALUE rb_cPrismFloatNode;
74static VALUE rb_cPrismForNode;
75static VALUE rb_cPrismForwardingArgumentsNode;
76static VALUE rb_cPrismForwardingParameterNode;
77static VALUE rb_cPrismForwardingSuperNode;
78static VALUE rb_cPrismGlobalVariableAndWriteNode;
79static VALUE rb_cPrismGlobalVariableOperatorWriteNode;
80static VALUE rb_cPrismGlobalVariableOrWriteNode;
81static VALUE rb_cPrismGlobalVariableReadNode;
82static VALUE rb_cPrismGlobalVariableTargetNode;
83static VALUE rb_cPrismGlobalVariableWriteNode;
84static VALUE rb_cPrismHashNode;
85static VALUE rb_cPrismHashPatternNode;
86static VALUE rb_cPrismIfNode;
87static VALUE rb_cPrismImaginaryNode;
88static VALUE rb_cPrismImplicitNode;
89static VALUE rb_cPrismImplicitRestNode;
90static VALUE rb_cPrismInNode;
91static VALUE rb_cPrismIndexAndWriteNode;
92static VALUE rb_cPrismIndexOperatorWriteNode;
93static VALUE rb_cPrismIndexOrWriteNode;
94static VALUE rb_cPrismIndexTargetNode;
95static VALUE rb_cPrismInstanceVariableAndWriteNode;
96static VALUE rb_cPrismInstanceVariableOperatorWriteNode;
97static VALUE rb_cPrismInstanceVariableOrWriteNode;
98static VALUE rb_cPrismInstanceVariableReadNode;
99static VALUE rb_cPrismInstanceVariableTargetNode;
100static VALUE rb_cPrismInstanceVariableWriteNode;
101static VALUE rb_cPrismIntegerNode;
102static VALUE rb_cPrismInterpolatedMatchLastLineNode;
103static VALUE rb_cPrismInterpolatedRegularExpressionNode;
104static VALUE rb_cPrismInterpolatedStringNode;
105static VALUE rb_cPrismInterpolatedSymbolNode;
106static VALUE rb_cPrismInterpolatedXStringNode;
107static VALUE rb_cPrismItLocalVariableReadNode;
108static VALUE rb_cPrismItParametersNode;
109static VALUE rb_cPrismKeywordHashNode;
110static VALUE rb_cPrismKeywordRestParameterNode;
111static VALUE rb_cPrismLambdaNode;
112static VALUE rb_cPrismLocalVariableAndWriteNode;
113static VALUE rb_cPrismLocalVariableOperatorWriteNode;
114static VALUE rb_cPrismLocalVariableOrWriteNode;
115static VALUE rb_cPrismLocalVariableReadNode;
116static VALUE rb_cPrismLocalVariableTargetNode;
117static VALUE rb_cPrismLocalVariableWriteNode;
118static VALUE rb_cPrismMatchLastLineNode;
119static VALUE rb_cPrismMatchPredicateNode;
120static VALUE rb_cPrismMatchRequiredNode;
121static VALUE rb_cPrismMatchWriteNode;
122static VALUE rb_cPrismMissingNode;
123static VALUE rb_cPrismModuleNode;
124static VALUE rb_cPrismMultiTargetNode;
125static VALUE rb_cPrismMultiWriteNode;
126static VALUE rb_cPrismNextNode;
127static VALUE rb_cPrismNilNode;
128static VALUE rb_cPrismNoKeywordsParameterNode;
129static VALUE rb_cPrismNumberedParametersNode;
130static VALUE rb_cPrismNumberedReferenceReadNode;
131static VALUE rb_cPrismOptionalKeywordParameterNode;
132static VALUE rb_cPrismOptionalParameterNode;
133static VALUE rb_cPrismOrNode;
134static VALUE rb_cPrismParametersNode;
135static VALUE rb_cPrismParenthesesNode;
136static VALUE rb_cPrismPinnedExpressionNode;
137static VALUE rb_cPrismPinnedVariableNode;
138static VALUE rb_cPrismPostExecutionNode;
139static VALUE rb_cPrismPreExecutionNode;
140static VALUE rb_cPrismProgramNode;
141static VALUE rb_cPrismRangeNode;
142static VALUE rb_cPrismRationalNode;
143static VALUE rb_cPrismRedoNode;
144static VALUE rb_cPrismRegularExpressionNode;
145static VALUE rb_cPrismRequiredKeywordParameterNode;
146static VALUE rb_cPrismRequiredParameterNode;
147static VALUE rb_cPrismRescueModifierNode;
148static VALUE rb_cPrismRescueNode;
149static VALUE rb_cPrismRestParameterNode;
150static VALUE rb_cPrismRetryNode;
151static VALUE rb_cPrismReturnNode;
152static VALUE rb_cPrismSelfNode;
153static VALUE rb_cPrismShareableConstantNode;
154static VALUE rb_cPrismSingletonClassNode;
155static VALUE rb_cPrismSourceEncodingNode;
156static VALUE rb_cPrismSourceFileNode;
157static VALUE rb_cPrismSourceLineNode;
158static VALUE rb_cPrismSplatNode;
159static VALUE rb_cPrismStatementsNode;
160static VALUE rb_cPrismStringNode;
161static VALUE rb_cPrismSuperNode;
162static VALUE rb_cPrismSymbolNode;
163static VALUE rb_cPrismTrueNode;
164static VALUE rb_cPrismUndefNode;
165static VALUE rb_cPrismUnlessNode;
166static VALUE rb_cPrismUntilNode;
167static VALUE rb_cPrismWhenNode;
168static VALUE rb_cPrismWhileNode;
169static VALUE rb_cPrismXStringNode;
170static VALUE rb_cPrismYieldNode;
171
172static VALUE
173pm_location_new(const pm_parser_t *parser, const uint8_t *start, const uint8_t *end, VALUE source, bool freeze) {
174 if (freeze) {
175 VALUE location_argv[] = {
176 source,
177 LONG2FIX(start - parser->start),
178 LONG2FIX(end - start)
179 };
180
181 return rb_obj_freeze(rb_class_new_instance(3, location_argv, rb_cPrismLocation));
182 } else {
183 uint64_t value = ((((uint64_t) (start - parser->start)) << 32) | ((uint32_t) (end - start)));
184 return ULL2NUM(value);
185 }
186}
187
188 VALUE
189pm_token_new(const pm_parser_t *parser, const pm_token_t *token, rb_encoding *encoding, VALUE source, bool freeze) {
190 ID type = rb_intern(pm_token_type_name(token->type));
191 VALUE location = pm_location_new(parser, token->start, token->end, source, freeze);
192
193 VALUE slice = rb_enc_str_new((const char *) token->start, token->end - token->start, encoding);
194 if (freeze) rb_obj_freeze(slice);
195
196 VALUE argv[] = { source, ID2SYM(type), slice, location };
197 VALUE value = rb_class_new_instance(4, argv, rb_cPrismToken);
198 if (freeze) rb_obj_freeze(value);
199
200 return value;
201}
202
203static VALUE
204pm_string_new(const pm_string_t *string, rb_encoding *encoding) {
205 return rb_obj_freeze(rb_enc_str_new((const char *) pm_string_source(string), pm_string_length(string), encoding));
206}
207
208 VALUE
209pm_integer_new(const pm_integer_t *integer) {
210 VALUE result;
211 if (integer->values == NULL) {
212 result = UINT2NUM(integer->value);
213 } else {
214 VALUE string = rb_str_new(NULL, integer->length * 8);
215 unsigned char *bytes = (unsigned char *) RSTRING_PTR(string);
216
217 size_t offset = integer->length * 8;
218 for (size_t value_index = 0; value_index < integer->length; value_index++) {
219 uint32_t value = integer->values[value_index];
220
221 for (int index = 0; index < 8; index++) {
222 int byte = (value >> (4 * index)) & 0xf;
223 bytes[--offset] = byte < 10 ? byte + '0' : byte - 10 + 'a';
224 }
225 }
226
227 result = rb_funcall(string, rb_intern("to_i"), 1, UINT2NUM(16));
228 }
229
230 if (integer->negative) {
231 result = rb_funcall(result, rb_intern("-@"), 0);
232 }
233
234 return result;
235}
236
237// Create a Prism::Source object from the given parser, after pm_parse() was called.
238 VALUE
239pm_source_new(const pm_parser_t *parser, rb_encoding *encoding, bool freeze) {
240 VALUE source_string = rb_enc_str_new((const char *) parser->start, parser->end - parser->start, encoding);
241
242 VALUE offsets = rb_ary_new_capa(parser->newline_list.size);
243 for (size_t index = 0; index < parser->newline_list.size; index++) {
244 rb_ary_push(offsets, ULONG2NUM(parser->newline_list.offsets[index]));
245 }
246
247 if (freeze) {
248 rb_obj_freeze(source_string);
249 rb_obj_freeze(offsets);
250 }
251
252 VALUE source = rb_funcall(rb_cPrismSource, rb_intern("for"), 3, source_string, LONG2NUM(parser->start_line), offsets);
253 if (freeze) rb_obj_freeze(source);
254
255 return source;
256}
257
258 typedef struct pm_node_stack_node {
259 struct pm_node_stack_node *prev;
260 const pm_node_t *visit;
261 bool visited;
262} pm_node_stack_node_t;
263
264static void
265pm_node_stack_push(pm_node_stack_node_t **stack, const pm_node_t *visit) {
266 pm_node_stack_node_t *node = xmalloc(sizeof(pm_node_stack_node_t));
267 node->prev = *stack;
268 node->visit = visit;
269 node->visited = false;
270 *stack = node;
271}
272
273static const pm_node_t *
274pm_node_stack_pop(pm_node_stack_node_t **stack) {
275 pm_node_stack_node_t *current = *stack;
276 const pm_node_t *visit = current->visit;
277
278 *stack = current->prev;
279 xfree(current);
280
281 return visit;
282}
283
284 VALUE
285pm_ast_new(const pm_parser_t *parser, const pm_node_t *node, rb_encoding *encoding, VALUE source, bool freeze) {
286 VALUE constants = rb_ary_new_capa(parser->constant_pool.size);
287
288 for (uint32_t index = 0; index < parser->constant_pool.size; index++) {
289 pm_constant_t *constant = &parser->constant_pool.constants[index];
290 int state = 0;
291
292 VALUE string = rb_enc_str_new((const char *) constant->start, constant->length, encoding);
293 VALUE value = rb_protect(rb_str_intern, string, &state);
294
295 if (state != 0) {
296 value = ID2SYM(rb_intern_const("?"));
297 rb_set_errinfo(Qnil);
298 }
299
300 rb_ary_push(constants, value);
301 }
302
303 pm_node_stack_node_t *node_stack = NULL;
304 pm_node_stack_push(&node_stack, node);
305 VALUE value_stack = rb_ary_new();
306
307 while (node_stack != NULL) {
308 if (!node_stack->visited) {
309 if (node_stack->visit == NULL) {
310 pm_node_stack_pop(&node_stack);
311 rb_ary_push(value_stack, Qnil);
312 continue;
313 }
314
315 const pm_node_t *node = node_stack->visit;
316 node_stack->visited = true;
317
318 switch (PM_NODE_TYPE(node)) {
319#line 164 "prism/templates/ext/prism/api_node.c.erb"
320 case PM_ALIAS_GLOBAL_VARIABLE_NODE: {
321 pm_alias_global_variable_node_t *cast = (pm_alias_global_variable_node_t *) node;
322 pm_node_stack_push(&node_stack, (pm_node_t *) cast->new_name);
323 pm_node_stack_push(&node_stack, (pm_node_t *) cast->old_name);
324 break;
325 }
326#line 164 "prism/templates/ext/prism/api_node.c.erb"
327 case PM_ALIAS_METHOD_NODE: {
328 pm_alias_method_node_t *cast = (pm_alias_method_node_t *) node;
329 pm_node_stack_push(&node_stack, (pm_node_t *) cast->new_name);
330 pm_node_stack_push(&node_stack, (pm_node_t *) cast->old_name);
331 break;
332 }
333#line 164 "prism/templates/ext/prism/api_node.c.erb"
334 case PM_ALTERNATION_PATTERN_NODE: {
335 pm_alternation_pattern_node_t *cast = (pm_alternation_pattern_node_t *) node;
336 pm_node_stack_push(&node_stack, (pm_node_t *) cast->left);
337 pm_node_stack_push(&node_stack, (pm_node_t *) cast->right);
338 break;
339 }
340#line 164 "prism/templates/ext/prism/api_node.c.erb"
341 case PM_AND_NODE: {
342 pm_and_node_t *cast = (pm_and_node_t *) node;
343 pm_node_stack_push(&node_stack, (pm_node_t *) cast->left);
344 pm_node_stack_push(&node_stack, (pm_node_t *) cast->right);
345 break;
346 }
347#line 164 "prism/templates/ext/prism/api_node.c.erb"
348 case PM_ARGUMENTS_NODE: {
349 pm_arguments_node_t *cast = (pm_arguments_node_t *) node;
350 for (size_t index = 0; index < cast->arguments.size; index++) {
351 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments.nodes[index]);
352 }
353 break;
354 }
355#line 164 "prism/templates/ext/prism/api_node.c.erb"
356 case PM_ARRAY_NODE: {
357 pm_array_node_t *cast = (pm_array_node_t *) node;
358 for (size_t index = 0; index < cast->elements.size; index++) {
359 pm_node_stack_push(&node_stack, (pm_node_t *) cast->elements.nodes[index]);
360 }
361 break;
362 }
363#line 164 "prism/templates/ext/prism/api_node.c.erb"
364 case PM_ARRAY_PATTERN_NODE: {
365 pm_array_pattern_node_t *cast = (pm_array_pattern_node_t *) node;
366 pm_node_stack_push(&node_stack, (pm_node_t *) cast->constant);
367 for (size_t index = 0; index < cast->requireds.size; index++) {
368 pm_node_stack_push(&node_stack, (pm_node_t *) cast->requireds.nodes[index]);
369 }
370 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rest);
371 for (size_t index = 0; index < cast->posts.size; index++) {
372 pm_node_stack_push(&node_stack, (pm_node_t *) cast->posts.nodes[index]);
373 }
374 break;
375 }
376#line 164 "prism/templates/ext/prism/api_node.c.erb"
377 case PM_ASSOC_NODE: {
378 pm_assoc_node_t *cast = (pm_assoc_node_t *) node;
379 pm_node_stack_push(&node_stack, (pm_node_t *) cast->key);
380 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
381 break;
382 }
383#line 164 "prism/templates/ext/prism/api_node.c.erb"
384 case PM_ASSOC_SPLAT_NODE: {
385 pm_assoc_splat_node_t *cast = (pm_assoc_splat_node_t *) node;
386 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
387 break;
388 }
389#line 164 "prism/templates/ext/prism/api_node.c.erb"
390 case PM_BEGIN_NODE: {
391 pm_begin_node_t *cast = (pm_begin_node_t *) node;
392 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
393 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rescue_clause);
394 pm_node_stack_push(&node_stack, (pm_node_t *) cast->else_clause);
395 pm_node_stack_push(&node_stack, (pm_node_t *) cast->ensure_clause);
396 break;
397 }
398#line 164 "prism/templates/ext/prism/api_node.c.erb"
399 case PM_BLOCK_ARGUMENT_NODE: {
400 pm_block_argument_node_t *cast = (pm_block_argument_node_t *) node;
401 pm_node_stack_push(&node_stack, (pm_node_t *) cast->expression);
402 break;
403 }
404#line 164 "prism/templates/ext/prism/api_node.c.erb"
405 case PM_BLOCK_NODE: {
406 pm_block_node_t *cast = (pm_block_node_t *) node;
407 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parameters);
408 pm_node_stack_push(&node_stack, (pm_node_t *) cast->body);
409 break;
410 }
411#line 164 "prism/templates/ext/prism/api_node.c.erb"
412 case PM_BLOCK_PARAMETERS_NODE: {
413 pm_block_parameters_node_t *cast = (pm_block_parameters_node_t *) node;
414 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parameters);
415 for (size_t index = 0; index < cast->locals.size; index++) {
416 pm_node_stack_push(&node_stack, (pm_node_t *) cast->locals.nodes[index]);
417 }
418 break;
419 }
420#line 164 "prism/templates/ext/prism/api_node.c.erb"
421 case PM_BREAK_NODE: {
422 pm_break_node_t *cast = (pm_break_node_t *) node;
423 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
424 break;
425 }
426#line 164 "prism/templates/ext/prism/api_node.c.erb"
427 case PM_CALL_AND_WRITE_NODE: {
428 pm_call_and_write_node_t *cast = (pm_call_and_write_node_t *) node;
429 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
430 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
431 break;
432 }
433#line 164 "prism/templates/ext/prism/api_node.c.erb"
434 case PM_CALL_NODE: {
435 pm_call_node_t *cast = (pm_call_node_t *) node;
436 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
437 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
438 pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
439 break;
440 }
441#line 164 "prism/templates/ext/prism/api_node.c.erb"
442 case PM_CALL_OPERATOR_WRITE_NODE: {
443 pm_call_operator_write_node_t *cast = (pm_call_operator_write_node_t *) node;
444 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
445 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
446 break;
447 }
448#line 164 "prism/templates/ext/prism/api_node.c.erb"
449 case PM_CALL_OR_WRITE_NODE: {
450 pm_call_or_write_node_t *cast = (pm_call_or_write_node_t *) node;
451 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
452 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
453 break;
454 }
455#line 164 "prism/templates/ext/prism/api_node.c.erb"
456 case PM_CALL_TARGET_NODE: {
457 pm_call_target_node_t *cast = (pm_call_target_node_t *) node;
458 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
459 break;
460 }
461#line 164 "prism/templates/ext/prism/api_node.c.erb"
462 case PM_CAPTURE_PATTERN_NODE: {
463 pm_capture_pattern_node_t *cast = (pm_capture_pattern_node_t *) node;
464 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
465 pm_node_stack_push(&node_stack, (pm_node_t *) cast->target);
466 break;
467 }
468#line 164 "prism/templates/ext/prism/api_node.c.erb"
469 case PM_CASE_MATCH_NODE: {
470 pm_case_match_node_t *cast = (pm_case_match_node_t *) node;
471 pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate);
472 for (size_t index = 0; index < cast->conditions.size; index++) {
473 pm_node_stack_push(&node_stack, (pm_node_t *) cast->conditions.nodes[index]);
474 }
475 pm_node_stack_push(&node_stack, (pm_node_t *) cast->else_clause);
476 break;
477 }
478#line 164 "prism/templates/ext/prism/api_node.c.erb"
479 case PM_CASE_NODE: {
480 pm_case_node_t *cast = (pm_case_node_t *) node;
481 pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate);
482 for (size_t index = 0; index < cast->conditions.size; index++) {
483 pm_node_stack_push(&node_stack, (pm_node_t *) cast->conditions.nodes[index]);
484 }
485 pm_node_stack_push(&node_stack, (pm_node_t *) cast->else_clause);
486 break;
487 }
488#line 164 "prism/templates/ext/prism/api_node.c.erb"
489 case PM_CLASS_NODE: {
490 pm_class_node_t *cast = (pm_class_node_t *) node;
491 pm_node_stack_push(&node_stack, (pm_node_t *) cast->constant_path);
492 pm_node_stack_push(&node_stack, (pm_node_t *) cast->superclass);
493 pm_node_stack_push(&node_stack, (pm_node_t *) cast->body);
494 break;
495 }
496#line 164 "prism/templates/ext/prism/api_node.c.erb"
497 case PM_CLASS_VARIABLE_AND_WRITE_NODE: {
498 pm_class_variable_and_write_node_t *cast = (pm_class_variable_and_write_node_t *) node;
499 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
500 break;
501 }
502#line 164 "prism/templates/ext/prism/api_node.c.erb"
503 case PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE: {
504 pm_class_variable_operator_write_node_t *cast = (pm_class_variable_operator_write_node_t *) node;
505 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
506 break;
507 }
508#line 164 "prism/templates/ext/prism/api_node.c.erb"
509 case PM_CLASS_VARIABLE_OR_WRITE_NODE: {
510 pm_class_variable_or_write_node_t *cast = (pm_class_variable_or_write_node_t *) node;
511 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
512 break;
513 }
514#line 164 "prism/templates/ext/prism/api_node.c.erb"
515 case PM_CLASS_VARIABLE_WRITE_NODE: {
516 pm_class_variable_write_node_t *cast = (pm_class_variable_write_node_t *) node;
517 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
518 break;
519 }
520#line 164 "prism/templates/ext/prism/api_node.c.erb"
521 case PM_CONSTANT_AND_WRITE_NODE: {
522 pm_constant_and_write_node_t *cast = (pm_constant_and_write_node_t *) node;
523 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
524 break;
525 }
526#line 164 "prism/templates/ext/prism/api_node.c.erb"
527 case PM_CONSTANT_OPERATOR_WRITE_NODE: {
528 pm_constant_operator_write_node_t *cast = (pm_constant_operator_write_node_t *) node;
529 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
530 break;
531 }
532#line 164 "prism/templates/ext/prism/api_node.c.erb"
533 case PM_CONSTANT_OR_WRITE_NODE: {
534 pm_constant_or_write_node_t *cast = (pm_constant_or_write_node_t *) node;
535 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
536 break;
537 }
538#line 164 "prism/templates/ext/prism/api_node.c.erb"
539 case PM_CONSTANT_PATH_AND_WRITE_NODE: {
540 pm_constant_path_and_write_node_t *cast = (pm_constant_path_and_write_node_t *) node;
541 pm_node_stack_push(&node_stack, (pm_node_t *) cast->target);
542 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
543 break;
544 }
545#line 164 "prism/templates/ext/prism/api_node.c.erb"
546 case PM_CONSTANT_PATH_NODE: {
547 pm_constant_path_node_t *cast = (pm_constant_path_node_t *) node;
548 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parent);
549 break;
550 }
551#line 164 "prism/templates/ext/prism/api_node.c.erb"
552 case PM_CONSTANT_PATH_OPERATOR_WRITE_NODE: {
553 pm_constant_path_operator_write_node_t *cast = (pm_constant_path_operator_write_node_t *) node;
554 pm_node_stack_push(&node_stack, (pm_node_t *) cast->target);
555 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
556 break;
557 }
558#line 164 "prism/templates/ext/prism/api_node.c.erb"
559 case PM_CONSTANT_PATH_OR_WRITE_NODE: {
560 pm_constant_path_or_write_node_t *cast = (pm_constant_path_or_write_node_t *) node;
561 pm_node_stack_push(&node_stack, (pm_node_t *) cast->target);
562 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
563 break;
564 }
565#line 164 "prism/templates/ext/prism/api_node.c.erb"
566 case PM_CONSTANT_PATH_TARGET_NODE: {
567 pm_constant_path_target_node_t *cast = (pm_constant_path_target_node_t *) node;
568 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parent);
569 break;
570 }
571#line 164 "prism/templates/ext/prism/api_node.c.erb"
572 case PM_CONSTANT_PATH_WRITE_NODE: {
573 pm_constant_path_write_node_t *cast = (pm_constant_path_write_node_t *) node;
574 pm_node_stack_push(&node_stack, (pm_node_t *) cast->target);
575 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
576 break;
577 }
578#line 164 "prism/templates/ext/prism/api_node.c.erb"
579 case PM_CONSTANT_WRITE_NODE: {
580 pm_constant_write_node_t *cast = (pm_constant_write_node_t *) node;
581 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
582 break;
583 }
584#line 164 "prism/templates/ext/prism/api_node.c.erb"
585 case PM_DEF_NODE: {
586 pm_def_node_t *cast = (pm_def_node_t *) node;
587 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
588 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parameters);
589 pm_node_stack_push(&node_stack, (pm_node_t *) cast->body);
590 break;
591 }
592#line 164 "prism/templates/ext/prism/api_node.c.erb"
593 case PM_DEFINED_NODE: {
594 pm_defined_node_t *cast = (pm_defined_node_t *) node;
595 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
596 break;
597 }
598#line 164 "prism/templates/ext/prism/api_node.c.erb"
599 case PM_ELSE_NODE: {
600 pm_else_node_t *cast = (pm_else_node_t *) node;
601 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
602 break;
603 }
604#line 164 "prism/templates/ext/prism/api_node.c.erb"
605 case PM_EMBEDDED_STATEMENTS_NODE: {
606 pm_embedded_statements_node_t *cast = (pm_embedded_statements_node_t *) node;
607 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
608 break;
609 }
610#line 164 "prism/templates/ext/prism/api_node.c.erb"
611 case PM_EMBEDDED_VARIABLE_NODE: {
612 pm_embedded_variable_node_t *cast = (pm_embedded_variable_node_t *) node;
613 pm_node_stack_push(&node_stack, (pm_node_t *) cast->variable);
614 break;
615 }
616#line 164 "prism/templates/ext/prism/api_node.c.erb"
617 case PM_ENSURE_NODE: {
618 pm_ensure_node_t *cast = (pm_ensure_node_t *) node;
619 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
620 break;
621 }
622#line 164 "prism/templates/ext/prism/api_node.c.erb"
623 case PM_FIND_PATTERN_NODE: {
624 pm_find_pattern_node_t *cast = (pm_find_pattern_node_t *) node;
625 pm_node_stack_push(&node_stack, (pm_node_t *) cast->constant);
626 pm_node_stack_push(&node_stack, (pm_node_t *) cast->left);
627 for (size_t index = 0; index < cast->requireds.size; index++) {
628 pm_node_stack_push(&node_stack, (pm_node_t *) cast->requireds.nodes[index]);
629 }
630 pm_node_stack_push(&node_stack, (pm_node_t *) cast->right);
631 break;
632 }
633#line 164 "prism/templates/ext/prism/api_node.c.erb"
634 case PM_FLIP_FLOP_NODE: {
635 pm_flip_flop_node_t *cast = (pm_flip_flop_node_t *) node;
636 pm_node_stack_push(&node_stack, (pm_node_t *) cast->left);
637 pm_node_stack_push(&node_stack, (pm_node_t *) cast->right);
638 break;
639 }
640#line 164 "prism/templates/ext/prism/api_node.c.erb"
641 case PM_FOR_NODE: {
642 pm_for_node_t *cast = (pm_for_node_t *) node;
643 pm_node_stack_push(&node_stack, (pm_node_t *) cast->index);
644 pm_node_stack_push(&node_stack, (pm_node_t *) cast->collection);
645 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
646 break;
647 }
648#line 164 "prism/templates/ext/prism/api_node.c.erb"
649 case PM_FORWARDING_SUPER_NODE: {
650 pm_forwarding_super_node_t *cast = (pm_forwarding_super_node_t *) node;
651 pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
652 break;
653 }
654#line 164 "prism/templates/ext/prism/api_node.c.erb"
655 case PM_GLOBAL_VARIABLE_AND_WRITE_NODE: {
656 pm_global_variable_and_write_node_t *cast = (pm_global_variable_and_write_node_t *) node;
657 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
658 break;
659 }
660#line 164 "prism/templates/ext/prism/api_node.c.erb"
661 case PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: {
662 pm_global_variable_operator_write_node_t *cast = (pm_global_variable_operator_write_node_t *) node;
663 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
664 break;
665 }
666#line 164 "prism/templates/ext/prism/api_node.c.erb"
667 case PM_GLOBAL_VARIABLE_OR_WRITE_NODE: {
668 pm_global_variable_or_write_node_t *cast = (pm_global_variable_or_write_node_t *) node;
669 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
670 break;
671 }
672#line 164 "prism/templates/ext/prism/api_node.c.erb"
673 case PM_GLOBAL_VARIABLE_WRITE_NODE: {
674 pm_global_variable_write_node_t *cast = (pm_global_variable_write_node_t *) node;
675 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
676 break;
677 }
678#line 164 "prism/templates/ext/prism/api_node.c.erb"
679 case PM_HASH_NODE: {
680 pm_hash_node_t *cast = (pm_hash_node_t *) node;
681 for (size_t index = 0; index < cast->elements.size; index++) {
682 pm_node_stack_push(&node_stack, (pm_node_t *) cast->elements.nodes[index]);
683 }
684 break;
685 }
686#line 164 "prism/templates/ext/prism/api_node.c.erb"
687 case PM_HASH_PATTERN_NODE: {
688 pm_hash_pattern_node_t *cast = (pm_hash_pattern_node_t *) node;
689 pm_node_stack_push(&node_stack, (pm_node_t *) cast->constant);
690 for (size_t index = 0; index < cast->elements.size; index++) {
691 pm_node_stack_push(&node_stack, (pm_node_t *) cast->elements.nodes[index]);
692 }
693 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rest);
694 break;
695 }
696#line 164 "prism/templates/ext/prism/api_node.c.erb"
697 case PM_IF_NODE: {
698 pm_if_node_t *cast = (pm_if_node_t *) node;
699 pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate);
700 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
701 pm_node_stack_push(&node_stack, (pm_node_t *) cast->subsequent);
702 break;
703 }
704#line 164 "prism/templates/ext/prism/api_node.c.erb"
705 case PM_IMAGINARY_NODE: {
706 pm_imaginary_node_t *cast = (pm_imaginary_node_t *) node;
707 pm_node_stack_push(&node_stack, (pm_node_t *) cast->numeric);
708 break;
709 }
710#line 164 "prism/templates/ext/prism/api_node.c.erb"
711 case PM_IMPLICIT_NODE: {
712 pm_implicit_node_t *cast = (pm_implicit_node_t *) node;
713 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
714 break;
715 }
716#line 164 "prism/templates/ext/prism/api_node.c.erb"
717 case PM_IN_NODE: {
718 pm_in_node_t *cast = (pm_in_node_t *) node;
719 pm_node_stack_push(&node_stack, (pm_node_t *) cast->pattern);
720 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
721 break;
722 }
723#line 164 "prism/templates/ext/prism/api_node.c.erb"
724 case PM_INDEX_AND_WRITE_NODE: {
725 pm_index_and_write_node_t *cast = (pm_index_and_write_node_t *) node;
726 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
727 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
728 pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
729 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
730 break;
731 }
732#line 164 "prism/templates/ext/prism/api_node.c.erb"
733 case PM_INDEX_OPERATOR_WRITE_NODE: {
734 pm_index_operator_write_node_t *cast = (pm_index_operator_write_node_t *) node;
735 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
736 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
737 pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
738 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
739 break;
740 }
741#line 164 "prism/templates/ext/prism/api_node.c.erb"
742 case PM_INDEX_OR_WRITE_NODE: {
743 pm_index_or_write_node_t *cast = (pm_index_or_write_node_t *) node;
744 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
745 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
746 pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
747 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
748 break;
749 }
750#line 164 "prism/templates/ext/prism/api_node.c.erb"
751 case PM_INDEX_TARGET_NODE: {
752 pm_index_target_node_t *cast = (pm_index_target_node_t *) node;
753 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
754 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
755 pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
756 break;
757 }
758#line 164 "prism/templates/ext/prism/api_node.c.erb"
759 case PM_INSTANCE_VARIABLE_AND_WRITE_NODE: {
760 pm_instance_variable_and_write_node_t *cast = (pm_instance_variable_and_write_node_t *) node;
761 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
762 break;
763 }
764#line 164 "prism/templates/ext/prism/api_node.c.erb"
765 case PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: {
766 pm_instance_variable_operator_write_node_t *cast = (pm_instance_variable_operator_write_node_t *) node;
767 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
768 break;
769 }
770#line 164 "prism/templates/ext/prism/api_node.c.erb"
771 case PM_INSTANCE_VARIABLE_OR_WRITE_NODE: {
772 pm_instance_variable_or_write_node_t *cast = (pm_instance_variable_or_write_node_t *) node;
773 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
774 break;
775 }
776#line 164 "prism/templates/ext/prism/api_node.c.erb"
777 case PM_INSTANCE_VARIABLE_WRITE_NODE: {
778 pm_instance_variable_write_node_t *cast = (pm_instance_variable_write_node_t *) node;
779 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
780 break;
781 }
782#line 164 "prism/templates/ext/prism/api_node.c.erb"
783 case PM_INTERPOLATED_MATCH_LAST_LINE_NODE: {
784 pm_interpolated_match_last_line_node_t *cast = (pm_interpolated_match_last_line_node_t *) node;
785 for (size_t index = 0; index < cast->parts.size; index++) {
786 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parts.nodes[index]);
787 }
788 break;
789 }
790#line 164 "prism/templates/ext/prism/api_node.c.erb"
791 case PM_INTERPOLATED_REGULAR_EXPRESSION_NODE: {
792 pm_interpolated_regular_expression_node_t *cast = (pm_interpolated_regular_expression_node_t *) node;
793 for (size_t index = 0; index < cast->parts.size; index++) {
794 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parts.nodes[index]);
795 }
796 break;
797 }
798#line 164 "prism/templates/ext/prism/api_node.c.erb"
799 case PM_INTERPOLATED_STRING_NODE: {
800 pm_interpolated_string_node_t *cast = (pm_interpolated_string_node_t *) node;
801 for (size_t index = 0; index < cast->parts.size; index++) {
802 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parts.nodes[index]);
803 }
804 break;
805 }
806#line 164 "prism/templates/ext/prism/api_node.c.erb"
807 case PM_INTERPOLATED_SYMBOL_NODE: {
808 pm_interpolated_symbol_node_t *cast = (pm_interpolated_symbol_node_t *) node;
809 for (size_t index = 0; index < cast->parts.size; index++) {
810 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parts.nodes[index]);
811 }
812 break;
813 }
814#line 164 "prism/templates/ext/prism/api_node.c.erb"
815 case PM_INTERPOLATED_X_STRING_NODE: {
816 pm_interpolated_x_string_node_t *cast = (pm_interpolated_x_string_node_t *) node;
817 for (size_t index = 0; index < cast->parts.size; index++) {
818 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parts.nodes[index]);
819 }
820 break;
821 }
822#line 164 "prism/templates/ext/prism/api_node.c.erb"
823 case PM_KEYWORD_HASH_NODE: {
824 pm_keyword_hash_node_t *cast = (pm_keyword_hash_node_t *) node;
825 for (size_t index = 0; index < cast->elements.size; index++) {
826 pm_node_stack_push(&node_stack, (pm_node_t *) cast->elements.nodes[index]);
827 }
828 break;
829 }
830#line 164 "prism/templates/ext/prism/api_node.c.erb"
831 case PM_LAMBDA_NODE: {
832 pm_lambda_node_t *cast = (pm_lambda_node_t *) node;
833 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parameters);
834 pm_node_stack_push(&node_stack, (pm_node_t *) cast->body);
835 break;
836 }
837#line 164 "prism/templates/ext/prism/api_node.c.erb"
838 case PM_LOCAL_VARIABLE_AND_WRITE_NODE: {
839 pm_local_variable_and_write_node_t *cast = (pm_local_variable_and_write_node_t *) node;
840 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
841 break;
842 }
843#line 164 "prism/templates/ext/prism/api_node.c.erb"
844 case PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: {
845 pm_local_variable_operator_write_node_t *cast = (pm_local_variable_operator_write_node_t *) node;
846 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
847 break;
848 }
849#line 164 "prism/templates/ext/prism/api_node.c.erb"
850 case PM_LOCAL_VARIABLE_OR_WRITE_NODE: {
851 pm_local_variable_or_write_node_t *cast = (pm_local_variable_or_write_node_t *) node;
852 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
853 break;
854 }
855#line 164 "prism/templates/ext/prism/api_node.c.erb"
856 case PM_LOCAL_VARIABLE_WRITE_NODE: {
857 pm_local_variable_write_node_t *cast = (pm_local_variable_write_node_t *) node;
858 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
859 break;
860 }
861#line 164 "prism/templates/ext/prism/api_node.c.erb"
862 case PM_MATCH_PREDICATE_NODE: {
863 pm_match_predicate_node_t *cast = (pm_match_predicate_node_t *) node;
864 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
865 pm_node_stack_push(&node_stack, (pm_node_t *) cast->pattern);
866 break;
867 }
868#line 164 "prism/templates/ext/prism/api_node.c.erb"
869 case PM_MATCH_REQUIRED_NODE: {
870 pm_match_required_node_t *cast = (pm_match_required_node_t *) node;
871 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
872 pm_node_stack_push(&node_stack, (pm_node_t *) cast->pattern);
873 break;
874 }
875#line 164 "prism/templates/ext/prism/api_node.c.erb"
876 case PM_MATCH_WRITE_NODE: {
877 pm_match_write_node_t *cast = (pm_match_write_node_t *) node;
878 pm_node_stack_push(&node_stack, (pm_node_t *) cast->call);
879 for (size_t index = 0; index < cast->targets.size; index++) {
880 pm_node_stack_push(&node_stack, (pm_node_t *) cast->targets.nodes[index]);
881 }
882 break;
883 }
884#line 164 "prism/templates/ext/prism/api_node.c.erb"
885 case PM_MODULE_NODE: {
886 pm_module_node_t *cast = (pm_module_node_t *) node;
887 pm_node_stack_push(&node_stack, (pm_node_t *) cast->constant_path);
888 pm_node_stack_push(&node_stack, (pm_node_t *) cast->body);
889 break;
890 }
891#line 164 "prism/templates/ext/prism/api_node.c.erb"
892 case PM_MULTI_TARGET_NODE: {
893 pm_multi_target_node_t *cast = (pm_multi_target_node_t *) node;
894 for (size_t index = 0; index < cast->lefts.size; index++) {
895 pm_node_stack_push(&node_stack, (pm_node_t *) cast->lefts.nodes[index]);
896 }
897 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rest);
898 for (size_t index = 0; index < cast->rights.size; index++) {
899 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rights.nodes[index]);
900 }
901 break;
902 }
903#line 164 "prism/templates/ext/prism/api_node.c.erb"
904 case PM_MULTI_WRITE_NODE: {
905 pm_multi_write_node_t *cast = (pm_multi_write_node_t *) node;
906 for (size_t index = 0; index < cast->lefts.size; index++) {
907 pm_node_stack_push(&node_stack, (pm_node_t *) cast->lefts.nodes[index]);
908 }
909 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rest);
910 for (size_t index = 0; index < cast->rights.size; index++) {
911 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rights.nodes[index]);
912 }
913 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
914 break;
915 }
916#line 164 "prism/templates/ext/prism/api_node.c.erb"
917 case PM_NEXT_NODE: {
918 pm_next_node_t *cast = (pm_next_node_t *) node;
919 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
920 break;
921 }
922#line 164 "prism/templates/ext/prism/api_node.c.erb"
923 case PM_OPTIONAL_KEYWORD_PARAMETER_NODE: {
924 pm_optional_keyword_parameter_node_t *cast = (pm_optional_keyword_parameter_node_t *) node;
925 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
926 break;
927 }
928#line 164 "prism/templates/ext/prism/api_node.c.erb"
929 case PM_OPTIONAL_PARAMETER_NODE: {
930 pm_optional_parameter_node_t *cast = (pm_optional_parameter_node_t *) node;
931 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
932 break;
933 }
934#line 164 "prism/templates/ext/prism/api_node.c.erb"
935 case PM_OR_NODE: {
936 pm_or_node_t *cast = (pm_or_node_t *) node;
937 pm_node_stack_push(&node_stack, (pm_node_t *) cast->left);
938 pm_node_stack_push(&node_stack, (pm_node_t *) cast->right);
939 break;
940 }
941#line 164 "prism/templates/ext/prism/api_node.c.erb"
942 case PM_PARAMETERS_NODE: {
943 pm_parameters_node_t *cast = (pm_parameters_node_t *) node;
944 for (size_t index = 0; index < cast->requireds.size; index++) {
945 pm_node_stack_push(&node_stack, (pm_node_t *) cast->requireds.nodes[index]);
946 }
947 for (size_t index = 0; index < cast->optionals.size; index++) {
948 pm_node_stack_push(&node_stack, (pm_node_t *) cast->optionals.nodes[index]);
949 }
950 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rest);
951 for (size_t index = 0; index < cast->posts.size; index++) {
952 pm_node_stack_push(&node_stack, (pm_node_t *) cast->posts.nodes[index]);
953 }
954 for (size_t index = 0; index < cast->keywords.size; index++) {
955 pm_node_stack_push(&node_stack, (pm_node_t *) cast->keywords.nodes[index]);
956 }
957 pm_node_stack_push(&node_stack, (pm_node_t *) cast->keyword_rest);
958 pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
959 break;
960 }
961#line 164 "prism/templates/ext/prism/api_node.c.erb"
962 case PM_PARENTHESES_NODE: {
963 pm_parentheses_node_t *cast = (pm_parentheses_node_t *) node;
964 pm_node_stack_push(&node_stack, (pm_node_t *) cast->body);
965 break;
966 }
967#line 164 "prism/templates/ext/prism/api_node.c.erb"
968 case PM_PINNED_EXPRESSION_NODE: {
969 pm_pinned_expression_node_t *cast = (pm_pinned_expression_node_t *) node;
970 pm_node_stack_push(&node_stack, (pm_node_t *) cast->expression);
971 break;
972 }
973#line 164 "prism/templates/ext/prism/api_node.c.erb"
974 case PM_PINNED_VARIABLE_NODE: {
975 pm_pinned_variable_node_t *cast = (pm_pinned_variable_node_t *) node;
976 pm_node_stack_push(&node_stack, (pm_node_t *) cast->variable);
977 break;
978 }
979#line 164 "prism/templates/ext/prism/api_node.c.erb"
980 case PM_POST_EXECUTION_NODE: {
981 pm_post_execution_node_t *cast = (pm_post_execution_node_t *) node;
982 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
983 break;
984 }
985#line 164 "prism/templates/ext/prism/api_node.c.erb"
986 case PM_PRE_EXECUTION_NODE: {
987 pm_pre_execution_node_t *cast = (pm_pre_execution_node_t *) node;
988 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
989 break;
990 }
991#line 164 "prism/templates/ext/prism/api_node.c.erb"
992 case PM_PROGRAM_NODE: {
993 pm_program_node_t *cast = (pm_program_node_t *) node;
994 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
995 break;
996 }
997#line 164 "prism/templates/ext/prism/api_node.c.erb"
998 case PM_RANGE_NODE: {
999 pm_range_node_t *cast = (pm_range_node_t *) node;
1000 pm_node_stack_push(&node_stack, (pm_node_t *) cast->left);
1001 pm_node_stack_push(&node_stack, (pm_node_t *) cast->right);
1002 break;
1003 }
1004#line 164 "prism/templates/ext/prism/api_node.c.erb"
1005 case PM_RESCUE_MODIFIER_NODE: {
1006 pm_rescue_modifier_node_t *cast = (pm_rescue_modifier_node_t *) node;
1007 pm_node_stack_push(&node_stack, (pm_node_t *) cast->expression);
1008 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rescue_expression);
1009 break;
1010 }
1011#line 164 "prism/templates/ext/prism/api_node.c.erb"
1012 case PM_RESCUE_NODE: {
1013 pm_rescue_node_t *cast = (pm_rescue_node_t *) node;
1014 for (size_t index = 0; index < cast->exceptions.size; index++) {
1015 pm_node_stack_push(&node_stack, (pm_node_t *) cast->exceptions.nodes[index]);
1016 }
1017 pm_node_stack_push(&node_stack, (pm_node_t *) cast->reference);
1018 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
1019 pm_node_stack_push(&node_stack, (pm_node_t *) cast->subsequent);
1020 break;
1021 }
1022#line 164 "prism/templates/ext/prism/api_node.c.erb"
1023 case PM_RETURN_NODE: {
1024 pm_return_node_t *cast = (pm_return_node_t *) node;
1025 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
1026 break;
1027 }
1028#line 164 "prism/templates/ext/prism/api_node.c.erb"
1029 case PM_SHAREABLE_CONSTANT_NODE: {
1030 pm_shareable_constant_node_t *cast = (pm_shareable_constant_node_t *) node;
1031 pm_node_stack_push(&node_stack, (pm_node_t *) cast->write);
1032 break;
1033 }
1034#line 164 "prism/templates/ext/prism/api_node.c.erb"
1035 case PM_SINGLETON_CLASS_NODE: {
1036 pm_singleton_class_node_t *cast = (pm_singleton_class_node_t *) node;
1037 pm_node_stack_push(&node_stack, (pm_node_t *) cast->expression);
1038 pm_node_stack_push(&node_stack, (pm_node_t *) cast->body);
1039 break;
1040 }
1041#line 164 "prism/templates/ext/prism/api_node.c.erb"
1042 case PM_SPLAT_NODE: {
1043 pm_splat_node_t *cast = (pm_splat_node_t *) node;
1044 pm_node_stack_push(&node_stack, (pm_node_t *) cast->expression);
1045 break;
1046 }
1047#line 164 "prism/templates/ext/prism/api_node.c.erb"
1048 case PM_STATEMENTS_NODE: {
1049 pm_statements_node_t *cast = (pm_statements_node_t *) node;
1050 for (size_t index = 0; index < cast->body.size; index++) {
1051 pm_node_stack_push(&node_stack, (pm_node_t *) cast->body.nodes[index]);
1052 }
1053 break;
1054 }
1055#line 164 "prism/templates/ext/prism/api_node.c.erb"
1056 case PM_SUPER_NODE: {
1057 pm_super_node_t *cast = (pm_super_node_t *) node;
1058 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
1059 pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
1060 break;
1061 }
1062#line 164 "prism/templates/ext/prism/api_node.c.erb"
1063 case PM_UNDEF_NODE: {
1064 pm_undef_node_t *cast = (pm_undef_node_t *) node;
1065 for (size_t index = 0; index < cast->names.size; index++) {
1066 pm_node_stack_push(&node_stack, (pm_node_t *) cast->names.nodes[index]);
1067 }
1068 break;
1069 }
1070#line 164 "prism/templates/ext/prism/api_node.c.erb"
1071 case PM_UNLESS_NODE: {
1072 pm_unless_node_t *cast = (pm_unless_node_t *) node;
1073 pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate);
1074 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
1075 pm_node_stack_push(&node_stack, (pm_node_t *) cast->else_clause);
1076 break;
1077 }
1078#line 164 "prism/templates/ext/prism/api_node.c.erb"
1079 case PM_UNTIL_NODE: {
1080 pm_until_node_t *cast = (pm_until_node_t *) node;
1081 pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate);
1082 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
1083 break;
1084 }
1085#line 164 "prism/templates/ext/prism/api_node.c.erb"
1086 case PM_WHEN_NODE: {
1087 pm_when_node_t *cast = (pm_when_node_t *) node;
1088 for (size_t index = 0; index < cast->conditions.size; index++) {
1089 pm_node_stack_push(&node_stack, (pm_node_t *) cast->conditions.nodes[index]);
1090 }
1091 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
1092 break;
1093 }
1094#line 164 "prism/templates/ext/prism/api_node.c.erb"
1095 case PM_WHILE_NODE: {
1096 pm_while_node_t *cast = (pm_while_node_t *) node;
1097 pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate);
1098 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
1099 break;
1100 }
1101#line 164 "prism/templates/ext/prism/api_node.c.erb"
1102 case PM_YIELD_NODE: {
1103 pm_yield_node_t *cast = (pm_yield_node_t *) node;
1104 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
1105 break;
1106 }
1107 default:
1108 break;
1109 }
1110#line 184 "prism/templates/ext/prism/api_node.c.erb"
1111 } else {
1112 const pm_node_t *node = pm_node_stack_pop(&node_stack);
1113
1114 switch (PM_NODE_TYPE(node)) {
1115#line 190 "prism/templates/ext/prism/api_node.c.erb"
1116 case PM_ALIAS_GLOBAL_VARIABLE_NODE: {
1117 pm_alias_global_variable_node_t *cast = (pm_alias_global_variable_node_t *) node;
1118 VALUE argv[7];
1119
1120 // source
1121 argv[0] = source;
1122
1123 // node_id
1124 argv[1] = ULONG2NUM(node->node_id);
1125
1126 // location
1127 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1128
1129 // flags
1130 argv[3] = ULONG2NUM(node->flags);
1131
1132 // new_name
1133#line 213 "prism/templates/ext/prism/api_node.c.erb"
1134 argv[4] = rb_ary_pop(value_stack);
1135
1136 // old_name
1137#line 213 "prism/templates/ext/prism/api_node.c.erb"
1138 argv[5] = rb_ary_pop(value_stack);
1139
1140 // keyword_loc
1141#line 240 "prism/templates/ext/prism/api_node.c.erb"
1142 argv[6] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
1143
1144 VALUE value = rb_class_new_instance(7, argv, rb_cPrismAliasGlobalVariableNode);
1145 if (freeze) rb_obj_freeze(value);
1146
1147 rb_ary_push(value_stack, value);
1148 break;
1149 }
1150#line 190 "prism/templates/ext/prism/api_node.c.erb"
1151 case PM_ALIAS_METHOD_NODE: {
1152 pm_alias_method_node_t *cast = (pm_alias_method_node_t *) node;
1153 VALUE argv[7];
1154
1155 // source
1156 argv[0] = source;
1157
1158 // node_id
1159 argv[1] = ULONG2NUM(node->node_id);
1160
1161 // location
1162 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1163
1164 // flags
1165 argv[3] = ULONG2NUM(node->flags);
1166
1167 // new_name
1168#line 213 "prism/templates/ext/prism/api_node.c.erb"
1169 argv[4] = rb_ary_pop(value_stack);
1170
1171 // old_name
1172#line 213 "prism/templates/ext/prism/api_node.c.erb"
1173 argv[5] = rb_ary_pop(value_stack);
1174
1175 // keyword_loc
1176#line 240 "prism/templates/ext/prism/api_node.c.erb"
1177 argv[6] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
1178
1179 VALUE value = rb_class_new_instance(7, argv, rb_cPrismAliasMethodNode);
1180 if (freeze) rb_obj_freeze(value);
1181
1182 rb_ary_push(value_stack, value);
1183 break;
1184 }
1185#line 190 "prism/templates/ext/prism/api_node.c.erb"
1186 case PM_ALTERNATION_PATTERN_NODE: {
1187 pm_alternation_pattern_node_t *cast = (pm_alternation_pattern_node_t *) node;
1188 VALUE argv[7];
1189
1190 // source
1191 argv[0] = source;
1192
1193 // node_id
1194 argv[1] = ULONG2NUM(node->node_id);
1195
1196 // location
1197 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1198
1199 // flags
1200 argv[3] = ULONG2NUM(node->flags);
1201
1202 // left
1203#line 213 "prism/templates/ext/prism/api_node.c.erb"
1204 argv[4] = rb_ary_pop(value_stack);
1205
1206 // right
1207#line 213 "prism/templates/ext/prism/api_node.c.erb"
1208 argv[5] = rb_ary_pop(value_stack);
1209
1210 // operator_loc
1211#line 240 "prism/templates/ext/prism/api_node.c.erb"
1212 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
1213
1214 VALUE value = rb_class_new_instance(7, argv, rb_cPrismAlternationPatternNode);
1215 if (freeze) rb_obj_freeze(value);
1216
1217 rb_ary_push(value_stack, value);
1218 break;
1219 }
1220#line 190 "prism/templates/ext/prism/api_node.c.erb"
1221 case PM_AND_NODE: {
1222 pm_and_node_t *cast = (pm_and_node_t *) node;
1223 VALUE argv[7];
1224
1225 // source
1226 argv[0] = source;
1227
1228 // node_id
1229 argv[1] = ULONG2NUM(node->node_id);
1230
1231 // location
1232 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1233
1234 // flags
1235 argv[3] = ULONG2NUM(node->flags);
1236
1237 // left
1238#line 213 "prism/templates/ext/prism/api_node.c.erb"
1239 argv[4] = rb_ary_pop(value_stack);
1240
1241 // right
1242#line 213 "prism/templates/ext/prism/api_node.c.erb"
1243 argv[5] = rb_ary_pop(value_stack);
1244
1245 // operator_loc
1246#line 240 "prism/templates/ext/prism/api_node.c.erb"
1247 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
1248
1249 VALUE value = rb_class_new_instance(7, argv, rb_cPrismAndNode);
1250 if (freeze) rb_obj_freeze(value);
1251
1252 rb_ary_push(value_stack, value);
1253 break;
1254 }
1255#line 190 "prism/templates/ext/prism/api_node.c.erb"
1256 case PM_ARGUMENTS_NODE: {
1257 pm_arguments_node_t *cast = (pm_arguments_node_t *) node;
1258 VALUE argv[5];
1259
1260 // source
1261 argv[0] = source;
1262
1263 // node_id
1264 argv[1] = ULONG2NUM(node->node_id);
1265
1266 // location
1267 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1268
1269 // flags
1270 argv[3] = ULONG2NUM(node->flags);
1271
1272 // arguments
1273#line 216 "prism/templates/ext/prism/api_node.c.erb"
1274 argv[4] = rb_ary_new_capa(cast->arguments.size);
1275 for (size_t index = 0; index < cast->arguments.size; index++) {
1276 rb_ary_push(argv[4], rb_ary_pop(value_stack));
1277 }
1278 if (freeze) rb_obj_freeze(argv[4]);
1279
1280 VALUE value = rb_class_new_instance(5, argv, rb_cPrismArgumentsNode);
1281 if (freeze) rb_obj_freeze(value);
1282
1283 rb_ary_push(value_stack, value);
1284 break;
1285 }
1286#line 190 "prism/templates/ext/prism/api_node.c.erb"
1287 case PM_ARRAY_NODE: {
1288 pm_array_node_t *cast = (pm_array_node_t *) node;
1289 VALUE argv[7];
1290
1291 // source
1292 argv[0] = source;
1293
1294 // node_id
1295 argv[1] = ULONG2NUM(node->node_id);
1296
1297 // location
1298 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1299
1300 // flags
1301 argv[3] = ULONG2NUM(node->flags);
1302
1303 // elements
1304#line 216 "prism/templates/ext/prism/api_node.c.erb"
1305 argv[4] = rb_ary_new_capa(cast->elements.size);
1306 for (size_t index = 0; index < cast->elements.size; index++) {
1307 rb_ary_push(argv[4], rb_ary_pop(value_stack));
1308 }
1309 if (freeze) rb_obj_freeze(argv[4]);
1310
1311 // opening_loc
1312#line 243 "prism/templates/ext/prism/api_node.c.erb"
1313 argv[5] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
1314
1315 // closing_loc
1316#line 243 "prism/templates/ext/prism/api_node.c.erb"
1317 argv[6] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
1318
1319 VALUE value = rb_class_new_instance(7, argv, rb_cPrismArrayNode);
1320 if (freeze) rb_obj_freeze(value);
1321
1322 rb_ary_push(value_stack, value);
1323 break;
1324 }
1325#line 190 "prism/templates/ext/prism/api_node.c.erb"
1326 case PM_ARRAY_PATTERN_NODE: {
1327 pm_array_pattern_node_t *cast = (pm_array_pattern_node_t *) node;
1328 VALUE argv[10];
1329
1330 // source
1331 argv[0] = source;
1332
1333 // node_id
1334 argv[1] = ULONG2NUM(node->node_id);
1335
1336 // location
1337 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1338
1339 // flags
1340 argv[3] = ULONG2NUM(node->flags);
1341
1342 // constant
1343#line 213 "prism/templates/ext/prism/api_node.c.erb"
1344 argv[4] = rb_ary_pop(value_stack);
1345
1346 // requireds
1347#line 216 "prism/templates/ext/prism/api_node.c.erb"
1348 argv[5] = rb_ary_new_capa(cast->requireds.size);
1349 for (size_t index = 0; index < cast->requireds.size; index++) {
1350 rb_ary_push(argv[5], rb_ary_pop(value_stack));
1351 }
1352 if (freeze) rb_obj_freeze(argv[5]);
1353
1354 // rest
1355#line 213 "prism/templates/ext/prism/api_node.c.erb"
1356 argv[6] = rb_ary_pop(value_stack);
1357
1358 // posts
1359#line 216 "prism/templates/ext/prism/api_node.c.erb"
1360 argv[7] = rb_ary_new_capa(cast->posts.size);
1361 for (size_t index = 0; index < cast->posts.size; index++) {
1362 rb_ary_push(argv[7], rb_ary_pop(value_stack));
1363 }
1364 if (freeze) rb_obj_freeze(argv[7]);
1365
1366 // opening_loc
1367#line 243 "prism/templates/ext/prism/api_node.c.erb"
1368 argv[8] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
1369
1370 // closing_loc
1371#line 243 "prism/templates/ext/prism/api_node.c.erb"
1372 argv[9] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
1373
1374 VALUE value = rb_class_new_instance(10, argv, rb_cPrismArrayPatternNode);
1375 if (freeze) rb_obj_freeze(value);
1376
1377 rb_ary_push(value_stack, value);
1378 break;
1379 }
1380#line 190 "prism/templates/ext/prism/api_node.c.erb"
1381 case PM_ASSOC_NODE: {
1382 pm_assoc_node_t *cast = (pm_assoc_node_t *) node;
1383 VALUE argv[7];
1384
1385 // source
1386 argv[0] = source;
1387
1388 // node_id
1389 argv[1] = ULONG2NUM(node->node_id);
1390
1391 // location
1392 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1393
1394 // flags
1395 argv[3] = ULONG2NUM(node->flags);
1396
1397 // key
1398#line 213 "prism/templates/ext/prism/api_node.c.erb"
1399 argv[4] = rb_ary_pop(value_stack);
1400
1401 // value
1402#line 213 "prism/templates/ext/prism/api_node.c.erb"
1403 argv[5] = rb_ary_pop(value_stack);
1404
1405 // operator_loc
1406#line 243 "prism/templates/ext/prism/api_node.c.erb"
1407 argv[6] = cast->operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
1408
1409 VALUE value = rb_class_new_instance(7, argv, rb_cPrismAssocNode);
1410 if (freeze) rb_obj_freeze(value);
1411
1412 rb_ary_push(value_stack, value);
1413 break;
1414 }
1415#line 190 "prism/templates/ext/prism/api_node.c.erb"
1416 case PM_ASSOC_SPLAT_NODE: {
1417 pm_assoc_splat_node_t *cast = (pm_assoc_splat_node_t *) node;
1418 VALUE argv[6];
1419
1420 // source
1421 argv[0] = source;
1422
1423 // node_id
1424 argv[1] = ULONG2NUM(node->node_id);
1425
1426 // location
1427 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1428
1429 // flags
1430 argv[3] = ULONG2NUM(node->flags);
1431
1432 // value
1433#line 213 "prism/templates/ext/prism/api_node.c.erb"
1434 argv[4] = rb_ary_pop(value_stack);
1435
1436 // operator_loc
1437#line 240 "prism/templates/ext/prism/api_node.c.erb"
1438 argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
1439
1440 VALUE value = rb_class_new_instance(6, argv, rb_cPrismAssocSplatNode);
1441 if (freeze) rb_obj_freeze(value);
1442
1443 rb_ary_push(value_stack, value);
1444 break;
1445 }
1446#line 190 "prism/templates/ext/prism/api_node.c.erb"
1447 case PM_BACK_REFERENCE_READ_NODE: {
1448 pm_back_reference_read_node_t *cast = (pm_back_reference_read_node_t *) node;
1449 VALUE argv[5];
1450
1451 // source
1452 argv[0] = source;
1453
1454 // node_id
1455 argv[1] = ULONG2NUM(node->node_id);
1456
1457 // location
1458 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1459
1460 // flags
1461 argv[3] = ULONG2NUM(node->flags);
1462
1463 // name
1464#line 226 "prism/templates/ext/prism/api_node.c.erb"
1465 assert(cast->name != 0);
1466 argv[4] = RARRAY_AREF(constants, cast->name - 1);
1467
1468 VALUE value = rb_class_new_instance(5, argv, rb_cPrismBackReferenceReadNode);
1469 if (freeze) rb_obj_freeze(value);
1470
1471 rb_ary_push(value_stack, value);
1472 break;
1473 }
1474#line 190 "prism/templates/ext/prism/api_node.c.erb"
1475 case PM_BEGIN_NODE: {
1476 pm_begin_node_t *cast = (pm_begin_node_t *) node;
1477 VALUE argv[10];
1478
1479 // source
1480 argv[0] = source;
1481
1482 // node_id
1483 argv[1] = ULONG2NUM(node->node_id);
1484
1485 // location
1486 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1487
1488 // flags
1489 argv[3] = ULONG2NUM(node->flags);
1490
1491 // begin_keyword_loc
1492#line 243 "prism/templates/ext/prism/api_node.c.erb"
1493 argv[4] = cast->begin_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->begin_keyword_loc.start, cast->begin_keyword_loc.end, source, freeze);
1494
1495 // statements
1496#line 213 "prism/templates/ext/prism/api_node.c.erb"
1497 argv[5] = rb_ary_pop(value_stack);
1498
1499 // rescue_clause
1500#line 213 "prism/templates/ext/prism/api_node.c.erb"
1501 argv[6] = rb_ary_pop(value_stack);
1502
1503 // else_clause
1504#line 213 "prism/templates/ext/prism/api_node.c.erb"
1505 argv[7] = rb_ary_pop(value_stack);
1506
1507 // ensure_clause
1508#line 213 "prism/templates/ext/prism/api_node.c.erb"
1509 argv[8] = rb_ary_pop(value_stack);
1510
1511 // end_keyword_loc
1512#line 243 "prism/templates/ext/prism/api_node.c.erb"
1513 argv[9] = cast->end_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source, freeze);
1514
1515 VALUE value = rb_class_new_instance(10, argv, rb_cPrismBeginNode);
1516 if (freeze) rb_obj_freeze(value);
1517
1518 rb_ary_push(value_stack, value);
1519 break;
1520 }
1521#line 190 "prism/templates/ext/prism/api_node.c.erb"
1522 case PM_BLOCK_ARGUMENT_NODE: {
1523 pm_block_argument_node_t *cast = (pm_block_argument_node_t *) node;
1524 VALUE argv[6];
1525
1526 // source
1527 argv[0] = source;
1528
1529 // node_id
1530 argv[1] = ULONG2NUM(node->node_id);
1531
1532 // location
1533 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1534
1535 // flags
1536 argv[3] = ULONG2NUM(node->flags);
1537
1538 // expression
1539#line 213 "prism/templates/ext/prism/api_node.c.erb"
1540 argv[4] = rb_ary_pop(value_stack);
1541
1542 // operator_loc
1543#line 240 "prism/templates/ext/prism/api_node.c.erb"
1544 argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
1545
1546 VALUE value = rb_class_new_instance(6, argv, rb_cPrismBlockArgumentNode);
1547 if (freeze) rb_obj_freeze(value);
1548
1549 rb_ary_push(value_stack, value);
1550 break;
1551 }
1552#line 190 "prism/templates/ext/prism/api_node.c.erb"
1553 case PM_BLOCK_LOCAL_VARIABLE_NODE: {
1554 pm_block_local_variable_node_t *cast = (pm_block_local_variable_node_t *) node;
1555 VALUE argv[5];
1556
1557 // source
1558 argv[0] = source;
1559
1560 // node_id
1561 argv[1] = ULONG2NUM(node->node_id);
1562
1563 // location
1564 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1565
1566 // flags
1567 argv[3] = ULONG2NUM(node->flags);
1568
1569 // name
1570#line 226 "prism/templates/ext/prism/api_node.c.erb"
1571 assert(cast->name != 0);
1572 argv[4] = RARRAY_AREF(constants, cast->name - 1);
1573
1574 VALUE value = rb_class_new_instance(5, argv, rb_cPrismBlockLocalVariableNode);
1575 if (freeze) rb_obj_freeze(value);
1576
1577 rb_ary_push(value_stack, value);
1578 break;
1579 }
1580#line 190 "prism/templates/ext/prism/api_node.c.erb"
1581 case PM_BLOCK_NODE: {
1582 pm_block_node_t *cast = (pm_block_node_t *) node;
1583 VALUE argv[9];
1584
1585 // source
1586 argv[0] = source;
1587
1588 // node_id
1589 argv[1] = ULONG2NUM(node->node_id);
1590
1591 // location
1592 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1593
1594 // flags
1595 argv[3] = ULONG2NUM(node->flags);
1596
1597 // locals
1598#line 232 "prism/templates/ext/prism/api_node.c.erb"
1599 argv[4] = rb_ary_new_capa(cast->locals.size);
1600 for (size_t index = 0; index < cast->locals.size; index++) {
1601 assert(cast->locals.ids[index] != 0);
1602 rb_ary_push(argv[4], RARRAY_AREF(constants, cast->locals.ids[index] - 1));
1603 }
1604 if (freeze) rb_obj_freeze(argv[4]);
1605
1606 // parameters
1607#line 213 "prism/templates/ext/prism/api_node.c.erb"
1608 argv[5] = rb_ary_pop(value_stack);
1609
1610 // body
1611#line 213 "prism/templates/ext/prism/api_node.c.erb"
1612 argv[6] = rb_ary_pop(value_stack);
1613
1614 // opening_loc
1615#line 240 "prism/templates/ext/prism/api_node.c.erb"
1616 argv[7] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
1617
1618 // closing_loc
1619#line 240 "prism/templates/ext/prism/api_node.c.erb"
1620 argv[8] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
1621
1622 VALUE value = rb_class_new_instance(9, argv, rb_cPrismBlockNode);
1623 if (freeze) rb_obj_freeze(value);
1624
1625 rb_ary_push(value_stack, value);
1626 break;
1627 }
1628#line 190 "prism/templates/ext/prism/api_node.c.erb"
1629 case PM_BLOCK_PARAMETER_NODE: {
1630 pm_block_parameter_node_t *cast = (pm_block_parameter_node_t *) node;
1631 VALUE argv[7];
1632
1633 // source
1634 argv[0] = source;
1635
1636 // node_id
1637 argv[1] = ULONG2NUM(node->node_id);
1638
1639 // location
1640 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1641
1642 // flags
1643 argv[3] = ULONG2NUM(node->flags);
1644
1645 // name
1646 argv[4] = cast->name == 0 ? Qnil : RARRAY_AREF(constants, cast->name - 1);
1647
1648 // name_loc
1649#line 243 "prism/templates/ext/prism/api_node.c.erb"
1650 argv[5] = cast->name_loc.start == NULL ? Qnil : pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
1651
1652 // operator_loc
1653#line 240 "prism/templates/ext/prism/api_node.c.erb"
1654 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
1655
1656 VALUE value = rb_class_new_instance(7, argv, rb_cPrismBlockParameterNode);
1657 if (freeze) rb_obj_freeze(value);
1658
1659 rb_ary_push(value_stack, value);
1660 break;
1661 }
1662#line 190 "prism/templates/ext/prism/api_node.c.erb"
1663 case PM_BLOCK_PARAMETERS_NODE: {
1664 pm_block_parameters_node_t *cast = (pm_block_parameters_node_t *) node;
1665 VALUE argv[8];
1666
1667 // source
1668 argv[0] = source;
1669
1670 // node_id
1671 argv[1] = ULONG2NUM(node->node_id);
1672
1673 // location
1674 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1675
1676 // flags
1677 argv[3] = ULONG2NUM(node->flags);
1678
1679 // parameters
1680#line 213 "prism/templates/ext/prism/api_node.c.erb"
1681 argv[4] = rb_ary_pop(value_stack);
1682
1683 // locals
1684#line 216 "prism/templates/ext/prism/api_node.c.erb"
1685 argv[5] = rb_ary_new_capa(cast->locals.size);
1686 for (size_t index = 0; index < cast->locals.size; index++) {
1687 rb_ary_push(argv[5], rb_ary_pop(value_stack));
1688 }
1689 if (freeze) rb_obj_freeze(argv[5]);
1690
1691 // opening_loc
1692#line 243 "prism/templates/ext/prism/api_node.c.erb"
1693 argv[6] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
1694
1695 // closing_loc
1696#line 243 "prism/templates/ext/prism/api_node.c.erb"
1697 argv[7] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
1698
1699 VALUE value = rb_class_new_instance(8, argv, rb_cPrismBlockParametersNode);
1700 if (freeze) rb_obj_freeze(value);
1701
1702 rb_ary_push(value_stack, value);
1703 break;
1704 }
1705#line 190 "prism/templates/ext/prism/api_node.c.erb"
1706 case PM_BREAK_NODE: {
1707 pm_break_node_t *cast = (pm_break_node_t *) node;
1708 VALUE argv[6];
1709
1710 // source
1711 argv[0] = source;
1712
1713 // node_id
1714 argv[1] = ULONG2NUM(node->node_id);
1715
1716 // location
1717 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1718
1719 // flags
1720 argv[3] = ULONG2NUM(node->flags);
1721
1722 // arguments
1723#line 213 "prism/templates/ext/prism/api_node.c.erb"
1724 argv[4] = rb_ary_pop(value_stack);
1725
1726 // keyword_loc
1727#line 240 "prism/templates/ext/prism/api_node.c.erb"
1728 argv[5] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
1729
1730 VALUE value = rb_class_new_instance(6, argv, rb_cPrismBreakNode);
1731 if (freeze) rb_obj_freeze(value);
1732
1733 rb_ary_push(value_stack, value);
1734 break;
1735 }
1736#line 190 "prism/templates/ext/prism/api_node.c.erb"
1737 case PM_CALL_AND_WRITE_NODE: {
1738 pm_call_and_write_node_t *cast = (pm_call_and_write_node_t *) node;
1739 VALUE argv[11];
1740
1741 // source
1742 argv[0] = source;
1743
1744 // node_id
1745 argv[1] = ULONG2NUM(node->node_id);
1746
1747 // location
1748 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1749
1750 // flags
1751 argv[3] = ULONG2NUM(node->flags);
1752
1753 // receiver
1754#line 213 "prism/templates/ext/prism/api_node.c.erb"
1755 argv[4] = rb_ary_pop(value_stack);
1756
1757 // call_operator_loc
1758#line 243 "prism/templates/ext/prism/api_node.c.erb"
1759 argv[5] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source, freeze);
1760
1761 // message_loc
1762#line 243 "prism/templates/ext/prism/api_node.c.erb"
1763 argv[6] = cast->message_loc.start == NULL ? Qnil : pm_location_new(parser, cast->message_loc.start, cast->message_loc.end, source, freeze);
1764
1765 // read_name
1766#line 226 "prism/templates/ext/prism/api_node.c.erb"
1767 assert(cast->read_name != 0);
1768 argv[7] = RARRAY_AREF(constants, cast->read_name - 1);
1769
1770 // write_name
1771#line 226 "prism/templates/ext/prism/api_node.c.erb"
1772 assert(cast->write_name != 0);
1773 argv[8] = RARRAY_AREF(constants, cast->write_name - 1);
1774
1775 // operator_loc
1776#line 240 "prism/templates/ext/prism/api_node.c.erb"
1777 argv[9] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
1778
1779 // value
1780#line 213 "prism/templates/ext/prism/api_node.c.erb"
1781 argv[10] = rb_ary_pop(value_stack);
1782
1783 VALUE value = rb_class_new_instance(11, argv, rb_cPrismCallAndWriteNode);
1784 if (freeze) rb_obj_freeze(value);
1785
1786 rb_ary_push(value_stack, value);
1787 break;
1788 }
1789#line 190 "prism/templates/ext/prism/api_node.c.erb"
1790 case PM_CALL_NODE: {
1791 pm_call_node_t *cast = (pm_call_node_t *) node;
1792 VALUE argv[13];
1793
1794 // source
1795 argv[0] = source;
1796
1797 // node_id
1798 argv[1] = ULONG2NUM(node->node_id);
1799
1800 // location
1801 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1802
1803 // flags
1804 argv[3] = ULONG2NUM(node->flags);
1805
1806 // receiver
1807#line 213 "prism/templates/ext/prism/api_node.c.erb"
1808 argv[4] = rb_ary_pop(value_stack);
1809
1810 // call_operator_loc
1811#line 243 "prism/templates/ext/prism/api_node.c.erb"
1812 argv[5] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source, freeze);
1813
1814 // name
1815#line 226 "prism/templates/ext/prism/api_node.c.erb"
1816 assert(cast->name != 0);
1817 argv[6] = RARRAY_AREF(constants, cast->name - 1);
1818
1819 // message_loc
1820#line 243 "prism/templates/ext/prism/api_node.c.erb"
1821 argv[7] = cast->message_loc.start == NULL ? Qnil : pm_location_new(parser, cast->message_loc.start, cast->message_loc.end, source, freeze);
1822
1823 // opening_loc
1824#line 243 "prism/templates/ext/prism/api_node.c.erb"
1825 argv[8] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
1826
1827 // arguments
1828#line 213 "prism/templates/ext/prism/api_node.c.erb"
1829 argv[9] = rb_ary_pop(value_stack);
1830
1831 // closing_loc
1832#line 243 "prism/templates/ext/prism/api_node.c.erb"
1833 argv[10] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
1834
1835 // equal_loc
1836#line 243 "prism/templates/ext/prism/api_node.c.erb"
1837 argv[11] = cast->equal_loc.start == NULL ? Qnil : pm_location_new(parser, cast->equal_loc.start, cast->equal_loc.end, source, freeze);
1838
1839 // block
1840#line 213 "prism/templates/ext/prism/api_node.c.erb"
1841 argv[12] = rb_ary_pop(value_stack);
1842
1843 VALUE value = rb_class_new_instance(13, argv, rb_cPrismCallNode);
1844 if (freeze) rb_obj_freeze(value);
1845
1846 rb_ary_push(value_stack, value);
1847 break;
1848 }
1849#line 190 "prism/templates/ext/prism/api_node.c.erb"
1850 case PM_CALL_OPERATOR_WRITE_NODE: {
1851 pm_call_operator_write_node_t *cast = (pm_call_operator_write_node_t *) node;
1852 VALUE argv[12];
1853
1854 // source
1855 argv[0] = source;
1856
1857 // node_id
1858 argv[1] = ULONG2NUM(node->node_id);
1859
1860 // location
1861 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1862
1863 // flags
1864 argv[3] = ULONG2NUM(node->flags);
1865
1866 // receiver
1867#line 213 "prism/templates/ext/prism/api_node.c.erb"
1868 argv[4] = rb_ary_pop(value_stack);
1869
1870 // call_operator_loc
1871#line 243 "prism/templates/ext/prism/api_node.c.erb"
1872 argv[5] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source, freeze);
1873
1874 // message_loc
1875#line 243 "prism/templates/ext/prism/api_node.c.erb"
1876 argv[6] = cast->message_loc.start == NULL ? Qnil : pm_location_new(parser, cast->message_loc.start, cast->message_loc.end, source, freeze);
1877
1878 // read_name
1879#line 226 "prism/templates/ext/prism/api_node.c.erb"
1880 assert(cast->read_name != 0);
1881 argv[7] = RARRAY_AREF(constants, cast->read_name - 1);
1882
1883 // write_name
1884#line 226 "prism/templates/ext/prism/api_node.c.erb"
1885 assert(cast->write_name != 0);
1886 argv[8] = RARRAY_AREF(constants, cast->write_name - 1);
1887
1888 // binary_operator
1889#line 226 "prism/templates/ext/prism/api_node.c.erb"
1890 assert(cast->binary_operator != 0);
1891 argv[9] = RARRAY_AREF(constants, cast->binary_operator - 1);
1892
1893 // binary_operator_loc
1894#line 240 "prism/templates/ext/prism/api_node.c.erb"
1895 argv[10] = pm_location_new(parser, cast->binary_operator_loc.start, cast->binary_operator_loc.end, source, freeze);
1896
1897 // value
1898#line 213 "prism/templates/ext/prism/api_node.c.erb"
1899 argv[11] = rb_ary_pop(value_stack);
1900
1901 VALUE value = rb_class_new_instance(12, argv, rb_cPrismCallOperatorWriteNode);
1902 if (freeze) rb_obj_freeze(value);
1903
1904 rb_ary_push(value_stack, value);
1905 break;
1906 }
1907#line 190 "prism/templates/ext/prism/api_node.c.erb"
1908 case PM_CALL_OR_WRITE_NODE: {
1909 pm_call_or_write_node_t *cast = (pm_call_or_write_node_t *) node;
1910 VALUE argv[11];
1911
1912 // source
1913 argv[0] = source;
1914
1915 // node_id
1916 argv[1] = ULONG2NUM(node->node_id);
1917
1918 // location
1919 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1920
1921 // flags
1922 argv[3] = ULONG2NUM(node->flags);
1923
1924 // receiver
1925#line 213 "prism/templates/ext/prism/api_node.c.erb"
1926 argv[4] = rb_ary_pop(value_stack);
1927
1928 // call_operator_loc
1929#line 243 "prism/templates/ext/prism/api_node.c.erb"
1930 argv[5] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source, freeze);
1931
1932 // message_loc
1933#line 243 "prism/templates/ext/prism/api_node.c.erb"
1934 argv[6] = cast->message_loc.start == NULL ? Qnil : pm_location_new(parser, cast->message_loc.start, cast->message_loc.end, source, freeze);
1935
1936 // read_name
1937#line 226 "prism/templates/ext/prism/api_node.c.erb"
1938 assert(cast->read_name != 0);
1939 argv[7] = RARRAY_AREF(constants, cast->read_name - 1);
1940
1941 // write_name
1942#line 226 "prism/templates/ext/prism/api_node.c.erb"
1943 assert(cast->write_name != 0);
1944 argv[8] = RARRAY_AREF(constants, cast->write_name - 1);
1945
1946 // operator_loc
1947#line 240 "prism/templates/ext/prism/api_node.c.erb"
1948 argv[9] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
1949
1950 // value
1951#line 213 "prism/templates/ext/prism/api_node.c.erb"
1952 argv[10] = rb_ary_pop(value_stack);
1953
1954 VALUE value = rb_class_new_instance(11, argv, rb_cPrismCallOrWriteNode);
1955 if (freeze) rb_obj_freeze(value);
1956
1957 rb_ary_push(value_stack, value);
1958 break;
1959 }
1960#line 190 "prism/templates/ext/prism/api_node.c.erb"
1961 case PM_CALL_TARGET_NODE: {
1962 pm_call_target_node_t *cast = (pm_call_target_node_t *) node;
1963 VALUE argv[8];
1964
1965 // source
1966 argv[0] = source;
1967
1968 // node_id
1969 argv[1] = ULONG2NUM(node->node_id);
1970
1971 // location
1972 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
1973
1974 // flags
1975 argv[3] = ULONG2NUM(node->flags);
1976
1977 // receiver
1978#line 213 "prism/templates/ext/prism/api_node.c.erb"
1979 argv[4] = rb_ary_pop(value_stack);
1980
1981 // call_operator_loc
1982#line 240 "prism/templates/ext/prism/api_node.c.erb"
1983 argv[5] = pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source, freeze);
1984
1985 // name
1986#line 226 "prism/templates/ext/prism/api_node.c.erb"
1987 assert(cast->name != 0);
1988 argv[6] = RARRAY_AREF(constants, cast->name - 1);
1989
1990 // message_loc
1991#line 240 "prism/templates/ext/prism/api_node.c.erb"
1992 argv[7] = pm_location_new(parser, cast->message_loc.start, cast->message_loc.end, source, freeze);
1993
1994 VALUE value = rb_class_new_instance(8, argv, rb_cPrismCallTargetNode);
1995 if (freeze) rb_obj_freeze(value);
1996
1997 rb_ary_push(value_stack, value);
1998 break;
1999 }
2000#line 190 "prism/templates/ext/prism/api_node.c.erb"
2001 case PM_CAPTURE_PATTERN_NODE: {
2002 pm_capture_pattern_node_t *cast = (pm_capture_pattern_node_t *) node;
2003 VALUE argv[7];
2004
2005 // source
2006 argv[0] = source;
2007
2008 // node_id
2009 argv[1] = ULONG2NUM(node->node_id);
2010
2011 // location
2012 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2013
2014 // flags
2015 argv[3] = ULONG2NUM(node->flags);
2016
2017 // value
2018#line 213 "prism/templates/ext/prism/api_node.c.erb"
2019 argv[4] = rb_ary_pop(value_stack);
2020
2021 // target
2022#line 213 "prism/templates/ext/prism/api_node.c.erb"
2023 argv[5] = rb_ary_pop(value_stack);
2024
2025 // operator_loc
2026#line 240 "prism/templates/ext/prism/api_node.c.erb"
2027 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
2028
2029 VALUE value = rb_class_new_instance(7, argv, rb_cPrismCapturePatternNode);
2030 if (freeze) rb_obj_freeze(value);
2031
2032 rb_ary_push(value_stack, value);
2033 break;
2034 }
2035#line 190 "prism/templates/ext/prism/api_node.c.erb"
2036 case PM_CASE_MATCH_NODE: {
2037 pm_case_match_node_t *cast = (pm_case_match_node_t *) node;
2038 VALUE argv[9];
2039
2040 // source
2041 argv[0] = source;
2042
2043 // node_id
2044 argv[1] = ULONG2NUM(node->node_id);
2045
2046 // location
2047 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2048
2049 // flags
2050 argv[3] = ULONG2NUM(node->flags);
2051
2052 // predicate
2053#line 213 "prism/templates/ext/prism/api_node.c.erb"
2054 argv[4] = rb_ary_pop(value_stack);
2055
2056 // conditions
2057#line 216 "prism/templates/ext/prism/api_node.c.erb"
2058 argv[5] = rb_ary_new_capa(cast->conditions.size);
2059 for (size_t index = 0; index < cast->conditions.size; index++) {
2060 rb_ary_push(argv[5], rb_ary_pop(value_stack));
2061 }
2062 if (freeze) rb_obj_freeze(argv[5]);
2063
2064 // else_clause
2065#line 213 "prism/templates/ext/prism/api_node.c.erb"
2066 argv[6] = rb_ary_pop(value_stack);
2067
2068 // case_keyword_loc
2069#line 240 "prism/templates/ext/prism/api_node.c.erb"
2070 argv[7] = pm_location_new(parser, cast->case_keyword_loc.start, cast->case_keyword_loc.end, source, freeze);
2071
2072 // end_keyword_loc
2073#line 240 "prism/templates/ext/prism/api_node.c.erb"
2074 argv[8] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source, freeze);
2075
2076 VALUE value = rb_class_new_instance(9, argv, rb_cPrismCaseMatchNode);
2077 if (freeze) rb_obj_freeze(value);
2078
2079 rb_ary_push(value_stack, value);
2080 break;
2081 }
2082#line 190 "prism/templates/ext/prism/api_node.c.erb"
2083 case PM_CASE_NODE: {
2084 pm_case_node_t *cast = (pm_case_node_t *) node;
2085 VALUE argv[9];
2086
2087 // source
2088 argv[0] = source;
2089
2090 // node_id
2091 argv[1] = ULONG2NUM(node->node_id);
2092
2093 // location
2094 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2095
2096 // flags
2097 argv[3] = ULONG2NUM(node->flags);
2098
2099 // predicate
2100#line 213 "prism/templates/ext/prism/api_node.c.erb"
2101 argv[4] = rb_ary_pop(value_stack);
2102
2103 // conditions
2104#line 216 "prism/templates/ext/prism/api_node.c.erb"
2105 argv[5] = rb_ary_new_capa(cast->conditions.size);
2106 for (size_t index = 0; index < cast->conditions.size; index++) {
2107 rb_ary_push(argv[5], rb_ary_pop(value_stack));
2108 }
2109 if (freeze) rb_obj_freeze(argv[5]);
2110
2111 // else_clause
2112#line 213 "prism/templates/ext/prism/api_node.c.erb"
2113 argv[6] = rb_ary_pop(value_stack);
2114
2115 // case_keyword_loc
2116#line 240 "prism/templates/ext/prism/api_node.c.erb"
2117 argv[7] = pm_location_new(parser, cast->case_keyword_loc.start, cast->case_keyword_loc.end, source, freeze);
2118
2119 // end_keyword_loc
2120#line 240 "prism/templates/ext/prism/api_node.c.erb"
2121 argv[8] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source, freeze);
2122
2123 VALUE value = rb_class_new_instance(9, argv, rb_cPrismCaseNode);
2124 if (freeze) rb_obj_freeze(value);
2125
2126 rb_ary_push(value_stack, value);
2127 break;
2128 }
2129#line 190 "prism/templates/ext/prism/api_node.c.erb"
2130 case PM_CLASS_NODE: {
2131 pm_class_node_t *cast = (pm_class_node_t *) node;
2132 VALUE argv[12];
2133
2134 // source
2135 argv[0] = source;
2136
2137 // node_id
2138 argv[1] = ULONG2NUM(node->node_id);
2139
2140 // location
2141 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2142
2143 // flags
2144 argv[3] = ULONG2NUM(node->flags);
2145
2146 // locals
2147#line 232 "prism/templates/ext/prism/api_node.c.erb"
2148 argv[4] = rb_ary_new_capa(cast->locals.size);
2149 for (size_t index = 0; index < cast->locals.size; index++) {
2150 assert(cast->locals.ids[index] != 0);
2151 rb_ary_push(argv[4], RARRAY_AREF(constants, cast->locals.ids[index] - 1));
2152 }
2153 if (freeze) rb_obj_freeze(argv[4]);
2154
2155 // class_keyword_loc
2156#line 240 "prism/templates/ext/prism/api_node.c.erb"
2157 argv[5] = pm_location_new(parser, cast->class_keyword_loc.start, cast->class_keyword_loc.end, source, freeze);
2158
2159 // constant_path
2160#line 213 "prism/templates/ext/prism/api_node.c.erb"
2161 argv[6] = rb_ary_pop(value_stack);
2162
2163 // inheritance_operator_loc
2164#line 243 "prism/templates/ext/prism/api_node.c.erb"
2165 argv[7] = cast->inheritance_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->inheritance_operator_loc.start, cast->inheritance_operator_loc.end, source, freeze);
2166
2167 // superclass
2168#line 213 "prism/templates/ext/prism/api_node.c.erb"
2169 argv[8] = rb_ary_pop(value_stack);
2170
2171 // body
2172#line 213 "prism/templates/ext/prism/api_node.c.erb"
2173 argv[9] = rb_ary_pop(value_stack);
2174
2175 // end_keyword_loc
2176#line 240 "prism/templates/ext/prism/api_node.c.erb"
2177 argv[10] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source, freeze);
2178
2179 // name
2180#line 226 "prism/templates/ext/prism/api_node.c.erb"
2181 assert(cast->name != 0);
2182 argv[11] = RARRAY_AREF(constants, cast->name - 1);
2183
2184 VALUE value = rb_class_new_instance(12, argv, rb_cPrismClassNode);
2185 if (freeze) rb_obj_freeze(value);
2186
2187 rb_ary_push(value_stack, value);
2188 break;
2189 }
2190#line 190 "prism/templates/ext/prism/api_node.c.erb"
2191 case PM_CLASS_VARIABLE_AND_WRITE_NODE: {
2192 pm_class_variable_and_write_node_t *cast = (pm_class_variable_and_write_node_t *) node;
2193 VALUE argv[8];
2194
2195 // source
2196 argv[0] = source;
2197
2198 // node_id
2199 argv[1] = ULONG2NUM(node->node_id);
2200
2201 // location
2202 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2203
2204 // flags
2205 argv[3] = ULONG2NUM(node->flags);
2206
2207 // name
2208#line 226 "prism/templates/ext/prism/api_node.c.erb"
2209 assert(cast->name != 0);
2210 argv[4] = RARRAY_AREF(constants, cast->name - 1);
2211
2212 // name_loc
2213#line 240 "prism/templates/ext/prism/api_node.c.erb"
2214 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
2215
2216 // operator_loc
2217#line 240 "prism/templates/ext/prism/api_node.c.erb"
2218 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
2219
2220 // value
2221#line 213 "prism/templates/ext/prism/api_node.c.erb"
2222 argv[7] = rb_ary_pop(value_stack);
2223
2224 VALUE value = rb_class_new_instance(8, argv, rb_cPrismClassVariableAndWriteNode);
2225 if (freeze) rb_obj_freeze(value);
2226
2227 rb_ary_push(value_stack, value);
2228 break;
2229 }
2230#line 190 "prism/templates/ext/prism/api_node.c.erb"
2231 case PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE: {
2232 pm_class_variable_operator_write_node_t *cast = (pm_class_variable_operator_write_node_t *) node;
2233 VALUE argv[9];
2234
2235 // source
2236 argv[0] = source;
2237
2238 // node_id
2239 argv[1] = ULONG2NUM(node->node_id);
2240
2241 // location
2242 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2243
2244 // flags
2245 argv[3] = ULONG2NUM(node->flags);
2246
2247 // name
2248#line 226 "prism/templates/ext/prism/api_node.c.erb"
2249 assert(cast->name != 0);
2250 argv[4] = RARRAY_AREF(constants, cast->name - 1);
2251
2252 // name_loc
2253#line 240 "prism/templates/ext/prism/api_node.c.erb"
2254 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
2255
2256 // binary_operator_loc
2257#line 240 "prism/templates/ext/prism/api_node.c.erb"
2258 argv[6] = pm_location_new(parser, cast->binary_operator_loc.start, cast->binary_operator_loc.end, source, freeze);
2259
2260 // value
2261#line 213 "prism/templates/ext/prism/api_node.c.erb"
2262 argv[7] = rb_ary_pop(value_stack);
2263
2264 // binary_operator
2265#line 226 "prism/templates/ext/prism/api_node.c.erb"
2266 assert(cast->binary_operator != 0);
2267 argv[8] = RARRAY_AREF(constants, cast->binary_operator - 1);
2268
2269 VALUE value = rb_class_new_instance(9, argv, rb_cPrismClassVariableOperatorWriteNode);
2270 if (freeze) rb_obj_freeze(value);
2271
2272 rb_ary_push(value_stack, value);
2273 break;
2274 }
2275#line 190 "prism/templates/ext/prism/api_node.c.erb"
2276 case PM_CLASS_VARIABLE_OR_WRITE_NODE: {
2277 pm_class_variable_or_write_node_t *cast = (pm_class_variable_or_write_node_t *) node;
2278 VALUE argv[8];
2279
2280 // source
2281 argv[0] = source;
2282
2283 // node_id
2284 argv[1] = ULONG2NUM(node->node_id);
2285
2286 // location
2287 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2288
2289 // flags
2290 argv[3] = ULONG2NUM(node->flags);
2291
2292 // name
2293#line 226 "prism/templates/ext/prism/api_node.c.erb"
2294 assert(cast->name != 0);
2295 argv[4] = RARRAY_AREF(constants, cast->name - 1);
2296
2297 // name_loc
2298#line 240 "prism/templates/ext/prism/api_node.c.erb"
2299 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
2300
2301 // operator_loc
2302#line 240 "prism/templates/ext/prism/api_node.c.erb"
2303 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
2304
2305 // value
2306#line 213 "prism/templates/ext/prism/api_node.c.erb"
2307 argv[7] = rb_ary_pop(value_stack);
2308
2309 VALUE value = rb_class_new_instance(8, argv, rb_cPrismClassVariableOrWriteNode);
2310 if (freeze) rb_obj_freeze(value);
2311
2312 rb_ary_push(value_stack, value);
2313 break;
2314 }
2315#line 190 "prism/templates/ext/prism/api_node.c.erb"
2316 case PM_CLASS_VARIABLE_READ_NODE: {
2317 pm_class_variable_read_node_t *cast = (pm_class_variable_read_node_t *) node;
2318 VALUE argv[5];
2319
2320 // source
2321 argv[0] = source;
2322
2323 // node_id
2324 argv[1] = ULONG2NUM(node->node_id);
2325
2326 // location
2327 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2328
2329 // flags
2330 argv[3] = ULONG2NUM(node->flags);
2331
2332 // name
2333#line 226 "prism/templates/ext/prism/api_node.c.erb"
2334 assert(cast->name != 0);
2335 argv[4] = RARRAY_AREF(constants, cast->name - 1);
2336
2337 VALUE value = rb_class_new_instance(5, argv, rb_cPrismClassVariableReadNode);
2338 if (freeze) rb_obj_freeze(value);
2339
2340 rb_ary_push(value_stack, value);
2341 break;
2342 }
2343#line 190 "prism/templates/ext/prism/api_node.c.erb"
2344 case PM_CLASS_VARIABLE_TARGET_NODE: {
2345 pm_class_variable_target_node_t *cast = (pm_class_variable_target_node_t *) node;
2346 VALUE argv[5];
2347
2348 // source
2349 argv[0] = source;
2350
2351 // node_id
2352 argv[1] = ULONG2NUM(node->node_id);
2353
2354 // location
2355 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2356
2357 // flags
2358 argv[3] = ULONG2NUM(node->flags);
2359
2360 // name
2361#line 226 "prism/templates/ext/prism/api_node.c.erb"
2362 assert(cast->name != 0);
2363 argv[4] = RARRAY_AREF(constants, cast->name - 1);
2364
2365 VALUE value = rb_class_new_instance(5, argv, rb_cPrismClassVariableTargetNode);
2366 if (freeze) rb_obj_freeze(value);
2367
2368 rb_ary_push(value_stack, value);
2369 break;
2370 }
2371#line 190 "prism/templates/ext/prism/api_node.c.erb"
2372 case PM_CLASS_VARIABLE_WRITE_NODE: {
2373 pm_class_variable_write_node_t *cast = (pm_class_variable_write_node_t *) node;
2374 VALUE argv[8];
2375
2376 // source
2377 argv[0] = source;
2378
2379 // node_id
2380 argv[1] = ULONG2NUM(node->node_id);
2381
2382 // location
2383 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2384
2385 // flags
2386 argv[3] = ULONG2NUM(node->flags);
2387
2388 // name
2389#line 226 "prism/templates/ext/prism/api_node.c.erb"
2390 assert(cast->name != 0);
2391 argv[4] = RARRAY_AREF(constants, cast->name - 1);
2392
2393 // name_loc
2394#line 240 "prism/templates/ext/prism/api_node.c.erb"
2395 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
2396
2397 // value
2398#line 213 "prism/templates/ext/prism/api_node.c.erb"
2399 argv[6] = rb_ary_pop(value_stack);
2400
2401 // operator_loc
2402#line 240 "prism/templates/ext/prism/api_node.c.erb"
2403 argv[7] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
2404
2405 VALUE value = rb_class_new_instance(8, argv, rb_cPrismClassVariableWriteNode);
2406 if (freeze) rb_obj_freeze(value);
2407
2408 rb_ary_push(value_stack, value);
2409 break;
2410 }
2411#line 190 "prism/templates/ext/prism/api_node.c.erb"
2412 case PM_CONSTANT_AND_WRITE_NODE: {
2413 pm_constant_and_write_node_t *cast = (pm_constant_and_write_node_t *) node;
2414 VALUE argv[8];
2415
2416 // source
2417 argv[0] = source;
2418
2419 // node_id
2420 argv[1] = ULONG2NUM(node->node_id);
2421
2422 // location
2423 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2424
2425 // flags
2426 argv[3] = ULONG2NUM(node->flags);
2427
2428 // name
2429#line 226 "prism/templates/ext/prism/api_node.c.erb"
2430 assert(cast->name != 0);
2431 argv[4] = RARRAY_AREF(constants, cast->name - 1);
2432
2433 // name_loc
2434#line 240 "prism/templates/ext/prism/api_node.c.erb"
2435 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
2436
2437 // operator_loc
2438#line 240 "prism/templates/ext/prism/api_node.c.erb"
2439 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
2440
2441 // value
2442#line 213 "prism/templates/ext/prism/api_node.c.erb"
2443 argv[7] = rb_ary_pop(value_stack);
2444
2445 VALUE value = rb_class_new_instance(8, argv, rb_cPrismConstantAndWriteNode);
2446 if (freeze) rb_obj_freeze(value);
2447
2448 rb_ary_push(value_stack, value);
2449 break;
2450 }
2451#line 190 "prism/templates/ext/prism/api_node.c.erb"
2452 case PM_CONSTANT_OPERATOR_WRITE_NODE: {
2453 pm_constant_operator_write_node_t *cast = (pm_constant_operator_write_node_t *) node;
2454 VALUE argv[9];
2455
2456 // source
2457 argv[0] = source;
2458
2459 // node_id
2460 argv[1] = ULONG2NUM(node->node_id);
2461
2462 // location
2463 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2464
2465 // flags
2466 argv[3] = ULONG2NUM(node->flags);
2467
2468 // name
2469#line 226 "prism/templates/ext/prism/api_node.c.erb"
2470 assert(cast->name != 0);
2471 argv[4] = RARRAY_AREF(constants, cast->name - 1);
2472
2473 // name_loc
2474#line 240 "prism/templates/ext/prism/api_node.c.erb"
2475 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
2476
2477 // binary_operator_loc
2478#line 240 "prism/templates/ext/prism/api_node.c.erb"
2479 argv[6] = pm_location_new(parser, cast->binary_operator_loc.start, cast->binary_operator_loc.end, source, freeze);
2480
2481 // value
2482#line 213 "prism/templates/ext/prism/api_node.c.erb"
2483 argv[7] = rb_ary_pop(value_stack);
2484
2485 // binary_operator
2486#line 226 "prism/templates/ext/prism/api_node.c.erb"
2487 assert(cast->binary_operator != 0);
2488 argv[8] = RARRAY_AREF(constants, cast->binary_operator - 1);
2489
2490 VALUE value = rb_class_new_instance(9, argv, rb_cPrismConstantOperatorWriteNode);
2491 if (freeze) rb_obj_freeze(value);
2492
2493 rb_ary_push(value_stack, value);
2494 break;
2495 }
2496#line 190 "prism/templates/ext/prism/api_node.c.erb"
2497 case PM_CONSTANT_OR_WRITE_NODE: {
2498 pm_constant_or_write_node_t *cast = (pm_constant_or_write_node_t *) node;
2499 VALUE argv[8];
2500
2501 // source
2502 argv[0] = source;
2503
2504 // node_id
2505 argv[1] = ULONG2NUM(node->node_id);
2506
2507 // location
2508 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2509
2510 // flags
2511 argv[3] = ULONG2NUM(node->flags);
2512
2513 // name
2514#line 226 "prism/templates/ext/prism/api_node.c.erb"
2515 assert(cast->name != 0);
2516 argv[4] = RARRAY_AREF(constants, cast->name - 1);
2517
2518 // name_loc
2519#line 240 "prism/templates/ext/prism/api_node.c.erb"
2520 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
2521
2522 // operator_loc
2523#line 240 "prism/templates/ext/prism/api_node.c.erb"
2524 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
2525
2526 // value
2527#line 213 "prism/templates/ext/prism/api_node.c.erb"
2528 argv[7] = rb_ary_pop(value_stack);
2529
2530 VALUE value = rb_class_new_instance(8, argv, rb_cPrismConstantOrWriteNode);
2531 if (freeze) rb_obj_freeze(value);
2532
2533 rb_ary_push(value_stack, value);
2534 break;
2535 }
2536#line 190 "prism/templates/ext/prism/api_node.c.erb"
2537 case PM_CONSTANT_PATH_AND_WRITE_NODE: {
2538 pm_constant_path_and_write_node_t *cast = (pm_constant_path_and_write_node_t *) node;
2539 VALUE argv[7];
2540
2541 // source
2542 argv[0] = source;
2543
2544 // node_id
2545 argv[1] = ULONG2NUM(node->node_id);
2546
2547 // location
2548 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2549
2550 // flags
2551 argv[3] = ULONG2NUM(node->flags);
2552
2553 // target
2554#line 213 "prism/templates/ext/prism/api_node.c.erb"
2555 argv[4] = rb_ary_pop(value_stack);
2556
2557 // operator_loc
2558#line 240 "prism/templates/ext/prism/api_node.c.erb"
2559 argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
2560
2561 // value
2562#line 213 "prism/templates/ext/prism/api_node.c.erb"
2563 argv[6] = rb_ary_pop(value_stack);
2564
2565 VALUE value = rb_class_new_instance(7, argv, rb_cPrismConstantPathAndWriteNode);
2566 if (freeze) rb_obj_freeze(value);
2567
2568 rb_ary_push(value_stack, value);
2569 break;
2570 }
2571#line 190 "prism/templates/ext/prism/api_node.c.erb"
2572 case PM_CONSTANT_PATH_NODE: {
2573 pm_constant_path_node_t *cast = (pm_constant_path_node_t *) node;
2574 VALUE argv[8];
2575
2576 // source
2577 argv[0] = source;
2578
2579 // node_id
2580 argv[1] = ULONG2NUM(node->node_id);
2581
2582 // location
2583 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2584
2585 // flags
2586 argv[3] = ULONG2NUM(node->flags);
2587
2588 // parent
2589#line 213 "prism/templates/ext/prism/api_node.c.erb"
2590 argv[4] = rb_ary_pop(value_stack);
2591
2592 // name
2593 argv[5] = cast->name == 0 ? Qnil : RARRAY_AREF(constants, cast->name - 1);
2594
2595 // delimiter_loc
2596#line 240 "prism/templates/ext/prism/api_node.c.erb"
2597 argv[6] = pm_location_new(parser, cast->delimiter_loc.start, cast->delimiter_loc.end, source, freeze);
2598
2599 // name_loc
2600#line 240 "prism/templates/ext/prism/api_node.c.erb"
2601 argv[7] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
2602
2603 VALUE value = rb_class_new_instance(8, argv, rb_cPrismConstantPathNode);
2604 if (freeze) rb_obj_freeze(value);
2605
2606 rb_ary_push(value_stack, value);
2607 break;
2608 }
2609#line 190 "prism/templates/ext/prism/api_node.c.erb"
2610 case PM_CONSTANT_PATH_OPERATOR_WRITE_NODE: {
2611 pm_constant_path_operator_write_node_t *cast = (pm_constant_path_operator_write_node_t *) node;
2612 VALUE argv[8];
2613
2614 // source
2615 argv[0] = source;
2616
2617 // node_id
2618 argv[1] = ULONG2NUM(node->node_id);
2619
2620 // location
2621 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2622
2623 // flags
2624 argv[3] = ULONG2NUM(node->flags);
2625
2626 // target
2627#line 213 "prism/templates/ext/prism/api_node.c.erb"
2628 argv[4] = rb_ary_pop(value_stack);
2629
2630 // binary_operator_loc
2631#line 240 "prism/templates/ext/prism/api_node.c.erb"
2632 argv[5] = pm_location_new(parser, cast->binary_operator_loc.start, cast->binary_operator_loc.end, source, freeze);
2633
2634 // value
2635#line 213 "prism/templates/ext/prism/api_node.c.erb"
2636 argv[6] = rb_ary_pop(value_stack);
2637
2638 // binary_operator
2639#line 226 "prism/templates/ext/prism/api_node.c.erb"
2640 assert(cast->binary_operator != 0);
2641 argv[7] = RARRAY_AREF(constants, cast->binary_operator - 1);
2642
2643 VALUE value = rb_class_new_instance(8, argv, rb_cPrismConstantPathOperatorWriteNode);
2644 if (freeze) rb_obj_freeze(value);
2645
2646 rb_ary_push(value_stack, value);
2647 break;
2648 }
2649#line 190 "prism/templates/ext/prism/api_node.c.erb"
2650 case PM_CONSTANT_PATH_OR_WRITE_NODE: {
2651 pm_constant_path_or_write_node_t *cast = (pm_constant_path_or_write_node_t *) node;
2652 VALUE argv[7];
2653
2654 // source
2655 argv[0] = source;
2656
2657 // node_id
2658 argv[1] = ULONG2NUM(node->node_id);
2659
2660 // location
2661 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2662
2663 // flags
2664 argv[3] = ULONG2NUM(node->flags);
2665
2666 // target
2667#line 213 "prism/templates/ext/prism/api_node.c.erb"
2668 argv[4] = rb_ary_pop(value_stack);
2669
2670 // operator_loc
2671#line 240 "prism/templates/ext/prism/api_node.c.erb"
2672 argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
2673
2674 // value
2675#line 213 "prism/templates/ext/prism/api_node.c.erb"
2676 argv[6] = rb_ary_pop(value_stack);
2677
2678 VALUE value = rb_class_new_instance(7, argv, rb_cPrismConstantPathOrWriteNode);
2679 if (freeze) rb_obj_freeze(value);
2680
2681 rb_ary_push(value_stack, value);
2682 break;
2683 }
2684#line 190 "prism/templates/ext/prism/api_node.c.erb"
2685 case PM_CONSTANT_PATH_TARGET_NODE: {
2686 pm_constant_path_target_node_t *cast = (pm_constant_path_target_node_t *) node;
2687 VALUE argv[8];
2688
2689 // source
2690 argv[0] = source;
2691
2692 // node_id
2693 argv[1] = ULONG2NUM(node->node_id);
2694
2695 // location
2696 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2697
2698 // flags
2699 argv[3] = ULONG2NUM(node->flags);
2700
2701 // parent
2702#line 213 "prism/templates/ext/prism/api_node.c.erb"
2703 argv[4] = rb_ary_pop(value_stack);
2704
2705 // name
2706 argv[5] = cast->name == 0 ? Qnil : RARRAY_AREF(constants, cast->name - 1);
2707
2708 // delimiter_loc
2709#line 240 "prism/templates/ext/prism/api_node.c.erb"
2710 argv[6] = pm_location_new(parser, cast->delimiter_loc.start, cast->delimiter_loc.end, source, freeze);
2711
2712 // name_loc
2713#line 240 "prism/templates/ext/prism/api_node.c.erb"
2714 argv[7] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
2715
2716 VALUE value = rb_class_new_instance(8, argv, rb_cPrismConstantPathTargetNode);
2717 if (freeze) rb_obj_freeze(value);
2718
2719 rb_ary_push(value_stack, value);
2720 break;
2721 }
2722#line 190 "prism/templates/ext/prism/api_node.c.erb"
2723 case PM_CONSTANT_PATH_WRITE_NODE: {
2724 pm_constant_path_write_node_t *cast = (pm_constant_path_write_node_t *) node;
2725 VALUE argv[7];
2726
2727 // source
2728 argv[0] = source;
2729
2730 // node_id
2731 argv[1] = ULONG2NUM(node->node_id);
2732
2733 // location
2734 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2735
2736 // flags
2737 argv[3] = ULONG2NUM(node->flags);
2738
2739 // target
2740#line 213 "prism/templates/ext/prism/api_node.c.erb"
2741 argv[4] = rb_ary_pop(value_stack);
2742
2743 // operator_loc
2744#line 240 "prism/templates/ext/prism/api_node.c.erb"
2745 argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
2746
2747 // value
2748#line 213 "prism/templates/ext/prism/api_node.c.erb"
2749 argv[6] = rb_ary_pop(value_stack);
2750
2751 VALUE value = rb_class_new_instance(7, argv, rb_cPrismConstantPathWriteNode);
2752 if (freeze) rb_obj_freeze(value);
2753
2754 rb_ary_push(value_stack, value);
2755 break;
2756 }
2757#line 190 "prism/templates/ext/prism/api_node.c.erb"
2758 case PM_CONSTANT_READ_NODE: {
2759 pm_constant_read_node_t *cast = (pm_constant_read_node_t *) node;
2760 VALUE argv[5];
2761
2762 // source
2763 argv[0] = source;
2764
2765 // node_id
2766 argv[1] = ULONG2NUM(node->node_id);
2767
2768 // location
2769 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2770
2771 // flags
2772 argv[3] = ULONG2NUM(node->flags);
2773
2774 // name
2775#line 226 "prism/templates/ext/prism/api_node.c.erb"
2776 assert(cast->name != 0);
2777 argv[4] = RARRAY_AREF(constants, cast->name - 1);
2778
2779 VALUE value = rb_class_new_instance(5, argv, rb_cPrismConstantReadNode);
2780 if (freeze) rb_obj_freeze(value);
2781
2782 rb_ary_push(value_stack, value);
2783 break;
2784 }
2785#line 190 "prism/templates/ext/prism/api_node.c.erb"
2786 case PM_CONSTANT_TARGET_NODE: {
2787 pm_constant_target_node_t *cast = (pm_constant_target_node_t *) node;
2788 VALUE argv[5];
2789
2790 // source
2791 argv[0] = source;
2792
2793 // node_id
2794 argv[1] = ULONG2NUM(node->node_id);
2795
2796 // location
2797 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2798
2799 // flags
2800 argv[3] = ULONG2NUM(node->flags);
2801
2802 // name
2803#line 226 "prism/templates/ext/prism/api_node.c.erb"
2804 assert(cast->name != 0);
2805 argv[4] = RARRAY_AREF(constants, cast->name - 1);
2806
2807 VALUE value = rb_class_new_instance(5, argv, rb_cPrismConstantTargetNode);
2808 if (freeze) rb_obj_freeze(value);
2809
2810 rb_ary_push(value_stack, value);
2811 break;
2812 }
2813#line 190 "prism/templates/ext/prism/api_node.c.erb"
2814 case PM_CONSTANT_WRITE_NODE: {
2815 pm_constant_write_node_t *cast = (pm_constant_write_node_t *) node;
2816 VALUE argv[8];
2817
2818 // source
2819 argv[0] = source;
2820
2821 // node_id
2822 argv[1] = ULONG2NUM(node->node_id);
2823
2824 // location
2825 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2826
2827 // flags
2828 argv[3] = ULONG2NUM(node->flags);
2829
2830 // name
2831#line 226 "prism/templates/ext/prism/api_node.c.erb"
2832 assert(cast->name != 0);
2833 argv[4] = RARRAY_AREF(constants, cast->name - 1);
2834
2835 // name_loc
2836#line 240 "prism/templates/ext/prism/api_node.c.erb"
2837 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
2838
2839 // value
2840#line 213 "prism/templates/ext/prism/api_node.c.erb"
2841 argv[6] = rb_ary_pop(value_stack);
2842
2843 // operator_loc
2844#line 240 "prism/templates/ext/prism/api_node.c.erb"
2845 argv[7] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
2846
2847 VALUE value = rb_class_new_instance(8, argv, rb_cPrismConstantWriteNode);
2848 if (freeze) rb_obj_freeze(value);
2849
2850 rb_ary_push(value_stack, value);
2851 break;
2852 }
2853#line 190 "prism/templates/ext/prism/api_node.c.erb"
2854 case PM_DEF_NODE: {
2855 pm_def_node_t *cast = (pm_def_node_t *) node;
2856 VALUE argv[16];
2857
2858 // source
2859 argv[0] = source;
2860
2861 // node_id
2862 argv[1] = ULONG2NUM(node->node_id);
2863
2864 // location
2865 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2866
2867 // flags
2868 argv[3] = ULONG2NUM(node->flags);
2869
2870 // name
2871#line 226 "prism/templates/ext/prism/api_node.c.erb"
2872 assert(cast->name != 0);
2873 argv[4] = RARRAY_AREF(constants, cast->name - 1);
2874
2875 // name_loc
2876#line 240 "prism/templates/ext/prism/api_node.c.erb"
2877 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
2878
2879 // receiver
2880#line 213 "prism/templates/ext/prism/api_node.c.erb"
2881 argv[6] = rb_ary_pop(value_stack);
2882
2883 // parameters
2884#line 213 "prism/templates/ext/prism/api_node.c.erb"
2885 argv[7] = rb_ary_pop(value_stack);
2886
2887 // body
2888#line 213 "prism/templates/ext/prism/api_node.c.erb"
2889 argv[8] = rb_ary_pop(value_stack);
2890
2891 // locals
2892#line 232 "prism/templates/ext/prism/api_node.c.erb"
2893 argv[9] = rb_ary_new_capa(cast->locals.size);
2894 for (size_t index = 0; index < cast->locals.size; index++) {
2895 assert(cast->locals.ids[index] != 0);
2896 rb_ary_push(argv[9], RARRAY_AREF(constants, cast->locals.ids[index] - 1));
2897 }
2898 if (freeze) rb_obj_freeze(argv[9]);
2899
2900 // def_keyword_loc
2901#line 240 "prism/templates/ext/prism/api_node.c.erb"
2902 argv[10] = pm_location_new(parser, cast->def_keyword_loc.start, cast->def_keyword_loc.end, source, freeze);
2903
2904 // operator_loc
2905#line 243 "prism/templates/ext/prism/api_node.c.erb"
2906 argv[11] = cast->operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
2907
2908 // lparen_loc
2909#line 243 "prism/templates/ext/prism/api_node.c.erb"
2910 argv[12] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source, freeze);
2911
2912 // rparen_loc
2913#line 243 "prism/templates/ext/prism/api_node.c.erb"
2914 argv[13] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source, freeze);
2915
2916 // equal_loc
2917#line 243 "prism/templates/ext/prism/api_node.c.erb"
2918 argv[14] = cast->equal_loc.start == NULL ? Qnil : pm_location_new(parser, cast->equal_loc.start, cast->equal_loc.end, source, freeze);
2919
2920 // end_keyword_loc
2921#line 243 "prism/templates/ext/prism/api_node.c.erb"
2922 argv[15] = cast->end_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source, freeze);
2923
2924 VALUE value = rb_class_new_instance(16, argv, rb_cPrismDefNode);
2925 if (freeze) rb_obj_freeze(value);
2926
2927 rb_ary_push(value_stack, value);
2928 break;
2929 }
2930#line 190 "prism/templates/ext/prism/api_node.c.erb"
2931 case PM_DEFINED_NODE: {
2932 pm_defined_node_t *cast = (pm_defined_node_t *) node;
2933 VALUE argv[8];
2934
2935 // source
2936 argv[0] = source;
2937
2938 // node_id
2939 argv[1] = ULONG2NUM(node->node_id);
2940
2941 // location
2942 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2943
2944 // flags
2945 argv[3] = ULONG2NUM(node->flags);
2946
2947 // lparen_loc
2948#line 243 "prism/templates/ext/prism/api_node.c.erb"
2949 argv[4] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source, freeze);
2950
2951 // value
2952#line 213 "prism/templates/ext/prism/api_node.c.erb"
2953 argv[5] = rb_ary_pop(value_stack);
2954
2955 // rparen_loc
2956#line 243 "prism/templates/ext/prism/api_node.c.erb"
2957 argv[6] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source, freeze);
2958
2959 // keyword_loc
2960#line 240 "prism/templates/ext/prism/api_node.c.erb"
2961 argv[7] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
2962
2963 VALUE value = rb_class_new_instance(8, argv, rb_cPrismDefinedNode);
2964 if (freeze) rb_obj_freeze(value);
2965
2966 rb_ary_push(value_stack, value);
2967 break;
2968 }
2969#line 190 "prism/templates/ext/prism/api_node.c.erb"
2970 case PM_ELSE_NODE: {
2971 pm_else_node_t *cast = (pm_else_node_t *) node;
2972 VALUE argv[7];
2973
2974 // source
2975 argv[0] = source;
2976
2977 // node_id
2978 argv[1] = ULONG2NUM(node->node_id);
2979
2980 // location
2981 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
2982
2983 // flags
2984 argv[3] = ULONG2NUM(node->flags);
2985
2986 // else_keyword_loc
2987#line 240 "prism/templates/ext/prism/api_node.c.erb"
2988 argv[4] = pm_location_new(parser, cast->else_keyword_loc.start, cast->else_keyword_loc.end, source, freeze);
2989
2990 // statements
2991#line 213 "prism/templates/ext/prism/api_node.c.erb"
2992 argv[5] = rb_ary_pop(value_stack);
2993
2994 // end_keyword_loc
2995#line 243 "prism/templates/ext/prism/api_node.c.erb"
2996 argv[6] = cast->end_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source, freeze);
2997
2998 VALUE value = rb_class_new_instance(7, argv, rb_cPrismElseNode);
2999 if (freeze) rb_obj_freeze(value);
3000
3001 rb_ary_push(value_stack, value);
3002 break;
3003 }
3004#line 190 "prism/templates/ext/prism/api_node.c.erb"
3005 case PM_EMBEDDED_STATEMENTS_NODE: {
3006 pm_embedded_statements_node_t *cast = (pm_embedded_statements_node_t *) node;
3007 VALUE argv[7];
3008
3009 // source
3010 argv[0] = source;
3011
3012 // node_id
3013 argv[1] = ULONG2NUM(node->node_id);
3014
3015 // location
3016 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3017
3018 // flags
3019 argv[3] = ULONG2NUM(node->flags);
3020
3021 // opening_loc
3022#line 240 "prism/templates/ext/prism/api_node.c.erb"
3023 argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
3024
3025 // statements
3026#line 213 "prism/templates/ext/prism/api_node.c.erb"
3027 argv[5] = rb_ary_pop(value_stack);
3028
3029 // closing_loc
3030#line 240 "prism/templates/ext/prism/api_node.c.erb"
3031 argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
3032
3033 VALUE value = rb_class_new_instance(7, argv, rb_cPrismEmbeddedStatementsNode);
3034 if (freeze) rb_obj_freeze(value);
3035
3036 rb_ary_push(value_stack, value);
3037 break;
3038 }
3039#line 190 "prism/templates/ext/prism/api_node.c.erb"
3040 case PM_EMBEDDED_VARIABLE_NODE: {
3041 pm_embedded_variable_node_t *cast = (pm_embedded_variable_node_t *) node;
3042 VALUE argv[6];
3043
3044 // source
3045 argv[0] = source;
3046
3047 // node_id
3048 argv[1] = ULONG2NUM(node->node_id);
3049
3050 // location
3051 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3052
3053 // flags
3054 argv[3] = ULONG2NUM(node->flags);
3055
3056 // operator_loc
3057#line 240 "prism/templates/ext/prism/api_node.c.erb"
3058 argv[4] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
3059
3060 // variable
3061#line 213 "prism/templates/ext/prism/api_node.c.erb"
3062 argv[5] = rb_ary_pop(value_stack);
3063
3064 VALUE value = rb_class_new_instance(6, argv, rb_cPrismEmbeddedVariableNode);
3065 if (freeze) rb_obj_freeze(value);
3066
3067 rb_ary_push(value_stack, value);
3068 break;
3069 }
3070#line 190 "prism/templates/ext/prism/api_node.c.erb"
3071 case PM_ENSURE_NODE: {
3072 pm_ensure_node_t *cast = (pm_ensure_node_t *) node;
3073 VALUE argv[7];
3074
3075 // source
3076 argv[0] = source;
3077
3078 // node_id
3079 argv[1] = ULONG2NUM(node->node_id);
3080
3081 // location
3082 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3083
3084 // flags
3085 argv[3] = ULONG2NUM(node->flags);
3086
3087 // ensure_keyword_loc
3088#line 240 "prism/templates/ext/prism/api_node.c.erb"
3089 argv[4] = pm_location_new(parser, cast->ensure_keyword_loc.start, cast->ensure_keyword_loc.end, source, freeze);
3090
3091 // statements
3092#line 213 "prism/templates/ext/prism/api_node.c.erb"
3093 argv[5] = rb_ary_pop(value_stack);
3094
3095 // end_keyword_loc
3096#line 240 "prism/templates/ext/prism/api_node.c.erb"
3097 argv[6] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source, freeze);
3098
3099 VALUE value = rb_class_new_instance(7, argv, rb_cPrismEnsureNode);
3100 if (freeze) rb_obj_freeze(value);
3101
3102 rb_ary_push(value_stack, value);
3103 break;
3104 }
3105#line 190 "prism/templates/ext/prism/api_node.c.erb"
3106 case PM_FALSE_NODE: {
3107 VALUE argv[4];
3108
3109 // source
3110 argv[0] = source;
3111
3112 // node_id
3113 argv[1] = ULONG2NUM(node->node_id);
3114
3115 // location
3116 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3117
3118 // flags
3119 argv[3] = ULONG2NUM(node->flags);
3120
3121 VALUE value = rb_class_new_instance(4, argv, rb_cPrismFalseNode);
3122 if (freeze) rb_obj_freeze(value);
3123
3124 rb_ary_push(value_stack, value);
3125 break;
3126 }
3127#line 190 "prism/templates/ext/prism/api_node.c.erb"
3128 case PM_FIND_PATTERN_NODE: {
3129 pm_find_pattern_node_t *cast = (pm_find_pattern_node_t *) node;
3130 VALUE argv[10];
3131
3132 // source
3133 argv[0] = source;
3134
3135 // node_id
3136 argv[1] = ULONG2NUM(node->node_id);
3137
3138 // location
3139 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3140
3141 // flags
3142 argv[3] = ULONG2NUM(node->flags);
3143
3144 // constant
3145#line 213 "prism/templates/ext/prism/api_node.c.erb"
3146 argv[4] = rb_ary_pop(value_stack);
3147
3148 // left
3149#line 213 "prism/templates/ext/prism/api_node.c.erb"
3150 argv[5] = rb_ary_pop(value_stack);
3151
3152 // requireds
3153#line 216 "prism/templates/ext/prism/api_node.c.erb"
3154 argv[6] = rb_ary_new_capa(cast->requireds.size);
3155 for (size_t index = 0; index < cast->requireds.size; index++) {
3156 rb_ary_push(argv[6], rb_ary_pop(value_stack));
3157 }
3158 if (freeze) rb_obj_freeze(argv[6]);
3159
3160 // right
3161#line 213 "prism/templates/ext/prism/api_node.c.erb"
3162 argv[7] = rb_ary_pop(value_stack);
3163
3164 // opening_loc
3165#line 243 "prism/templates/ext/prism/api_node.c.erb"
3166 argv[8] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
3167
3168 // closing_loc
3169#line 243 "prism/templates/ext/prism/api_node.c.erb"
3170 argv[9] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
3171
3172 VALUE value = rb_class_new_instance(10, argv, rb_cPrismFindPatternNode);
3173 if (freeze) rb_obj_freeze(value);
3174
3175 rb_ary_push(value_stack, value);
3176 break;
3177 }
3178#line 190 "prism/templates/ext/prism/api_node.c.erb"
3179 case PM_FLIP_FLOP_NODE: {
3180 pm_flip_flop_node_t *cast = (pm_flip_flop_node_t *) node;
3181 VALUE argv[7];
3182
3183 // source
3184 argv[0] = source;
3185
3186 // node_id
3187 argv[1] = ULONG2NUM(node->node_id);
3188
3189 // location
3190 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3191
3192 // flags
3193 argv[3] = ULONG2NUM(node->flags);
3194
3195 // left
3196#line 213 "prism/templates/ext/prism/api_node.c.erb"
3197 argv[4] = rb_ary_pop(value_stack);
3198
3199 // right
3200#line 213 "prism/templates/ext/prism/api_node.c.erb"
3201 argv[5] = rb_ary_pop(value_stack);
3202
3203 // operator_loc
3204#line 240 "prism/templates/ext/prism/api_node.c.erb"
3205 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
3206
3207 VALUE value = rb_class_new_instance(7, argv, rb_cPrismFlipFlopNode);
3208 if (freeze) rb_obj_freeze(value);
3209
3210 rb_ary_push(value_stack, value);
3211 break;
3212 }
3213#line 190 "prism/templates/ext/prism/api_node.c.erb"
3214 case PM_FLOAT_NODE: {
3215 pm_float_node_t *cast = (pm_float_node_t *) node;
3216 VALUE argv[5];
3217
3218 // source
3219 argv[0] = source;
3220
3221 // node_id
3222 argv[1] = ULONG2NUM(node->node_id);
3223
3224 // location
3225 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3226
3227 // flags
3228 argv[3] = ULONG2NUM(node->flags);
3229
3230 // value
3231#line 255 "prism/templates/ext/prism/api_node.c.erb"
3232 argv[4] = DBL2NUM(cast->value);
3233
3234 VALUE value = rb_class_new_instance(5, argv, rb_cPrismFloatNode);
3235 if (freeze) rb_obj_freeze(value);
3236
3237 rb_ary_push(value_stack, value);
3238 break;
3239 }
3240#line 190 "prism/templates/ext/prism/api_node.c.erb"
3241 case PM_FOR_NODE: {
3242 pm_for_node_t *cast = (pm_for_node_t *) node;
3243 VALUE argv[11];
3244
3245 // source
3246 argv[0] = source;
3247
3248 // node_id
3249 argv[1] = ULONG2NUM(node->node_id);
3250
3251 // location
3252 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3253
3254 // flags
3255 argv[3] = ULONG2NUM(node->flags);
3256
3257 // index
3258#line 213 "prism/templates/ext/prism/api_node.c.erb"
3259 argv[4] = rb_ary_pop(value_stack);
3260
3261 // collection
3262#line 213 "prism/templates/ext/prism/api_node.c.erb"
3263 argv[5] = rb_ary_pop(value_stack);
3264
3265 // statements
3266#line 213 "prism/templates/ext/prism/api_node.c.erb"
3267 argv[6] = rb_ary_pop(value_stack);
3268
3269 // for_keyword_loc
3270#line 240 "prism/templates/ext/prism/api_node.c.erb"
3271 argv[7] = pm_location_new(parser, cast->for_keyword_loc.start, cast->for_keyword_loc.end, source, freeze);
3272
3273 // in_keyword_loc
3274#line 240 "prism/templates/ext/prism/api_node.c.erb"
3275 argv[8] = pm_location_new(parser, cast->in_keyword_loc.start, cast->in_keyword_loc.end, source, freeze);
3276
3277 // do_keyword_loc
3278#line 243 "prism/templates/ext/prism/api_node.c.erb"
3279 argv[9] = cast->do_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->do_keyword_loc.start, cast->do_keyword_loc.end, source, freeze);
3280
3281 // end_keyword_loc
3282#line 240 "prism/templates/ext/prism/api_node.c.erb"
3283 argv[10] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source, freeze);
3284
3285 VALUE value = rb_class_new_instance(11, argv, rb_cPrismForNode);
3286 if (freeze) rb_obj_freeze(value);
3287
3288 rb_ary_push(value_stack, value);
3289 break;
3290 }
3291#line 190 "prism/templates/ext/prism/api_node.c.erb"
3292 case PM_FORWARDING_ARGUMENTS_NODE: {
3293 VALUE argv[4];
3294
3295 // source
3296 argv[0] = source;
3297
3298 // node_id
3299 argv[1] = ULONG2NUM(node->node_id);
3300
3301 // location
3302 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3303
3304 // flags
3305 argv[3] = ULONG2NUM(node->flags);
3306
3307 VALUE value = rb_class_new_instance(4, argv, rb_cPrismForwardingArgumentsNode);
3308 if (freeze) rb_obj_freeze(value);
3309
3310 rb_ary_push(value_stack, value);
3311 break;
3312 }
3313#line 190 "prism/templates/ext/prism/api_node.c.erb"
3314 case PM_FORWARDING_PARAMETER_NODE: {
3315 VALUE argv[4];
3316
3317 // source
3318 argv[0] = source;
3319
3320 // node_id
3321 argv[1] = ULONG2NUM(node->node_id);
3322
3323 // location
3324 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3325
3326 // flags
3327 argv[3] = ULONG2NUM(node->flags);
3328
3329 VALUE value = rb_class_new_instance(4, argv, rb_cPrismForwardingParameterNode);
3330 if (freeze) rb_obj_freeze(value);
3331
3332 rb_ary_push(value_stack, value);
3333 break;
3334 }
3335#line 190 "prism/templates/ext/prism/api_node.c.erb"
3336 case PM_FORWARDING_SUPER_NODE: {
3337 VALUE argv[5];
3338
3339 // source
3340 argv[0] = source;
3341
3342 // node_id
3343 argv[1] = ULONG2NUM(node->node_id);
3344
3345 // location
3346 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3347
3348 // flags
3349 argv[3] = ULONG2NUM(node->flags);
3350
3351 // block
3352#line 213 "prism/templates/ext/prism/api_node.c.erb"
3353 argv[4] = rb_ary_pop(value_stack);
3354
3355 VALUE value = rb_class_new_instance(5, argv, rb_cPrismForwardingSuperNode);
3356 if (freeze) rb_obj_freeze(value);
3357
3358 rb_ary_push(value_stack, value);
3359 break;
3360 }
3361#line 190 "prism/templates/ext/prism/api_node.c.erb"
3362 case PM_GLOBAL_VARIABLE_AND_WRITE_NODE: {
3363 pm_global_variable_and_write_node_t *cast = (pm_global_variable_and_write_node_t *) node;
3364 VALUE argv[8];
3365
3366 // source
3367 argv[0] = source;
3368
3369 // node_id
3370 argv[1] = ULONG2NUM(node->node_id);
3371
3372 // location
3373 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3374
3375 // flags
3376 argv[3] = ULONG2NUM(node->flags);
3377
3378 // name
3379#line 226 "prism/templates/ext/prism/api_node.c.erb"
3380 assert(cast->name != 0);
3381 argv[4] = RARRAY_AREF(constants, cast->name - 1);
3382
3383 // name_loc
3384#line 240 "prism/templates/ext/prism/api_node.c.erb"
3385 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
3386
3387 // operator_loc
3388#line 240 "prism/templates/ext/prism/api_node.c.erb"
3389 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
3390
3391 // value
3392#line 213 "prism/templates/ext/prism/api_node.c.erb"
3393 argv[7] = rb_ary_pop(value_stack);
3394
3395 VALUE value = rb_class_new_instance(8, argv, rb_cPrismGlobalVariableAndWriteNode);
3396 if (freeze) rb_obj_freeze(value);
3397
3398 rb_ary_push(value_stack, value);
3399 break;
3400 }
3401#line 190 "prism/templates/ext/prism/api_node.c.erb"
3402 case PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: {
3403 pm_global_variable_operator_write_node_t *cast = (pm_global_variable_operator_write_node_t *) node;
3404 VALUE argv[9];
3405
3406 // source
3407 argv[0] = source;
3408
3409 // node_id
3410 argv[1] = ULONG2NUM(node->node_id);
3411
3412 // location
3413 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3414
3415 // flags
3416 argv[3] = ULONG2NUM(node->flags);
3417
3418 // name
3419#line 226 "prism/templates/ext/prism/api_node.c.erb"
3420 assert(cast->name != 0);
3421 argv[4] = RARRAY_AREF(constants, cast->name - 1);
3422
3423 // name_loc
3424#line 240 "prism/templates/ext/prism/api_node.c.erb"
3425 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
3426
3427 // binary_operator_loc
3428#line 240 "prism/templates/ext/prism/api_node.c.erb"
3429 argv[6] = pm_location_new(parser, cast->binary_operator_loc.start, cast->binary_operator_loc.end, source, freeze);
3430
3431 // value
3432#line 213 "prism/templates/ext/prism/api_node.c.erb"
3433 argv[7] = rb_ary_pop(value_stack);
3434
3435 // binary_operator
3436#line 226 "prism/templates/ext/prism/api_node.c.erb"
3437 assert(cast->binary_operator != 0);
3438 argv[8] = RARRAY_AREF(constants, cast->binary_operator - 1);
3439
3440 VALUE value = rb_class_new_instance(9, argv, rb_cPrismGlobalVariableOperatorWriteNode);
3441 if (freeze) rb_obj_freeze(value);
3442
3443 rb_ary_push(value_stack, value);
3444 break;
3445 }
3446#line 190 "prism/templates/ext/prism/api_node.c.erb"
3447 case PM_GLOBAL_VARIABLE_OR_WRITE_NODE: {
3448 pm_global_variable_or_write_node_t *cast = (pm_global_variable_or_write_node_t *) node;
3449 VALUE argv[8];
3450
3451 // source
3452 argv[0] = source;
3453
3454 // node_id
3455 argv[1] = ULONG2NUM(node->node_id);
3456
3457 // location
3458 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3459
3460 // flags
3461 argv[3] = ULONG2NUM(node->flags);
3462
3463 // name
3464#line 226 "prism/templates/ext/prism/api_node.c.erb"
3465 assert(cast->name != 0);
3466 argv[4] = RARRAY_AREF(constants, cast->name - 1);
3467
3468 // name_loc
3469#line 240 "prism/templates/ext/prism/api_node.c.erb"
3470 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
3471
3472 // operator_loc
3473#line 240 "prism/templates/ext/prism/api_node.c.erb"
3474 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
3475
3476 // value
3477#line 213 "prism/templates/ext/prism/api_node.c.erb"
3478 argv[7] = rb_ary_pop(value_stack);
3479
3480 VALUE value = rb_class_new_instance(8, argv, rb_cPrismGlobalVariableOrWriteNode);
3481 if (freeze) rb_obj_freeze(value);
3482
3483 rb_ary_push(value_stack, value);
3484 break;
3485 }
3486#line 190 "prism/templates/ext/prism/api_node.c.erb"
3487 case PM_GLOBAL_VARIABLE_READ_NODE: {
3488 pm_global_variable_read_node_t *cast = (pm_global_variable_read_node_t *) node;
3489 VALUE argv[5];
3490
3491 // source
3492 argv[0] = source;
3493
3494 // node_id
3495 argv[1] = ULONG2NUM(node->node_id);
3496
3497 // location
3498 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3499
3500 // flags
3501 argv[3] = ULONG2NUM(node->flags);
3502
3503 // name
3504#line 226 "prism/templates/ext/prism/api_node.c.erb"
3505 assert(cast->name != 0);
3506 argv[4] = RARRAY_AREF(constants, cast->name - 1);
3507
3508 VALUE value = rb_class_new_instance(5, argv, rb_cPrismGlobalVariableReadNode);
3509 if (freeze) rb_obj_freeze(value);
3510
3511 rb_ary_push(value_stack, value);
3512 break;
3513 }
3514#line 190 "prism/templates/ext/prism/api_node.c.erb"
3515 case PM_GLOBAL_VARIABLE_TARGET_NODE: {
3516 pm_global_variable_target_node_t *cast = (pm_global_variable_target_node_t *) node;
3517 VALUE argv[5];
3518
3519 // source
3520 argv[0] = source;
3521
3522 // node_id
3523 argv[1] = ULONG2NUM(node->node_id);
3524
3525 // location
3526 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3527
3528 // flags
3529 argv[3] = ULONG2NUM(node->flags);
3530
3531 // name
3532#line 226 "prism/templates/ext/prism/api_node.c.erb"
3533 assert(cast->name != 0);
3534 argv[4] = RARRAY_AREF(constants, cast->name - 1);
3535
3536 VALUE value = rb_class_new_instance(5, argv, rb_cPrismGlobalVariableTargetNode);
3537 if (freeze) rb_obj_freeze(value);
3538
3539 rb_ary_push(value_stack, value);
3540 break;
3541 }
3542#line 190 "prism/templates/ext/prism/api_node.c.erb"
3543 case PM_GLOBAL_VARIABLE_WRITE_NODE: {
3544 pm_global_variable_write_node_t *cast = (pm_global_variable_write_node_t *) node;
3545 VALUE argv[8];
3546
3547 // source
3548 argv[0] = source;
3549
3550 // node_id
3551 argv[1] = ULONG2NUM(node->node_id);
3552
3553 // location
3554 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3555
3556 // flags
3557 argv[3] = ULONG2NUM(node->flags);
3558
3559 // name
3560#line 226 "prism/templates/ext/prism/api_node.c.erb"
3561 assert(cast->name != 0);
3562 argv[4] = RARRAY_AREF(constants, cast->name - 1);
3563
3564 // name_loc
3565#line 240 "prism/templates/ext/prism/api_node.c.erb"
3566 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
3567
3568 // value
3569#line 213 "prism/templates/ext/prism/api_node.c.erb"
3570 argv[6] = rb_ary_pop(value_stack);
3571
3572 // operator_loc
3573#line 240 "prism/templates/ext/prism/api_node.c.erb"
3574 argv[7] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
3575
3576 VALUE value = rb_class_new_instance(8, argv, rb_cPrismGlobalVariableWriteNode);
3577 if (freeze) rb_obj_freeze(value);
3578
3579 rb_ary_push(value_stack, value);
3580 break;
3581 }
3582#line 190 "prism/templates/ext/prism/api_node.c.erb"
3583 case PM_HASH_NODE: {
3584 pm_hash_node_t *cast = (pm_hash_node_t *) node;
3585 VALUE argv[7];
3586
3587 // source
3588 argv[0] = source;
3589
3590 // node_id
3591 argv[1] = ULONG2NUM(node->node_id);
3592
3593 // location
3594 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3595
3596 // flags
3597 argv[3] = ULONG2NUM(node->flags);
3598
3599 // opening_loc
3600#line 240 "prism/templates/ext/prism/api_node.c.erb"
3601 argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
3602
3603 // elements
3604#line 216 "prism/templates/ext/prism/api_node.c.erb"
3605 argv[5] = rb_ary_new_capa(cast->elements.size);
3606 for (size_t index = 0; index < cast->elements.size; index++) {
3607 rb_ary_push(argv[5], rb_ary_pop(value_stack));
3608 }
3609 if (freeze) rb_obj_freeze(argv[5]);
3610
3611 // closing_loc
3612#line 240 "prism/templates/ext/prism/api_node.c.erb"
3613 argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
3614
3615 VALUE value = rb_class_new_instance(7, argv, rb_cPrismHashNode);
3616 if (freeze) rb_obj_freeze(value);
3617
3618 rb_ary_push(value_stack, value);
3619 break;
3620 }
3621#line 190 "prism/templates/ext/prism/api_node.c.erb"
3622 case PM_HASH_PATTERN_NODE: {
3623 pm_hash_pattern_node_t *cast = (pm_hash_pattern_node_t *) node;
3624 VALUE argv[9];
3625
3626 // source
3627 argv[0] = source;
3628
3629 // node_id
3630 argv[1] = ULONG2NUM(node->node_id);
3631
3632 // location
3633 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3634
3635 // flags
3636 argv[3] = ULONG2NUM(node->flags);
3637
3638 // constant
3639#line 213 "prism/templates/ext/prism/api_node.c.erb"
3640 argv[4] = rb_ary_pop(value_stack);
3641
3642 // elements
3643#line 216 "prism/templates/ext/prism/api_node.c.erb"
3644 argv[5] = rb_ary_new_capa(cast->elements.size);
3645 for (size_t index = 0; index < cast->elements.size; index++) {
3646 rb_ary_push(argv[5], rb_ary_pop(value_stack));
3647 }
3648 if (freeze) rb_obj_freeze(argv[5]);
3649
3650 // rest
3651#line 213 "prism/templates/ext/prism/api_node.c.erb"
3652 argv[6] = rb_ary_pop(value_stack);
3653
3654 // opening_loc
3655#line 243 "prism/templates/ext/prism/api_node.c.erb"
3656 argv[7] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
3657
3658 // closing_loc
3659#line 243 "prism/templates/ext/prism/api_node.c.erb"
3660 argv[8] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
3661
3662 VALUE value = rb_class_new_instance(9, argv, rb_cPrismHashPatternNode);
3663 if (freeze) rb_obj_freeze(value);
3664
3665 rb_ary_push(value_stack, value);
3666 break;
3667 }
3668#line 190 "prism/templates/ext/prism/api_node.c.erb"
3669 case PM_IF_NODE: {
3670 pm_if_node_t *cast = (pm_if_node_t *) node;
3671 VALUE argv[10];
3672
3673 // source
3674 argv[0] = source;
3675
3676 // node_id
3677 argv[1] = ULONG2NUM(node->node_id);
3678
3679 // location
3680 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3681
3682 // flags
3683 argv[3] = ULONG2NUM(node->flags);
3684
3685 // if_keyword_loc
3686#line 243 "prism/templates/ext/prism/api_node.c.erb"
3687 argv[4] = cast->if_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->if_keyword_loc.start, cast->if_keyword_loc.end, source, freeze);
3688
3689 // predicate
3690#line 213 "prism/templates/ext/prism/api_node.c.erb"
3691 argv[5] = rb_ary_pop(value_stack);
3692
3693 // then_keyword_loc
3694#line 243 "prism/templates/ext/prism/api_node.c.erb"
3695 argv[6] = cast->then_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->then_keyword_loc.start, cast->then_keyword_loc.end, source, freeze);
3696
3697 // statements
3698#line 213 "prism/templates/ext/prism/api_node.c.erb"
3699 argv[7] = rb_ary_pop(value_stack);
3700
3701 // subsequent
3702#line 213 "prism/templates/ext/prism/api_node.c.erb"
3703 argv[8] = rb_ary_pop(value_stack);
3704
3705 // end_keyword_loc
3706#line 243 "prism/templates/ext/prism/api_node.c.erb"
3707 argv[9] = cast->end_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source, freeze);
3708
3709 VALUE value = rb_class_new_instance(10, argv, rb_cPrismIfNode);
3710 if (freeze) rb_obj_freeze(value);
3711
3712 rb_ary_push(value_stack, value);
3713 break;
3714 }
3715#line 190 "prism/templates/ext/prism/api_node.c.erb"
3716 case PM_IMAGINARY_NODE: {
3717 VALUE argv[5];
3718
3719 // source
3720 argv[0] = source;
3721
3722 // node_id
3723 argv[1] = ULONG2NUM(node->node_id);
3724
3725 // location
3726 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3727
3728 // flags
3729 argv[3] = ULONG2NUM(node->flags);
3730
3731 // numeric
3732#line 213 "prism/templates/ext/prism/api_node.c.erb"
3733 argv[4] = rb_ary_pop(value_stack);
3734
3735 VALUE value = rb_class_new_instance(5, argv, rb_cPrismImaginaryNode);
3736 if (freeze) rb_obj_freeze(value);
3737
3738 rb_ary_push(value_stack, value);
3739 break;
3740 }
3741#line 190 "prism/templates/ext/prism/api_node.c.erb"
3742 case PM_IMPLICIT_NODE: {
3743 VALUE argv[5];
3744
3745 // source
3746 argv[0] = source;
3747
3748 // node_id
3749 argv[1] = ULONG2NUM(node->node_id);
3750
3751 // location
3752 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3753
3754 // flags
3755 argv[3] = ULONG2NUM(node->flags);
3756
3757 // value
3758#line 213 "prism/templates/ext/prism/api_node.c.erb"
3759 argv[4] = rb_ary_pop(value_stack);
3760
3761 VALUE value = rb_class_new_instance(5, argv, rb_cPrismImplicitNode);
3762 if (freeze) rb_obj_freeze(value);
3763
3764 rb_ary_push(value_stack, value);
3765 break;
3766 }
3767#line 190 "prism/templates/ext/prism/api_node.c.erb"
3768 case PM_IMPLICIT_REST_NODE: {
3769 VALUE argv[4];
3770
3771 // source
3772 argv[0] = source;
3773
3774 // node_id
3775 argv[1] = ULONG2NUM(node->node_id);
3776
3777 // location
3778 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3779
3780 // flags
3781 argv[3] = ULONG2NUM(node->flags);
3782
3783 VALUE value = rb_class_new_instance(4, argv, rb_cPrismImplicitRestNode);
3784 if (freeze) rb_obj_freeze(value);
3785
3786 rb_ary_push(value_stack, value);
3787 break;
3788 }
3789#line 190 "prism/templates/ext/prism/api_node.c.erb"
3790 case PM_IN_NODE: {
3791 pm_in_node_t *cast = (pm_in_node_t *) node;
3792 VALUE argv[8];
3793
3794 // source
3795 argv[0] = source;
3796
3797 // node_id
3798 argv[1] = ULONG2NUM(node->node_id);
3799
3800 // location
3801 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3802
3803 // flags
3804 argv[3] = ULONG2NUM(node->flags);
3805
3806 // pattern
3807#line 213 "prism/templates/ext/prism/api_node.c.erb"
3808 argv[4] = rb_ary_pop(value_stack);
3809
3810 // statements
3811#line 213 "prism/templates/ext/prism/api_node.c.erb"
3812 argv[5] = rb_ary_pop(value_stack);
3813
3814 // in_loc
3815#line 240 "prism/templates/ext/prism/api_node.c.erb"
3816 argv[6] = pm_location_new(parser, cast->in_loc.start, cast->in_loc.end, source, freeze);
3817
3818 // then_loc
3819#line 243 "prism/templates/ext/prism/api_node.c.erb"
3820 argv[7] = cast->then_loc.start == NULL ? Qnil : pm_location_new(parser, cast->then_loc.start, cast->then_loc.end, source, freeze);
3821
3822 VALUE value = rb_class_new_instance(8, argv, rb_cPrismInNode);
3823 if (freeze) rb_obj_freeze(value);
3824
3825 rb_ary_push(value_stack, value);
3826 break;
3827 }
3828#line 190 "prism/templates/ext/prism/api_node.c.erb"
3829 case PM_INDEX_AND_WRITE_NODE: {
3830 pm_index_and_write_node_t *cast = (pm_index_and_write_node_t *) node;
3831 VALUE argv[12];
3832
3833 // source
3834 argv[0] = source;
3835
3836 // node_id
3837 argv[1] = ULONG2NUM(node->node_id);
3838
3839 // location
3840 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3841
3842 // flags
3843 argv[3] = ULONG2NUM(node->flags);
3844
3845 // receiver
3846#line 213 "prism/templates/ext/prism/api_node.c.erb"
3847 argv[4] = rb_ary_pop(value_stack);
3848
3849 // call_operator_loc
3850#line 243 "prism/templates/ext/prism/api_node.c.erb"
3851 argv[5] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source, freeze);
3852
3853 // opening_loc
3854#line 240 "prism/templates/ext/prism/api_node.c.erb"
3855 argv[6] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
3856
3857 // arguments
3858#line 213 "prism/templates/ext/prism/api_node.c.erb"
3859 argv[7] = rb_ary_pop(value_stack);
3860
3861 // closing_loc
3862#line 240 "prism/templates/ext/prism/api_node.c.erb"
3863 argv[8] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
3864
3865 // block
3866#line 213 "prism/templates/ext/prism/api_node.c.erb"
3867 argv[9] = rb_ary_pop(value_stack);
3868
3869 // operator_loc
3870#line 240 "prism/templates/ext/prism/api_node.c.erb"
3871 argv[10] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
3872
3873 // value
3874#line 213 "prism/templates/ext/prism/api_node.c.erb"
3875 argv[11] = rb_ary_pop(value_stack);
3876
3877 VALUE value = rb_class_new_instance(12, argv, rb_cPrismIndexAndWriteNode);
3878 if (freeze) rb_obj_freeze(value);
3879
3880 rb_ary_push(value_stack, value);
3881 break;
3882 }
3883#line 190 "prism/templates/ext/prism/api_node.c.erb"
3884 case PM_INDEX_OPERATOR_WRITE_NODE: {
3885 pm_index_operator_write_node_t *cast = (pm_index_operator_write_node_t *) node;
3886 VALUE argv[13];
3887
3888 // source
3889 argv[0] = source;
3890
3891 // node_id
3892 argv[1] = ULONG2NUM(node->node_id);
3893
3894 // location
3895 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3896
3897 // flags
3898 argv[3] = ULONG2NUM(node->flags);
3899
3900 // receiver
3901#line 213 "prism/templates/ext/prism/api_node.c.erb"
3902 argv[4] = rb_ary_pop(value_stack);
3903
3904 // call_operator_loc
3905#line 243 "prism/templates/ext/prism/api_node.c.erb"
3906 argv[5] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source, freeze);
3907
3908 // opening_loc
3909#line 240 "prism/templates/ext/prism/api_node.c.erb"
3910 argv[6] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
3911
3912 // arguments
3913#line 213 "prism/templates/ext/prism/api_node.c.erb"
3914 argv[7] = rb_ary_pop(value_stack);
3915
3916 // closing_loc
3917#line 240 "prism/templates/ext/prism/api_node.c.erb"
3918 argv[8] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
3919
3920 // block
3921#line 213 "prism/templates/ext/prism/api_node.c.erb"
3922 argv[9] = rb_ary_pop(value_stack);
3923
3924 // binary_operator
3925#line 226 "prism/templates/ext/prism/api_node.c.erb"
3926 assert(cast->binary_operator != 0);
3927 argv[10] = RARRAY_AREF(constants, cast->binary_operator - 1);
3928
3929 // binary_operator_loc
3930#line 240 "prism/templates/ext/prism/api_node.c.erb"
3931 argv[11] = pm_location_new(parser, cast->binary_operator_loc.start, cast->binary_operator_loc.end, source, freeze);
3932
3933 // value
3934#line 213 "prism/templates/ext/prism/api_node.c.erb"
3935 argv[12] = rb_ary_pop(value_stack);
3936
3937 VALUE value = rb_class_new_instance(13, argv, rb_cPrismIndexOperatorWriteNode);
3938 if (freeze) rb_obj_freeze(value);
3939
3940 rb_ary_push(value_stack, value);
3941 break;
3942 }
3943#line 190 "prism/templates/ext/prism/api_node.c.erb"
3944 case PM_INDEX_OR_WRITE_NODE: {
3945 pm_index_or_write_node_t *cast = (pm_index_or_write_node_t *) node;
3946 VALUE argv[12];
3947
3948 // source
3949 argv[0] = source;
3950
3951 // node_id
3952 argv[1] = ULONG2NUM(node->node_id);
3953
3954 // location
3955 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
3956
3957 // flags
3958 argv[3] = ULONG2NUM(node->flags);
3959
3960 // receiver
3961#line 213 "prism/templates/ext/prism/api_node.c.erb"
3962 argv[4] = rb_ary_pop(value_stack);
3963
3964 // call_operator_loc
3965#line 243 "prism/templates/ext/prism/api_node.c.erb"
3966 argv[5] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source, freeze);
3967
3968 // opening_loc
3969#line 240 "prism/templates/ext/prism/api_node.c.erb"
3970 argv[6] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
3971
3972 // arguments
3973#line 213 "prism/templates/ext/prism/api_node.c.erb"
3974 argv[7] = rb_ary_pop(value_stack);
3975
3976 // closing_loc
3977#line 240 "prism/templates/ext/prism/api_node.c.erb"
3978 argv[8] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
3979
3980 // block
3981#line 213 "prism/templates/ext/prism/api_node.c.erb"
3982 argv[9] = rb_ary_pop(value_stack);
3983
3984 // operator_loc
3985#line 240 "prism/templates/ext/prism/api_node.c.erb"
3986 argv[10] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
3987
3988 // value
3989#line 213 "prism/templates/ext/prism/api_node.c.erb"
3990 argv[11] = rb_ary_pop(value_stack);
3991
3992 VALUE value = rb_class_new_instance(12, argv, rb_cPrismIndexOrWriteNode);
3993 if (freeze) rb_obj_freeze(value);
3994
3995 rb_ary_push(value_stack, value);
3996 break;
3997 }
3998#line 190 "prism/templates/ext/prism/api_node.c.erb"
3999 case PM_INDEX_TARGET_NODE: {
4000 pm_index_target_node_t *cast = (pm_index_target_node_t *) node;
4001 VALUE argv[9];
4002
4003 // source
4004 argv[0] = source;
4005
4006 // node_id
4007 argv[1] = ULONG2NUM(node->node_id);
4008
4009 // location
4010 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4011
4012 // flags
4013 argv[3] = ULONG2NUM(node->flags);
4014
4015 // receiver
4016#line 213 "prism/templates/ext/prism/api_node.c.erb"
4017 argv[4] = rb_ary_pop(value_stack);
4018
4019 // opening_loc
4020#line 240 "prism/templates/ext/prism/api_node.c.erb"
4021 argv[5] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
4022
4023 // arguments
4024#line 213 "prism/templates/ext/prism/api_node.c.erb"
4025 argv[6] = rb_ary_pop(value_stack);
4026
4027 // closing_loc
4028#line 240 "prism/templates/ext/prism/api_node.c.erb"
4029 argv[7] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
4030
4031 // block
4032#line 213 "prism/templates/ext/prism/api_node.c.erb"
4033 argv[8] = rb_ary_pop(value_stack);
4034
4035 VALUE value = rb_class_new_instance(9, argv, rb_cPrismIndexTargetNode);
4036 if (freeze) rb_obj_freeze(value);
4037
4038 rb_ary_push(value_stack, value);
4039 break;
4040 }
4041#line 190 "prism/templates/ext/prism/api_node.c.erb"
4042 case PM_INSTANCE_VARIABLE_AND_WRITE_NODE: {
4043 pm_instance_variable_and_write_node_t *cast = (pm_instance_variable_and_write_node_t *) node;
4044 VALUE argv[8];
4045
4046 // source
4047 argv[0] = source;
4048
4049 // node_id
4050 argv[1] = ULONG2NUM(node->node_id);
4051
4052 // location
4053 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4054
4055 // flags
4056 argv[3] = ULONG2NUM(node->flags);
4057
4058 // name
4059#line 226 "prism/templates/ext/prism/api_node.c.erb"
4060 assert(cast->name != 0);
4061 argv[4] = RARRAY_AREF(constants, cast->name - 1);
4062
4063 // name_loc
4064#line 240 "prism/templates/ext/prism/api_node.c.erb"
4065 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
4066
4067 // operator_loc
4068#line 240 "prism/templates/ext/prism/api_node.c.erb"
4069 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
4070
4071 // value
4072#line 213 "prism/templates/ext/prism/api_node.c.erb"
4073 argv[7] = rb_ary_pop(value_stack);
4074
4075 VALUE value = rb_class_new_instance(8, argv, rb_cPrismInstanceVariableAndWriteNode);
4076 if (freeze) rb_obj_freeze(value);
4077
4078 rb_ary_push(value_stack, value);
4079 break;
4080 }
4081#line 190 "prism/templates/ext/prism/api_node.c.erb"
4082 case PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: {
4083 pm_instance_variable_operator_write_node_t *cast = (pm_instance_variable_operator_write_node_t *) node;
4084 VALUE argv[9];
4085
4086 // source
4087 argv[0] = source;
4088
4089 // node_id
4090 argv[1] = ULONG2NUM(node->node_id);
4091
4092 // location
4093 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4094
4095 // flags
4096 argv[3] = ULONG2NUM(node->flags);
4097
4098 // name
4099#line 226 "prism/templates/ext/prism/api_node.c.erb"
4100 assert(cast->name != 0);
4101 argv[4] = RARRAY_AREF(constants, cast->name - 1);
4102
4103 // name_loc
4104#line 240 "prism/templates/ext/prism/api_node.c.erb"
4105 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
4106
4107 // binary_operator_loc
4108#line 240 "prism/templates/ext/prism/api_node.c.erb"
4109 argv[6] = pm_location_new(parser, cast->binary_operator_loc.start, cast->binary_operator_loc.end, source, freeze);
4110
4111 // value
4112#line 213 "prism/templates/ext/prism/api_node.c.erb"
4113 argv[7] = rb_ary_pop(value_stack);
4114
4115 // binary_operator
4116#line 226 "prism/templates/ext/prism/api_node.c.erb"
4117 assert(cast->binary_operator != 0);
4118 argv[8] = RARRAY_AREF(constants, cast->binary_operator - 1);
4119
4120 VALUE value = rb_class_new_instance(9, argv, rb_cPrismInstanceVariableOperatorWriteNode);
4121 if (freeze) rb_obj_freeze(value);
4122
4123 rb_ary_push(value_stack, value);
4124 break;
4125 }
4126#line 190 "prism/templates/ext/prism/api_node.c.erb"
4127 case PM_INSTANCE_VARIABLE_OR_WRITE_NODE: {
4128 pm_instance_variable_or_write_node_t *cast = (pm_instance_variable_or_write_node_t *) node;
4129 VALUE argv[8];
4130
4131 // source
4132 argv[0] = source;
4133
4134 // node_id
4135 argv[1] = ULONG2NUM(node->node_id);
4136
4137 // location
4138 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4139
4140 // flags
4141 argv[3] = ULONG2NUM(node->flags);
4142
4143 // name
4144#line 226 "prism/templates/ext/prism/api_node.c.erb"
4145 assert(cast->name != 0);
4146 argv[4] = RARRAY_AREF(constants, cast->name - 1);
4147
4148 // name_loc
4149#line 240 "prism/templates/ext/prism/api_node.c.erb"
4150 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
4151
4152 // operator_loc
4153#line 240 "prism/templates/ext/prism/api_node.c.erb"
4154 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
4155
4156 // value
4157#line 213 "prism/templates/ext/prism/api_node.c.erb"
4158 argv[7] = rb_ary_pop(value_stack);
4159
4160 VALUE value = rb_class_new_instance(8, argv, rb_cPrismInstanceVariableOrWriteNode);
4161 if (freeze) rb_obj_freeze(value);
4162
4163 rb_ary_push(value_stack, value);
4164 break;
4165 }
4166#line 190 "prism/templates/ext/prism/api_node.c.erb"
4167 case PM_INSTANCE_VARIABLE_READ_NODE: {
4168 pm_instance_variable_read_node_t *cast = (pm_instance_variable_read_node_t *) node;
4169 VALUE argv[5];
4170
4171 // source
4172 argv[0] = source;
4173
4174 // node_id
4175 argv[1] = ULONG2NUM(node->node_id);
4176
4177 // location
4178 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4179
4180 // flags
4181 argv[3] = ULONG2NUM(node->flags);
4182
4183 // name
4184#line 226 "prism/templates/ext/prism/api_node.c.erb"
4185 assert(cast->name != 0);
4186 argv[4] = RARRAY_AREF(constants, cast->name - 1);
4187
4188 VALUE value = rb_class_new_instance(5, argv, rb_cPrismInstanceVariableReadNode);
4189 if (freeze) rb_obj_freeze(value);
4190
4191 rb_ary_push(value_stack, value);
4192 break;
4193 }
4194#line 190 "prism/templates/ext/prism/api_node.c.erb"
4195 case PM_INSTANCE_VARIABLE_TARGET_NODE: {
4196 pm_instance_variable_target_node_t *cast = (pm_instance_variable_target_node_t *) node;
4197 VALUE argv[5];
4198
4199 // source
4200 argv[0] = source;
4201
4202 // node_id
4203 argv[1] = ULONG2NUM(node->node_id);
4204
4205 // location
4206 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4207
4208 // flags
4209 argv[3] = ULONG2NUM(node->flags);
4210
4211 // name
4212#line 226 "prism/templates/ext/prism/api_node.c.erb"
4213 assert(cast->name != 0);
4214 argv[4] = RARRAY_AREF(constants, cast->name - 1);
4215
4216 VALUE value = rb_class_new_instance(5, argv, rb_cPrismInstanceVariableTargetNode);
4217 if (freeze) rb_obj_freeze(value);
4218
4219 rb_ary_push(value_stack, value);
4220 break;
4221 }
4222#line 190 "prism/templates/ext/prism/api_node.c.erb"
4223 case PM_INSTANCE_VARIABLE_WRITE_NODE: {
4224 pm_instance_variable_write_node_t *cast = (pm_instance_variable_write_node_t *) node;
4225 VALUE argv[8];
4226
4227 // source
4228 argv[0] = source;
4229
4230 // node_id
4231 argv[1] = ULONG2NUM(node->node_id);
4232
4233 // location
4234 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4235
4236 // flags
4237 argv[3] = ULONG2NUM(node->flags);
4238
4239 // name
4240#line 226 "prism/templates/ext/prism/api_node.c.erb"
4241 assert(cast->name != 0);
4242 argv[4] = RARRAY_AREF(constants, cast->name - 1);
4243
4244 // name_loc
4245#line 240 "prism/templates/ext/prism/api_node.c.erb"
4246 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
4247
4248 // value
4249#line 213 "prism/templates/ext/prism/api_node.c.erb"
4250 argv[6] = rb_ary_pop(value_stack);
4251
4252 // operator_loc
4253#line 240 "prism/templates/ext/prism/api_node.c.erb"
4254 argv[7] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
4255
4256 VALUE value = rb_class_new_instance(8, argv, rb_cPrismInstanceVariableWriteNode);
4257 if (freeze) rb_obj_freeze(value);
4258
4259 rb_ary_push(value_stack, value);
4260 break;
4261 }
4262#line 190 "prism/templates/ext/prism/api_node.c.erb"
4263 case PM_INTEGER_NODE: {
4264 pm_integer_node_t *cast = (pm_integer_node_t *) node;
4265 VALUE argv[5];
4266
4267 // source
4268 argv[0] = source;
4269
4270 // node_id
4271 argv[1] = ULONG2NUM(node->node_id);
4272
4273 // location
4274 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4275
4276 // flags
4277 argv[3] = ULONG2NUM(node->flags);
4278
4279 // value
4280#line 252 "prism/templates/ext/prism/api_node.c.erb"
4281 argv[4] = pm_integer_new(&cast->value);
4282
4283 VALUE value = rb_class_new_instance(5, argv, rb_cPrismIntegerNode);
4284 if (freeze) rb_obj_freeze(value);
4285
4286 rb_ary_push(value_stack, value);
4287 break;
4288 }
4289#line 190 "prism/templates/ext/prism/api_node.c.erb"
4290 case PM_INTERPOLATED_MATCH_LAST_LINE_NODE: {
4291 pm_interpolated_match_last_line_node_t *cast = (pm_interpolated_match_last_line_node_t *) node;
4292 VALUE argv[7];
4293
4294 // source
4295 argv[0] = source;
4296
4297 // node_id
4298 argv[1] = ULONG2NUM(node->node_id);
4299
4300 // location
4301 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4302
4303 // flags
4304 argv[3] = ULONG2NUM(node->flags);
4305
4306 // opening_loc
4307#line 240 "prism/templates/ext/prism/api_node.c.erb"
4308 argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
4309
4310 // parts
4311#line 216 "prism/templates/ext/prism/api_node.c.erb"
4312 argv[5] = rb_ary_new_capa(cast->parts.size);
4313 for (size_t index = 0; index < cast->parts.size; index++) {
4314 rb_ary_push(argv[5], rb_ary_pop(value_stack));
4315 }
4316 if (freeze) rb_obj_freeze(argv[5]);
4317
4318 // closing_loc
4319#line 240 "prism/templates/ext/prism/api_node.c.erb"
4320 argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
4321
4322 VALUE value = rb_class_new_instance(7, argv, rb_cPrismInterpolatedMatchLastLineNode);
4323 if (freeze) rb_obj_freeze(value);
4324
4325 rb_ary_push(value_stack, value);
4326 break;
4327 }
4328#line 190 "prism/templates/ext/prism/api_node.c.erb"
4329 case PM_INTERPOLATED_REGULAR_EXPRESSION_NODE: {
4330 pm_interpolated_regular_expression_node_t *cast = (pm_interpolated_regular_expression_node_t *) node;
4331 VALUE argv[7];
4332
4333 // source
4334 argv[0] = source;
4335
4336 // node_id
4337 argv[1] = ULONG2NUM(node->node_id);
4338
4339 // location
4340 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4341
4342 // flags
4343 argv[3] = ULONG2NUM(node->flags);
4344
4345 // opening_loc
4346#line 240 "prism/templates/ext/prism/api_node.c.erb"
4347 argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
4348
4349 // parts
4350#line 216 "prism/templates/ext/prism/api_node.c.erb"
4351 argv[5] = rb_ary_new_capa(cast->parts.size);
4352 for (size_t index = 0; index < cast->parts.size; index++) {
4353 rb_ary_push(argv[5], rb_ary_pop(value_stack));
4354 }
4355 if (freeze) rb_obj_freeze(argv[5]);
4356
4357 // closing_loc
4358#line 240 "prism/templates/ext/prism/api_node.c.erb"
4359 argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
4360
4361 VALUE value = rb_class_new_instance(7, argv, rb_cPrismInterpolatedRegularExpressionNode);
4362 if (freeze) rb_obj_freeze(value);
4363
4364 rb_ary_push(value_stack, value);
4365 break;
4366 }
4367#line 190 "prism/templates/ext/prism/api_node.c.erb"
4368 case PM_INTERPOLATED_STRING_NODE: {
4369 pm_interpolated_string_node_t *cast = (pm_interpolated_string_node_t *) node;
4370 VALUE argv[7];
4371
4372 // source
4373 argv[0] = source;
4374
4375 // node_id
4376 argv[1] = ULONG2NUM(node->node_id);
4377
4378 // location
4379 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4380
4381 // flags
4382 argv[3] = ULONG2NUM(node->flags);
4383
4384 // opening_loc
4385#line 243 "prism/templates/ext/prism/api_node.c.erb"
4386 argv[4] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
4387
4388 // parts
4389#line 216 "prism/templates/ext/prism/api_node.c.erb"
4390 argv[5] = rb_ary_new_capa(cast->parts.size);
4391 for (size_t index = 0; index < cast->parts.size; index++) {
4392 rb_ary_push(argv[5], rb_ary_pop(value_stack));
4393 }
4394 if (freeze) rb_obj_freeze(argv[5]);
4395
4396 // closing_loc
4397#line 243 "prism/templates/ext/prism/api_node.c.erb"
4398 argv[6] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
4399
4400 VALUE value = rb_class_new_instance(7, argv, rb_cPrismInterpolatedStringNode);
4401 if (freeze) rb_obj_freeze(value);
4402
4403 rb_ary_push(value_stack, value);
4404 break;
4405 }
4406#line 190 "prism/templates/ext/prism/api_node.c.erb"
4407 case PM_INTERPOLATED_SYMBOL_NODE: {
4408 pm_interpolated_symbol_node_t *cast = (pm_interpolated_symbol_node_t *) node;
4409 VALUE argv[7];
4410
4411 // source
4412 argv[0] = source;
4413
4414 // node_id
4415 argv[1] = ULONG2NUM(node->node_id);
4416
4417 // location
4418 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4419
4420 // flags
4421 argv[3] = ULONG2NUM(node->flags);
4422
4423 // opening_loc
4424#line 243 "prism/templates/ext/prism/api_node.c.erb"
4425 argv[4] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
4426
4427 // parts
4428#line 216 "prism/templates/ext/prism/api_node.c.erb"
4429 argv[5] = rb_ary_new_capa(cast->parts.size);
4430 for (size_t index = 0; index < cast->parts.size; index++) {
4431 rb_ary_push(argv[5], rb_ary_pop(value_stack));
4432 }
4433 if (freeze) rb_obj_freeze(argv[5]);
4434
4435 // closing_loc
4436#line 243 "prism/templates/ext/prism/api_node.c.erb"
4437 argv[6] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
4438
4439 VALUE value = rb_class_new_instance(7, argv, rb_cPrismInterpolatedSymbolNode);
4440 if (freeze) rb_obj_freeze(value);
4441
4442 rb_ary_push(value_stack, value);
4443 break;
4444 }
4445#line 190 "prism/templates/ext/prism/api_node.c.erb"
4446 case PM_INTERPOLATED_X_STRING_NODE: {
4447 pm_interpolated_x_string_node_t *cast = (pm_interpolated_x_string_node_t *) node;
4448 VALUE argv[7];
4449
4450 // source
4451 argv[0] = source;
4452
4453 // node_id
4454 argv[1] = ULONG2NUM(node->node_id);
4455
4456 // location
4457 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4458
4459 // flags
4460 argv[3] = ULONG2NUM(node->flags);
4461
4462 // opening_loc
4463#line 240 "prism/templates/ext/prism/api_node.c.erb"
4464 argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
4465
4466 // parts
4467#line 216 "prism/templates/ext/prism/api_node.c.erb"
4468 argv[5] = rb_ary_new_capa(cast->parts.size);
4469 for (size_t index = 0; index < cast->parts.size; index++) {
4470 rb_ary_push(argv[5], rb_ary_pop(value_stack));
4471 }
4472 if (freeze) rb_obj_freeze(argv[5]);
4473
4474 // closing_loc
4475#line 240 "prism/templates/ext/prism/api_node.c.erb"
4476 argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
4477
4478 VALUE value = rb_class_new_instance(7, argv, rb_cPrismInterpolatedXStringNode);
4479 if (freeze) rb_obj_freeze(value);
4480
4481 rb_ary_push(value_stack, value);
4482 break;
4483 }
4484#line 190 "prism/templates/ext/prism/api_node.c.erb"
4485 case PM_IT_LOCAL_VARIABLE_READ_NODE: {
4486 VALUE argv[4];
4487
4488 // source
4489 argv[0] = source;
4490
4491 // node_id
4492 argv[1] = ULONG2NUM(node->node_id);
4493
4494 // location
4495 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4496
4497 // flags
4498 argv[3] = ULONG2NUM(node->flags);
4499
4500 VALUE value = rb_class_new_instance(4, argv, rb_cPrismItLocalVariableReadNode);
4501 if (freeze) rb_obj_freeze(value);
4502
4503 rb_ary_push(value_stack, value);
4504 break;
4505 }
4506#line 190 "prism/templates/ext/prism/api_node.c.erb"
4507 case PM_IT_PARAMETERS_NODE: {
4508 VALUE argv[4];
4509
4510 // source
4511 argv[0] = source;
4512
4513 // node_id
4514 argv[1] = ULONG2NUM(node->node_id);
4515
4516 // location
4517 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4518
4519 // flags
4520 argv[3] = ULONG2NUM(node->flags);
4521
4522 VALUE value = rb_class_new_instance(4, argv, rb_cPrismItParametersNode);
4523 if (freeze) rb_obj_freeze(value);
4524
4525 rb_ary_push(value_stack, value);
4526 break;
4527 }
4528#line 190 "prism/templates/ext/prism/api_node.c.erb"
4529 case PM_KEYWORD_HASH_NODE: {
4530 pm_keyword_hash_node_t *cast = (pm_keyword_hash_node_t *) node;
4531 VALUE argv[5];
4532
4533 // source
4534 argv[0] = source;
4535
4536 // node_id
4537 argv[1] = ULONG2NUM(node->node_id);
4538
4539 // location
4540 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4541
4542 // flags
4543 argv[3] = ULONG2NUM(node->flags);
4544
4545 // elements
4546#line 216 "prism/templates/ext/prism/api_node.c.erb"
4547 argv[4] = rb_ary_new_capa(cast->elements.size);
4548 for (size_t index = 0; index < cast->elements.size; index++) {
4549 rb_ary_push(argv[4], rb_ary_pop(value_stack));
4550 }
4551 if (freeze) rb_obj_freeze(argv[4]);
4552
4553 VALUE value = rb_class_new_instance(5, argv, rb_cPrismKeywordHashNode);
4554 if (freeze) rb_obj_freeze(value);
4555
4556 rb_ary_push(value_stack, value);
4557 break;
4558 }
4559#line 190 "prism/templates/ext/prism/api_node.c.erb"
4560 case PM_KEYWORD_REST_PARAMETER_NODE: {
4561 pm_keyword_rest_parameter_node_t *cast = (pm_keyword_rest_parameter_node_t *) node;
4562 VALUE argv[7];
4563
4564 // source
4565 argv[0] = source;
4566
4567 // node_id
4568 argv[1] = ULONG2NUM(node->node_id);
4569
4570 // location
4571 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4572
4573 // flags
4574 argv[3] = ULONG2NUM(node->flags);
4575
4576 // name
4577 argv[4] = cast->name == 0 ? Qnil : RARRAY_AREF(constants, cast->name - 1);
4578
4579 // name_loc
4580#line 243 "prism/templates/ext/prism/api_node.c.erb"
4581 argv[5] = cast->name_loc.start == NULL ? Qnil : pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
4582
4583 // operator_loc
4584#line 240 "prism/templates/ext/prism/api_node.c.erb"
4585 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
4586
4587 VALUE value = rb_class_new_instance(7, argv, rb_cPrismKeywordRestParameterNode);
4588 if (freeze) rb_obj_freeze(value);
4589
4590 rb_ary_push(value_stack, value);
4591 break;
4592 }
4593#line 190 "prism/templates/ext/prism/api_node.c.erb"
4594 case PM_LAMBDA_NODE: {
4595 pm_lambda_node_t *cast = (pm_lambda_node_t *) node;
4596 VALUE argv[10];
4597
4598 // source
4599 argv[0] = source;
4600
4601 // node_id
4602 argv[1] = ULONG2NUM(node->node_id);
4603
4604 // location
4605 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4606
4607 // flags
4608 argv[3] = ULONG2NUM(node->flags);
4609
4610 // locals
4611#line 232 "prism/templates/ext/prism/api_node.c.erb"
4612 argv[4] = rb_ary_new_capa(cast->locals.size);
4613 for (size_t index = 0; index < cast->locals.size; index++) {
4614 assert(cast->locals.ids[index] != 0);
4615 rb_ary_push(argv[4], RARRAY_AREF(constants, cast->locals.ids[index] - 1));
4616 }
4617 if (freeze) rb_obj_freeze(argv[4]);
4618
4619 // operator_loc
4620#line 240 "prism/templates/ext/prism/api_node.c.erb"
4621 argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
4622
4623 // opening_loc
4624#line 240 "prism/templates/ext/prism/api_node.c.erb"
4625 argv[6] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
4626
4627 // closing_loc
4628#line 240 "prism/templates/ext/prism/api_node.c.erb"
4629 argv[7] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
4630
4631 // parameters
4632#line 213 "prism/templates/ext/prism/api_node.c.erb"
4633 argv[8] = rb_ary_pop(value_stack);
4634
4635 // body
4636#line 213 "prism/templates/ext/prism/api_node.c.erb"
4637 argv[9] = rb_ary_pop(value_stack);
4638
4639 VALUE value = rb_class_new_instance(10, argv, rb_cPrismLambdaNode);
4640 if (freeze) rb_obj_freeze(value);
4641
4642 rb_ary_push(value_stack, value);
4643 break;
4644 }
4645#line 190 "prism/templates/ext/prism/api_node.c.erb"
4646 case PM_LOCAL_VARIABLE_AND_WRITE_NODE: {
4647 pm_local_variable_and_write_node_t *cast = (pm_local_variable_and_write_node_t *) node;
4648 VALUE argv[9];
4649
4650 // source
4651 argv[0] = source;
4652
4653 // node_id
4654 argv[1] = ULONG2NUM(node->node_id);
4655
4656 // location
4657 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4658
4659 // flags
4660 argv[3] = ULONG2NUM(node->flags);
4661
4662 // name_loc
4663#line 240 "prism/templates/ext/prism/api_node.c.erb"
4664 argv[4] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
4665
4666 // operator_loc
4667#line 240 "prism/templates/ext/prism/api_node.c.erb"
4668 argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
4669
4670 // value
4671#line 213 "prism/templates/ext/prism/api_node.c.erb"
4672 argv[6] = rb_ary_pop(value_stack);
4673
4674 // name
4675#line 226 "prism/templates/ext/prism/api_node.c.erb"
4676 assert(cast->name != 0);
4677 argv[7] = RARRAY_AREF(constants, cast->name - 1);
4678
4679 // depth
4680#line 249 "prism/templates/ext/prism/api_node.c.erb"
4681 argv[8] = ULONG2NUM(cast->depth);
4682
4683 VALUE value = rb_class_new_instance(9, argv, rb_cPrismLocalVariableAndWriteNode);
4684 if (freeze) rb_obj_freeze(value);
4685
4686 rb_ary_push(value_stack, value);
4687 break;
4688 }
4689#line 190 "prism/templates/ext/prism/api_node.c.erb"
4690 case PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: {
4691 pm_local_variable_operator_write_node_t *cast = (pm_local_variable_operator_write_node_t *) node;
4692 VALUE argv[10];
4693
4694 // source
4695 argv[0] = source;
4696
4697 // node_id
4698 argv[1] = ULONG2NUM(node->node_id);
4699
4700 // location
4701 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4702
4703 // flags
4704 argv[3] = ULONG2NUM(node->flags);
4705
4706 // name_loc
4707#line 240 "prism/templates/ext/prism/api_node.c.erb"
4708 argv[4] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
4709
4710 // binary_operator_loc
4711#line 240 "prism/templates/ext/prism/api_node.c.erb"
4712 argv[5] = pm_location_new(parser, cast->binary_operator_loc.start, cast->binary_operator_loc.end, source, freeze);
4713
4714 // value
4715#line 213 "prism/templates/ext/prism/api_node.c.erb"
4716 argv[6] = rb_ary_pop(value_stack);
4717
4718 // name
4719#line 226 "prism/templates/ext/prism/api_node.c.erb"
4720 assert(cast->name != 0);
4721 argv[7] = RARRAY_AREF(constants, cast->name - 1);
4722
4723 // binary_operator
4724#line 226 "prism/templates/ext/prism/api_node.c.erb"
4725 assert(cast->binary_operator != 0);
4726 argv[8] = RARRAY_AREF(constants, cast->binary_operator - 1);
4727
4728 // depth
4729#line 249 "prism/templates/ext/prism/api_node.c.erb"
4730 argv[9] = ULONG2NUM(cast->depth);
4731
4732 VALUE value = rb_class_new_instance(10, argv, rb_cPrismLocalVariableOperatorWriteNode);
4733 if (freeze) rb_obj_freeze(value);
4734
4735 rb_ary_push(value_stack, value);
4736 break;
4737 }
4738#line 190 "prism/templates/ext/prism/api_node.c.erb"
4739 case PM_LOCAL_VARIABLE_OR_WRITE_NODE: {
4740 pm_local_variable_or_write_node_t *cast = (pm_local_variable_or_write_node_t *) node;
4741 VALUE argv[9];
4742
4743 // source
4744 argv[0] = source;
4745
4746 // node_id
4747 argv[1] = ULONG2NUM(node->node_id);
4748
4749 // location
4750 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4751
4752 // flags
4753 argv[3] = ULONG2NUM(node->flags);
4754
4755 // name_loc
4756#line 240 "prism/templates/ext/prism/api_node.c.erb"
4757 argv[4] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
4758
4759 // operator_loc
4760#line 240 "prism/templates/ext/prism/api_node.c.erb"
4761 argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
4762
4763 // value
4764#line 213 "prism/templates/ext/prism/api_node.c.erb"
4765 argv[6] = rb_ary_pop(value_stack);
4766
4767 // name
4768#line 226 "prism/templates/ext/prism/api_node.c.erb"
4769 assert(cast->name != 0);
4770 argv[7] = RARRAY_AREF(constants, cast->name - 1);
4771
4772 // depth
4773#line 249 "prism/templates/ext/prism/api_node.c.erb"
4774 argv[8] = ULONG2NUM(cast->depth);
4775
4776 VALUE value = rb_class_new_instance(9, argv, rb_cPrismLocalVariableOrWriteNode);
4777 if (freeze) rb_obj_freeze(value);
4778
4779 rb_ary_push(value_stack, value);
4780 break;
4781 }
4782#line 190 "prism/templates/ext/prism/api_node.c.erb"
4783 case PM_LOCAL_VARIABLE_READ_NODE: {
4784 pm_local_variable_read_node_t *cast = (pm_local_variable_read_node_t *) node;
4785 VALUE argv[6];
4786
4787 // source
4788 argv[0] = source;
4789
4790 // node_id
4791 argv[1] = ULONG2NUM(node->node_id);
4792
4793 // location
4794 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4795
4796 // flags
4797 argv[3] = ULONG2NUM(node->flags);
4798
4799 // name
4800#line 226 "prism/templates/ext/prism/api_node.c.erb"
4801 assert(cast->name != 0);
4802 argv[4] = RARRAY_AREF(constants, cast->name - 1);
4803
4804 // depth
4805#line 249 "prism/templates/ext/prism/api_node.c.erb"
4806 argv[5] = ULONG2NUM(cast->depth);
4807
4808 VALUE value = rb_class_new_instance(6, argv, rb_cPrismLocalVariableReadNode);
4809 if (freeze) rb_obj_freeze(value);
4810
4811 rb_ary_push(value_stack, value);
4812 break;
4813 }
4814#line 190 "prism/templates/ext/prism/api_node.c.erb"
4815 case PM_LOCAL_VARIABLE_TARGET_NODE: {
4816 pm_local_variable_target_node_t *cast = (pm_local_variable_target_node_t *) node;
4817 VALUE argv[6];
4818
4819 // source
4820 argv[0] = source;
4821
4822 // node_id
4823 argv[1] = ULONG2NUM(node->node_id);
4824
4825 // location
4826 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4827
4828 // flags
4829 argv[3] = ULONG2NUM(node->flags);
4830
4831 // name
4832#line 226 "prism/templates/ext/prism/api_node.c.erb"
4833 assert(cast->name != 0);
4834 argv[4] = RARRAY_AREF(constants, cast->name - 1);
4835
4836 // depth
4837#line 249 "prism/templates/ext/prism/api_node.c.erb"
4838 argv[5] = ULONG2NUM(cast->depth);
4839
4840 VALUE value = rb_class_new_instance(6, argv, rb_cPrismLocalVariableTargetNode);
4841 if (freeze) rb_obj_freeze(value);
4842
4843 rb_ary_push(value_stack, value);
4844 break;
4845 }
4846#line 190 "prism/templates/ext/prism/api_node.c.erb"
4847 case PM_LOCAL_VARIABLE_WRITE_NODE: {
4848 pm_local_variable_write_node_t *cast = (pm_local_variable_write_node_t *) node;
4849 VALUE argv[9];
4850
4851 // source
4852 argv[0] = source;
4853
4854 // node_id
4855 argv[1] = ULONG2NUM(node->node_id);
4856
4857 // location
4858 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4859
4860 // flags
4861 argv[3] = ULONG2NUM(node->flags);
4862
4863 // name
4864#line 226 "prism/templates/ext/prism/api_node.c.erb"
4865 assert(cast->name != 0);
4866 argv[4] = RARRAY_AREF(constants, cast->name - 1);
4867
4868 // depth
4869#line 249 "prism/templates/ext/prism/api_node.c.erb"
4870 argv[5] = ULONG2NUM(cast->depth);
4871
4872 // name_loc
4873#line 240 "prism/templates/ext/prism/api_node.c.erb"
4874 argv[6] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
4875
4876 // value
4877#line 213 "prism/templates/ext/prism/api_node.c.erb"
4878 argv[7] = rb_ary_pop(value_stack);
4879
4880 // operator_loc
4881#line 240 "prism/templates/ext/prism/api_node.c.erb"
4882 argv[8] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
4883
4884 VALUE value = rb_class_new_instance(9, argv, rb_cPrismLocalVariableWriteNode);
4885 if (freeze) rb_obj_freeze(value);
4886
4887 rb_ary_push(value_stack, value);
4888 break;
4889 }
4890#line 190 "prism/templates/ext/prism/api_node.c.erb"
4891 case PM_MATCH_LAST_LINE_NODE: {
4892 pm_match_last_line_node_t *cast = (pm_match_last_line_node_t *) node;
4893 VALUE argv[8];
4894
4895 // source
4896 argv[0] = source;
4897
4898 // node_id
4899 argv[1] = ULONG2NUM(node->node_id);
4900
4901 // location
4902 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4903
4904 // flags
4905 argv[3] = ULONG2NUM(node->flags);
4906
4907 // opening_loc
4908#line 240 "prism/templates/ext/prism/api_node.c.erb"
4909 argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
4910
4911 // content_loc
4912#line 240 "prism/templates/ext/prism/api_node.c.erb"
4913 argv[5] = pm_location_new(parser, cast->content_loc.start, cast->content_loc.end, source, freeze);
4914
4915 // closing_loc
4916#line 240 "prism/templates/ext/prism/api_node.c.erb"
4917 argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
4918
4919 // unescaped
4920#line 223 "prism/templates/ext/prism/api_node.c.erb"
4921 argv[7] = pm_string_new(&cast->unescaped, encoding);
4922
4923 VALUE value = rb_class_new_instance(8, argv, rb_cPrismMatchLastLineNode);
4924 if (freeze) rb_obj_freeze(value);
4925
4926 rb_ary_push(value_stack, value);
4927 break;
4928 }
4929#line 190 "prism/templates/ext/prism/api_node.c.erb"
4930 case PM_MATCH_PREDICATE_NODE: {
4931 pm_match_predicate_node_t *cast = (pm_match_predicate_node_t *) node;
4932 VALUE argv[7];
4933
4934 // source
4935 argv[0] = source;
4936
4937 // node_id
4938 argv[1] = ULONG2NUM(node->node_id);
4939
4940 // location
4941 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4942
4943 // flags
4944 argv[3] = ULONG2NUM(node->flags);
4945
4946 // value
4947#line 213 "prism/templates/ext/prism/api_node.c.erb"
4948 argv[4] = rb_ary_pop(value_stack);
4949
4950 // pattern
4951#line 213 "prism/templates/ext/prism/api_node.c.erb"
4952 argv[5] = rb_ary_pop(value_stack);
4953
4954 // operator_loc
4955#line 240 "prism/templates/ext/prism/api_node.c.erb"
4956 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
4957
4958 VALUE value = rb_class_new_instance(7, argv, rb_cPrismMatchPredicateNode);
4959 if (freeze) rb_obj_freeze(value);
4960
4961 rb_ary_push(value_stack, value);
4962 break;
4963 }
4964#line 190 "prism/templates/ext/prism/api_node.c.erb"
4965 case PM_MATCH_REQUIRED_NODE: {
4966 pm_match_required_node_t *cast = (pm_match_required_node_t *) node;
4967 VALUE argv[7];
4968
4969 // source
4970 argv[0] = source;
4971
4972 // node_id
4973 argv[1] = ULONG2NUM(node->node_id);
4974
4975 // location
4976 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
4977
4978 // flags
4979 argv[3] = ULONG2NUM(node->flags);
4980
4981 // value
4982#line 213 "prism/templates/ext/prism/api_node.c.erb"
4983 argv[4] = rb_ary_pop(value_stack);
4984
4985 // pattern
4986#line 213 "prism/templates/ext/prism/api_node.c.erb"
4987 argv[5] = rb_ary_pop(value_stack);
4988
4989 // operator_loc
4990#line 240 "prism/templates/ext/prism/api_node.c.erb"
4991 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
4992
4993 VALUE value = rb_class_new_instance(7, argv, rb_cPrismMatchRequiredNode);
4994 if (freeze) rb_obj_freeze(value);
4995
4996 rb_ary_push(value_stack, value);
4997 break;
4998 }
4999#line 190 "prism/templates/ext/prism/api_node.c.erb"
5000 case PM_MATCH_WRITE_NODE: {
5001 pm_match_write_node_t *cast = (pm_match_write_node_t *) node;
5002 VALUE argv[6];
5003
5004 // source
5005 argv[0] = source;
5006
5007 // node_id
5008 argv[1] = ULONG2NUM(node->node_id);
5009
5010 // location
5011 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5012
5013 // flags
5014 argv[3] = ULONG2NUM(node->flags);
5015
5016 // call
5017#line 213 "prism/templates/ext/prism/api_node.c.erb"
5018 argv[4] = rb_ary_pop(value_stack);
5019
5020 // targets
5021#line 216 "prism/templates/ext/prism/api_node.c.erb"
5022 argv[5] = rb_ary_new_capa(cast->targets.size);
5023 for (size_t index = 0; index < cast->targets.size; index++) {
5024 rb_ary_push(argv[5], rb_ary_pop(value_stack));
5025 }
5026 if (freeze) rb_obj_freeze(argv[5]);
5027
5028 VALUE value = rb_class_new_instance(6, argv, rb_cPrismMatchWriteNode);
5029 if (freeze) rb_obj_freeze(value);
5030
5031 rb_ary_push(value_stack, value);
5032 break;
5033 }
5034#line 190 "prism/templates/ext/prism/api_node.c.erb"
5035 case PM_MISSING_NODE: {
5036 VALUE argv[4];
5037
5038 // source
5039 argv[0] = source;
5040
5041 // node_id
5042 argv[1] = ULONG2NUM(node->node_id);
5043
5044 // location
5045 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5046
5047 // flags
5048 argv[3] = ULONG2NUM(node->flags);
5049
5050 VALUE value = rb_class_new_instance(4, argv, rb_cPrismMissingNode);
5051 if (freeze) rb_obj_freeze(value);
5052
5053 rb_ary_push(value_stack, value);
5054 break;
5055 }
5056#line 190 "prism/templates/ext/prism/api_node.c.erb"
5057 case PM_MODULE_NODE: {
5058 pm_module_node_t *cast = (pm_module_node_t *) node;
5059 VALUE argv[10];
5060
5061 // source
5062 argv[0] = source;
5063
5064 // node_id
5065 argv[1] = ULONG2NUM(node->node_id);
5066
5067 // location
5068 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5069
5070 // flags
5071 argv[3] = ULONG2NUM(node->flags);
5072
5073 // locals
5074#line 232 "prism/templates/ext/prism/api_node.c.erb"
5075 argv[4] = rb_ary_new_capa(cast->locals.size);
5076 for (size_t index = 0; index < cast->locals.size; index++) {
5077 assert(cast->locals.ids[index] != 0);
5078 rb_ary_push(argv[4], RARRAY_AREF(constants, cast->locals.ids[index] - 1));
5079 }
5080 if (freeze) rb_obj_freeze(argv[4]);
5081
5082 // module_keyword_loc
5083#line 240 "prism/templates/ext/prism/api_node.c.erb"
5084 argv[5] = pm_location_new(parser, cast->module_keyword_loc.start, cast->module_keyword_loc.end, source, freeze);
5085
5086 // constant_path
5087#line 213 "prism/templates/ext/prism/api_node.c.erb"
5088 argv[6] = rb_ary_pop(value_stack);
5089
5090 // body
5091#line 213 "prism/templates/ext/prism/api_node.c.erb"
5092 argv[7] = rb_ary_pop(value_stack);
5093
5094 // end_keyword_loc
5095#line 240 "prism/templates/ext/prism/api_node.c.erb"
5096 argv[8] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source, freeze);
5097
5098 // name
5099#line 226 "prism/templates/ext/prism/api_node.c.erb"
5100 assert(cast->name != 0);
5101 argv[9] = RARRAY_AREF(constants, cast->name - 1);
5102
5103 VALUE value = rb_class_new_instance(10, argv, rb_cPrismModuleNode);
5104 if (freeze) rb_obj_freeze(value);
5105
5106 rb_ary_push(value_stack, value);
5107 break;
5108 }
5109#line 190 "prism/templates/ext/prism/api_node.c.erb"
5110 case PM_MULTI_TARGET_NODE: {
5111 pm_multi_target_node_t *cast = (pm_multi_target_node_t *) node;
5112 VALUE argv[9];
5113
5114 // source
5115 argv[0] = source;
5116
5117 // node_id
5118 argv[1] = ULONG2NUM(node->node_id);
5119
5120 // location
5121 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5122
5123 // flags
5124 argv[3] = ULONG2NUM(node->flags);
5125
5126 // lefts
5127#line 216 "prism/templates/ext/prism/api_node.c.erb"
5128 argv[4] = rb_ary_new_capa(cast->lefts.size);
5129 for (size_t index = 0; index < cast->lefts.size; index++) {
5130 rb_ary_push(argv[4], rb_ary_pop(value_stack));
5131 }
5132 if (freeze) rb_obj_freeze(argv[4]);
5133
5134 // rest
5135#line 213 "prism/templates/ext/prism/api_node.c.erb"
5136 argv[5] = rb_ary_pop(value_stack);
5137
5138 // rights
5139#line 216 "prism/templates/ext/prism/api_node.c.erb"
5140 argv[6] = rb_ary_new_capa(cast->rights.size);
5141 for (size_t index = 0; index < cast->rights.size; index++) {
5142 rb_ary_push(argv[6], rb_ary_pop(value_stack));
5143 }
5144 if (freeze) rb_obj_freeze(argv[6]);
5145
5146 // lparen_loc
5147#line 243 "prism/templates/ext/prism/api_node.c.erb"
5148 argv[7] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source, freeze);
5149
5150 // rparen_loc
5151#line 243 "prism/templates/ext/prism/api_node.c.erb"
5152 argv[8] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source, freeze);
5153
5154 VALUE value = rb_class_new_instance(9, argv, rb_cPrismMultiTargetNode);
5155 if (freeze) rb_obj_freeze(value);
5156
5157 rb_ary_push(value_stack, value);
5158 break;
5159 }
5160#line 190 "prism/templates/ext/prism/api_node.c.erb"
5161 case PM_MULTI_WRITE_NODE: {
5162 pm_multi_write_node_t *cast = (pm_multi_write_node_t *) node;
5163 VALUE argv[11];
5164
5165 // source
5166 argv[0] = source;
5167
5168 // node_id
5169 argv[1] = ULONG2NUM(node->node_id);
5170
5171 // location
5172 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5173
5174 // flags
5175 argv[3] = ULONG2NUM(node->flags);
5176
5177 // lefts
5178#line 216 "prism/templates/ext/prism/api_node.c.erb"
5179 argv[4] = rb_ary_new_capa(cast->lefts.size);
5180 for (size_t index = 0; index < cast->lefts.size; index++) {
5181 rb_ary_push(argv[4], rb_ary_pop(value_stack));
5182 }
5183 if (freeze) rb_obj_freeze(argv[4]);
5184
5185 // rest
5186#line 213 "prism/templates/ext/prism/api_node.c.erb"
5187 argv[5] = rb_ary_pop(value_stack);
5188
5189 // rights
5190#line 216 "prism/templates/ext/prism/api_node.c.erb"
5191 argv[6] = rb_ary_new_capa(cast->rights.size);
5192 for (size_t index = 0; index < cast->rights.size; index++) {
5193 rb_ary_push(argv[6], rb_ary_pop(value_stack));
5194 }
5195 if (freeze) rb_obj_freeze(argv[6]);
5196
5197 // lparen_loc
5198#line 243 "prism/templates/ext/prism/api_node.c.erb"
5199 argv[7] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source, freeze);
5200
5201 // rparen_loc
5202#line 243 "prism/templates/ext/prism/api_node.c.erb"
5203 argv[8] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source, freeze);
5204
5205 // operator_loc
5206#line 240 "prism/templates/ext/prism/api_node.c.erb"
5207 argv[9] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
5208
5209 // value
5210#line 213 "prism/templates/ext/prism/api_node.c.erb"
5211 argv[10] = rb_ary_pop(value_stack);
5212
5213 VALUE value = rb_class_new_instance(11, argv, rb_cPrismMultiWriteNode);
5214 if (freeze) rb_obj_freeze(value);
5215
5216 rb_ary_push(value_stack, value);
5217 break;
5218 }
5219#line 190 "prism/templates/ext/prism/api_node.c.erb"
5220 case PM_NEXT_NODE: {
5221 pm_next_node_t *cast = (pm_next_node_t *) node;
5222 VALUE argv[6];
5223
5224 // source
5225 argv[0] = source;
5226
5227 // node_id
5228 argv[1] = ULONG2NUM(node->node_id);
5229
5230 // location
5231 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5232
5233 // flags
5234 argv[3] = ULONG2NUM(node->flags);
5235
5236 // arguments
5237#line 213 "prism/templates/ext/prism/api_node.c.erb"
5238 argv[4] = rb_ary_pop(value_stack);
5239
5240 // keyword_loc
5241#line 240 "prism/templates/ext/prism/api_node.c.erb"
5242 argv[5] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
5243
5244 VALUE value = rb_class_new_instance(6, argv, rb_cPrismNextNode);
5245 if (freeze) rb_obj_freeze(value);
5246
5247 rb_ary_push(value_stack, value);
5248 break;
5249 }
5250#line 190 "prism/templates/ext/prism/api_node.c.erb"
5251 case PM_NIL_NODE: {
5252 VALUE argv[4];
5253
5254 // source
5255 argv[0] = source;
5256
5257 // node_id
5258 argv[1] = ULONG2NUM(node->node_id);
5259
5260 // location
5261 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5262
5263 // flags
5264 argv[3] = ULONG2NUM(node->flags);
5265
5266 VALUE value = rb_class_new_instance(4, argv, rb_cPrismNilNode);
5267 if (freeze) rb_obj_freeze(value);
5268
5269 rb_ary_push(value_stack, value);
5270 break;
5271 }
5272#line 190 "prism/templates/ext/prism/api_node.c.erb"
5273 case PM_NO_KEYWORDS_PARAMETER_NODE: {
5274 pm_no_keywords_parameter_node_t *cast = (pm_no_keywords_parameter_node_t *) node;
5275 VALUE argv[6];
5276
5277 // source
5278 argv[0] = source;
5279
5280 // node_id
5281 argv[1] = ULONG2NUM(node->node_id);
5282
5283 // location
5284 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5285
5286 // flags
5287 argv[3] = ULONG2NUM(node->flags);
5288
5289 // operator_loc
5290#line 240 "prism/templates/ext/prism/api_node.c.erb"
5291 argv[4] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
5292
5293 // keyword_loc
5294#line 240 "prism/templates/ext/prism/api_node.c.erb"
5295 argv[5] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
5296
5297 VALUE value = rb_class_new_instance(6, argv, rb_cPrismNoKeywordsParameterNode);
5298 if (freeze) rb_obj_freeze(value);
5299
5300 rb_ary_push(value_stack, value);
5301 break;
5302 }
5303#line 190 "prism/templates/ext/prism/api_node.c.erb"
5304 case PM_NUMBERED_PARAMETERS_NODE: {
5305 pm_numbered_parameters_node_t *cast = (pm_numbered_parameters_node_t *) node;
5306 VALUE argv[5];
5307
5308 // source
5309 argv[0] = source;
5310
5311 // node_id
5312 argv[1] = ULONG2NUM(node->node_id);
5313
5314 // location
5315 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5316
5317 // flags
5318 argv[3] = ULONG2NUM(node->flags);
5319
5320 // maximum
5321#line 246 "prism/templates/ext/prism/api_node.c.erb"
5322 argv[4] = UINT2NUM(cast->maximum);
5323
5324 VALUE value = rb_class_new_instance(5, argv, rb_cPrismNumberedParametersNode);
5325 if (freeze) rb_obj_freeze(value);
5326
5327 rb_ary_push(value_stack, value);
5328 break;
5329 }
5330#line 190 "prism/templates/ext/prism/api_node.c.erb"
5331 case PM_NUMBERED_REFERENCE_READ_NODE: {
5332 pm_numbered_reference_read_node_t *cast = (pm_numbered_reference_read_node_t *) node;
5333 VALUE argv[5];
5334
5335 // source
5336 argv[0] = source;
5337
5338 // node_id
5339 argv[1] = ULONG2NUM(node->node_id);
5340
5341 // location
5342 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5343
5344 // flags
5345 argv[3] = ULONG2NUM(node->flags);
5346
5347 // number
5348#line 249 "prism/templates/ext/prism/api_node.c.erb"
5349 argv[4] = ULONG2NUM(cast->number);
5350
5351 VALUE value = rb_class_new_instance(5, argv, rb_cPrismNumberedReferenceReadNode);
5352 if (freeze) rb_obj_freeze(value);
5353
5354 rb_ary_push(value_stack, value);
5355 break;
5356 }
5357#line 190 "prism/templates/ext/prism/api_node.c.erb"
5358 case PM_OPTIONAL_KEYWORD_PARAMETER_NODE: {
5359 pm_optional_keyword_parameter_node_t *cast = (pm_optional_keyword_parameter_node_t *) node;
5360 VALUE argv[7];
5361
5362 // source
5363 argv[0] = source;
5364
5365 // node_id
5366 argv[1] = ULONG2NUM(node->node_id);
5367
5368 // location
5369 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5370
5371 // flags
5372 argv[3] = ULONG2NUM(node->flags);
5373
5374 // name
5375#line 226 "prism/templates/ext/prism/api_node.c.erb"
5376 assert(cast->name != 0);
5377 argv[4] = RARRAY_AREF(constants, cast->name - 1);
5378
5379 // name_loc
5380#line 240 "prism/templates/ext/prism/api_node.c.erb"
5381 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
5382
5383 // value
5384#line 213 "prism/templates/ext/prism/api_node.c.erb"
5385 argv[6] = rb_ary_pop(value_stack);
5386
5387 VALUE value = rb_class_new_instance(7, argv, rb_cPrismOptionalKeywordParameterNode);
5388 if (freeze) rb_obj_freeze(value);
5389
5390 rb_ary_push(value_stack, value);
5391 break;
5392 }
5393#line 190 "prism/templates/ext/prism/api_node.c.erb"
5394 case PM_OPTIONAL_PARAMETER_NODE: {
5395 pm_optional_parameter_node_t *cast = (pm_optional_parameter_node_t *) node;
5396 VALUE argv[8];
5397
5398 // source
5399 argv[0] = source;
5400
5401 // node_id
5402 argv[1] = ULONG2NUM(node->node_id);
5403
5404 // location
5405 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5406
5407 // flags
5408 argv[3] = ULONG2NUM(node->flags);
5409
5410 // name
5411#line 226 "prism/templates/ext/prism/api_node.c.erb"
5412 assert(cast->name != 0);
5413 argv[4] = RARRAY_AREF(constants, cast->name - 1);
5414
5415 // name_loc
5416#line 240 "prism/templates/ext/prism/api_node.c.erb"
5417 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
5418
5419 // operator_loc
5420#line 240 "prism/templates/ext/prism/api_node.c.erb"
5421 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
5422
5423 // value
5424#line 213 "prism/templates/ext/prism/api_node.c.erb"
5425 argv[7] = rb_ary_pop(value_stack);
5426
5427 VALUE value = rb_class_new_instance(8, argv, rb_cPrismOptionalParameterNode);
5428 if (freeze) rb_obj_freeze(value);
5429
5430 rb_ary_push(value_stack, value);
5431 break;
5432 }
5433#line 190 "prism/templates/ext/prism/api_node.c.erb"
5434 case PM_OR_NODE: {
5435 pm_or_node_t *cast = (pm_or_node_t *) node;
5436 VALUE argv[7];
5437
5438 // source
5439 argv[0] = source;
5440
5441 // node_id
5442 argv[1] = ULONG2NUM(node->node_id);
5443
5444 // location
5445 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5446
5447 // flags
5448 argv[3] = ULONG2NUM(node->flags);
5449
5450 // left
5451#line 213 "prism/templates/ext/prism/api_node.c.erb"
5452 argv[4] = rb_ary_pop(value_stack);
5453
5454 // right
5455#line 213 "prism/templates/ext/prism/api_node.c.erb"
5456 argv[5] = rb_ary_pop(value_stack);
5457
5458 // operator_loc
5459#line 240 "prism/templates/ext/prism/api_node.c.erb"
5460 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
5461
5462 VALUE value = rb_class_new_instance(7, argv, rb_cPrismOrNode);
5463 if (freeze) rb_obj_freeze(value);
5464
5465 rb_ary_push(value_stack, value);
5466 break;
5467 }
5468#line 190 "prism/templates/ext/prism/api_node.c.erb"
5469 case PM_PARAMETERS_NODE: {
5470 pm_parameters_node_t *cast = (pm_parameters_node_t *) node;
5471 VALUE argv[11];
5472
5473 // source
5474 argv[0] = source;
5475
5476 // node_id
5477 argv[1] = ULONG2NUM(node->node_id);
5478
5479 // location
5480 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5481
5482 // flags
5483 argv[3] = ULONG2NUM(node->flags);
5484
5485 // requireds
5486#line 216 "prism/templates/ext/prism/api_node.c.erb"
5487 argv[4] = rb_ary_new_capa(cast->requireds.size);
5488 for (size_t index = 0; index < cast->requireds.size; index++) {
5489 rb_ary_push(argv[4], rb_ary_pop(value_stack));
5490 }
5491 if (freeze) rb_obj_freeze(argv[4]);
5492
5493 // optionals
5494#line 216 "prism/templates/ext/prism/api_node.c.erb"
5495 argv[5] = rb_ary_new_capa(cast->optionals.size);
5496 for (size_t index = 0; index < cast->optionals.size; index++) {
5497 rb_ary_push(argv[5], rb_ary_pop(value_stack));
5498 }
5499 if (freeze) rb_obj_freeze(argv[5]);
5500
5501 // rest
5502#line 213 "prism/templates/ext/prism/api_node.c.erb"
5503 argv[6] = rb_ary_pop(value_stack);
5504
5505 // posts
5506#line 216 "prism/templates/ext/prism/api_node.c.erb"
5507 argv[7] = rb_ary_new_capa(cast->posts.size);
5508 for (size_t index = 0; index < cast->posts.size; index++) {
5509 rb_ary_push(argv[7], rb_ary_pop(value_stack));
5510 }
5511 if (freeze) rb_obj_freeze(argv[7]);
5512
5513 // keywords
5514#line 216 "prism/templates/ext/prism/api_node.c.erb"
5515 argv[8] = rb_ary_new_capa(cast->keywords.size);
5516 for (size_t index = 0; index < cast->keywords.size; index++) {
5517 rb_ary_push(argv[8], rb_ary_pop(value_stack));
5518 }
5519 if (freeze) rb_obj_freeze(argv[8]);
5520
5521 // keyword_rest
5522#line 213 "prism/templates/ext/prism/api_node.c.erb"
5523 argv[9] = rb_ary_pop(value_stack);
5524
5525 // block
5526#line 213 "prism/templates/ext/prism/api_node.c.erb"
5527 argv[10] = rb_ary_pop(value_stack);
5528
5529 VALUE value = rb_class_new_instance(11, argv, rb_cPrismParametersNode);
5530 if (freeze) rb_obj_freeze(value);
5531
5532 rb_ary_push(value_stack, value);
5533 break;
5534 }
5535#line 190 "prism/templates/ext/prism/api_node.c.erb"
5536 case PM_PARENTHESES_NODE: {
5537 pm_parentheses_node_t *cast = (pm_parentheses_node_t *) node;
5538 VALUE argv[7];
5539
5540 // source
5541 argv[0] = source;
5542
5543 // node_id
5544 argv[1] = ULONG2NUM(node->node_id);
5545
5546 // location
5547 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5548
5549 // flags
5550 argv[3] = ULONG2NUM(node->flags);
5551
5552 // body
5553#line 213 "prism/templates/ext/prism/api_node.c.erb"
5554 argv[4] = rb_ary_pop(value_stack);
5555
5556 // opening_loc
5557#line 240 "prism/templates/ext/prism/api_node.c.erb"
5558 argv[5] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
5559
5560 // closing_loc
5561#line 240 "prism/templates/ext/prism/api_node.c.erb"
5562 argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
5563
5564 VALUE value = rb_class_new_instance(7, argv, rb_cPrismParenthesesNode);
5565 if (freeze) rb_obj_freeze(value);
5566
5567 rb_ary_push(value_stack, value);
5568 break;
5569 }
5570#line 190 "prism/templates/ext/prism/api_node.c.erb"
5571 case PM_PINNED_EXPRESSION_NODE: {
5572 pm_pinned_expression_node_t *cast = (pm_pinned_expression_node_t *) node;
5573 VALUE argv[8];
5574
5575 // source
5576 argv[0] = source;
5577
5578 // node_id
5579 argv[1] = ULONG2NUM(node->node_id);
5580
5581 // location
5582 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5583
5584 // flags
5585 argv[3] = ULONG2NUM(node->flags);
5586
5587 // expression
5588#line 213 "prism/templates/ext/prism/api_node.c.erb"
5589 argv[4] = rb_ary_pop(value_stack);
5590
5591 // operator_loc
5592#line 240 "prism/templates/ext/prism/api_node.c.erb"
5593 argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
5594
5595 // lparen_loc
5596#line 240 "prism/templates/ext/prism/api_node.c.erb"
5597 argv[6] = pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source, freeze);
5598
5599 // rparen_loc
5600#line 240 "prism/templates/ext/prism/api_node.c.erb"
5601 argv[7] = pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source, freeze);
5602
5603 VALUE value = rb_class_new_instance(8, argv, rb_cPrismPinnedExpressionNode);
5604 if (freeze) rb_obj_freeze(value);
5605
5606 rb_ary_push(value_stack, value);
5607 break;
5608 }
5609#line 190 "prism/templates/ext/prism/api_node.c.erb"
5610 case PM_PINNED_VARIABLE_NODE: {
5611 pm_pinned_variable_node_t *cast = (pm_pinned_variable_node_t *) node;
5612 VALUE argv[6];
5613
5614 // source
5615 argv[0] = source;
5616
5617 // node_id
5618 argv[1] = ULONG2NUM(node->node_id);
5619
5620 // location
5621 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5622
5623 // flags
5624 argv[3] = ULONG2NUM(node->flags);
5625
5626 // variable
5627#line 213 "prism/templates/ext/prism/api_node.c.erb"
5628 argv[4] = rb_ary_pop(value_stack);
5629
5630 // operator_loc
5631#line 240 "prism/templates/ext/prism/api_node.c.erb"
5632 argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
5633
5634 VALUE value = rb_class_new_instance(6, argv, rb_cPrismPinnedVariableNode);
5635 if (freeze) rb_obj_freeze(value);
5636
5637 rb_ary_push(value_stack, value);
5638 break;
5639 }
5640#line 190 "prism/templates/ext/prism/api_node.c.erb"
5641 case PM_POST_EXECUTION_NODE: {
5642 pm_post_execution_node_t *cast = (pm_post_execution_node_t *) node;
5643 VALUE argv[8];
5644
5645 // source
5646 argv[0] = source;
5647
5648 // node_id
5649 argv[1] = ULONG2NUM(node->node_id);
5650
5651 // location
5652 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5653
5654 // flags
5655 argv[3] = ULONG2NUM(node->flags);
5656
5657 // statements
5658#line 213 "prism/templates/ext/prism/api_node.c.erb"
5659 argv[4] = rb_ary_pop(value_stack);
5660
5661 // keyword_loc
5662#line 240 "prism/templates/ext/prism/api_node.c.erb"
5663 argv[5] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
5664
5665 // opening_loc
5666#line 240 "prism/templates/ext/prism/api_node.c.erb"
5667 argv[6] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
5668
5669 // closing_loc
5670#line 240 "prism/templates/ext/prism/api_node.c.erb"
5671 argv[7] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
5672
5673 VALUE value = rb_class_new_instance(8, argv, rb_cPrismPostExecutionNode);
5674 if (freeze) rb_obj_freeze(value);
5675
5676 rb_ary_push(value_stack, value);
5677 break;
5678 }
5679#line 190 "prism/templates/ext/prism/api_node.c.erb"
5680 case PM_PRE_EXECUTION_NODE: {
5681 pm_pre_execution_node_t *cast = (pm_pre_execution_node_t *) node;
5682 VALUE argv[8];
5683
5684 // source
5685 argv[0] = source;
5686
5687 // node_id
5688 argv[1] = ULONG2NUM(node->node_id);
5689
5690 // location
5691 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5692
5693 // flags
5694 argv[3] = ULONG2NUM(node->flags);
5695
5696 // statements
5697#line 213 "prism/templates/ext/prism/api_node.c.erb"
5698 argv[4] = rb_ary_pop(value_stack);
5699
5700 // keyword_loc
5701#line 240 "prism/templates/ext/prism/api_node.c.erb"
5702 argv[5] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
5703
5704 // opening_loc
5705#line 240 "prism/templates/ext/prism/api_node.c.erb"
5706 argv[6] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
5707
5708 // closing_loc
5709#line 240 "prism/templates/ext/prism/api_node.c.erb"
5710 argv[7] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
5711
5712 VALUE value = rb_class_new_instance(8, argv, rb_cPrismPreExecutionNode);
5713 if (freeze) rb_obj_freeze(value);
5714
5715 rb_ary_push(value_stack, value);
5716 break;
5717 }
5718#line 190 "prism/templates/ext/prism/api_node.c.erb"
5719 case PM_PROGRAM_NODE: {
5720 pm_program_node_t *cast = (pm_program_node_t *) node;
5721 VALUE argv[6];
5722
5723 // source
5724 argv[0] = source;
5725
5726 // node_id
5727 argv[1] = ULONG2NUM(node->node_id);
5728
5729 // location
5730 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5731
5732 // flags
5733 argv[3] = ULONG2NUM(node->flags);
5734
5735 // locals
5736#line 232 "prism/templates/ext/prism/api_node.c.erb"
5737 argv[4] = rb_ary_new_capa(cast->locals.size);
5738 for (size_t index = 0; index < cast->locals.size; index++) {
5739 assert(cast->locals.ids[index] != 0);
5740 rb_ary_push(argv[4], RARRAY_AREF(constants, cast->locals.ids[index] - 1));
5741 }
5742 if (freeze) rb_obj_freeze(argv[4]);
5743
5744 // statements
5745#line 213 "prism/templates/ext/prism/api_node.c.erb"
5746 argv[5] = rb_ary_pop(value_stack);
5747
5748 VALUE value = rb_class_new_instance(6, argv, rb_cPrismProgramNode);
5749 if (freeze) rb_obj_freeze(value);
5750
5751 rb_ary_push(value_stack, value);
5752 break;
5753 }
5754#line 190 "prism/templates/ext/prism/api_node.c.erb"
5755 case PM_RANGE_NODE: {
5756 pm_range_node_t *cast = (pm_range_node_t *) node;
5757 VALUE argv[7];
5758
5759 // source
5760 argv[0] = source;
5761
5762 // node_id
5763 argv[1] = ULONG2NUM(node->node_id);
5764
5765 // location
5766 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5767
5768 // flags
5769 argv[3] = ULONG2NUM(node->flags);
5770
5771 // left
5772#line 213 "prism/templates/ext/prism/api_node.c.erb"
5773 argv[4] = rb_ary_pop(value_stack);
5774
5775 // right
5776#line 213 "prism/templates/ext/prism/api_node.c.erb"
5777 argv[5] = rb_ary_pop(value_stack);
5778
5779 // operator_loc
5780#line 240 "prism/templates/ext/prism/api_node.c.erb"
5781 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
5782
5783 VALUE value = rb_class_new_instance(7, argv, rb_cPrismRangeNode);
5784 if (freeze) rb_obj_freeze(value);
5785
5786 rb_ary_push(value_stack, value);
5787 break;
5788 }
5789#line 190 "prism/templates/ext/prism/api_node.c.erb"
5790 case PM_RATIONAL_NODE: {
5791 pm_rational_node_t *cast = (pm_rational_node_t *) node;
5792 VALUE argv[6];
5793
5794 // source
5795 argv[0] = source;
5796
5797 // node_id
5798 argv[1] = ULONG2NUM(node->node_id);
5799
5800 // location
5801 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5802
5803 // flags
5804 argv[3] = ULONG2NUM(node->flags);
5805
5806 // numerator
5807#line 252 "prism/templates/ext/prism/api_node.c.erb"
5808 argv[4] = pm_integer_new(&cast->numerator);
5809
5810 // denominator
5811#line 252 "prism/templates/ext/prism/api_node.c.erb"
5812 argv[5] = pm_integer_new(&cast->denominator);
5813
5814 VALUE value = rb_class_new_instance(6, argv, rb_cPrismRationalNode);
5815 if (freeze) rb_obj_freeze(value);
5816
5817 rb_ary_push(value_stack, value);
5818 break;
5819 }
5820#line 190 "prism/templates/ext/prism/api_node.c.erb"
5821 case PM_REDO_NODE: {
5822 VALUE argv[4];
5823
5824 // source
5825 argv[0] = source;
5826
5827 // node_id
5828 argv[1] = ULONG2NUM(node->node_id);
5829
5830 // location
5831 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5832
5833 // flags
5834 argv[3] = ULONG2NUM(node->flags);
5835
5836 VALUE value = rb_class_new_instance(4, argv, rb_cPrismRedoNode);
5837 if (freeze) rb_obj_freeze(value);
5838
5839 rb_ary_push(value_stack, value);
5840 break;
5841 }
5842#line 190 "prism/templates/ext/prism/api_node.c.erb"
5843 case PM_REGULAR_EXPRESSION_NODE: {
5844 pm_regular_expression_node_t *cast = (pm_regular_expression_node_t *) node;
5845 VALUE argv[8];
5846
5847 // source
5848 argv[0] = source;
5849
5850 // node_id
5851 argv[1] = ULONG2NUM(node->node_id);
5852
5853 // location
5854 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5855
5856 // flags
5857 argv[3] = ULONG2NUM(node->flags);
5858
5859 // opening_loc
5860#line 240 "prism/templates/ext/prism/api_node.c.erb"
5861 argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
5862
5863 // content_loc
5864#line 240 "prism/templates/ext/prism/api_node.c.erb"
5865 argv[5] = pm_location_new(parser, cast->content_loc.start, cast->content_loc.end, source, freeze);
5866
5867 // closing_loc
5868#line 240 "prism/templates/ext/prism/api_node.c.erb"
5869 argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
5870
5871 // unescaped
5872#line 223 "prism/templates/ext/prism/api_node.c.erb"
5873 argv[7] = pm_string_new(&cast->unescaped, encoding);
5874
5875 VALUE value = rb_class_new_instance(8, argv, rb_cPrismRegularExpressionNode);
5876 if (freeze) rb_obj_freeze(value);
5877
5878 rb_ary_push(value_stack, value);
5879 break;
5880 }
5881#line 190 "prism/templates/ext/prism/api_node.c.erb"
5882 case PM_REQUIRED_KEYWORD_PARAMETER_NODE: {
5883 pm_required_keyword_parameter_node_t *cast = (pm_required_keyword_parameter_node_t *) node;
5884 VALUE argv[6];
5885
5886 // source
5887 argv[0] = source;
5888
5889 // node_id
5890 argv[1] = ULONG2NUM(node->node_id);
5891
5892 // location
5893 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5894
5895 // flags
5896 argv[3] = ULONG2NUM(node->flags);
5897
5898 // name
5899#line 226 "prism/templates/ext/prism/api_node.c.erb"
5900 assert(cast->name != 0);
5901 argv[4] = RARRAY_AREF(constants, cast->name - 1);
5902
5903 // name_loc
5904#line 240 "prism/templates/ext/prism/api_node.c.erb"
5905 argv[5] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
5906
5907 VALUE value = rb_class_new_instance(6, argv, rb_cPrismRequiredKeywordParameterNode);
5908 if (freeze) rb_obj_freeze(value);
5909
5910 rb_ary_push(value_stack, value);
5911 break;
5912 }
5913#line 190 "prism/templates/ext/prism/api_node.c.erb"
5914 case PM_REQUIRED_PARAMETER_NODE: {
5915 pm_required_parameter_node_t *cast = (pm_required_parameter_node_t *) node;
5916 VALUE argv[5];
5917
5918 // source
5919 argv[0] = source;
5920
5921 // node_id
5922 argv[1] = ULONG2NUM(node->node_id);
5923
5924 // location
5925 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5926
5927 // flags
5928 argv[3] = ULONG2NUM(node->flags);
5929
5930 // name
5931#line 226 "prism/templates/ext/prism/api_node.c.erb"
5932 assert(cast->name != 0);
5933 argv[4] = RARRAY_AREF(constants, cast->name - 1);
5934
5935 VALUE value = rb_class_new_instance(5, argv, rb_cPrismRequiredParameterNode);
5936 if (freeze) rb_obj_freeze(value);
5937
5938 rb_ary_push(value_stack, value);
5939 break;
5940 }
5941#line 190 "prism/templates/ext/prism/api_node.c.erb"
5942 case PM_RESCUE_MODIFIER_NODE: {
5943 pm_rescue_modifier_node_t *cast = (pm_rescue_modifier_node_t *) node;
5944 VALUE argv[7];
5945
5946 // source
5947 argv[0] = source;
5948
5949 // node_id
5950 argv[1] = ULONG2NUM(node->node_id);
5951
5952 // location
5953 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5954
5955 // flags
5956 argv[3] = ULONG2NUM(node->flags);
5957
5958 // expression
5959#line 213 "prism/templates/ext/prism/api_node.c.erb"
5960 argv[4] = rb_ary_pop(value_stack);
5961
5962 // keyword_loc
5963#line 240 "prism/templates/ext/prism/api_node.c.erb"
5964 argv[5] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
5965
5966 // rescue_expression
5967#line 213 "prism/templates/ext/prism/api_node.c.erb"
5968 argv[6] = rb_ary_pop(value_stack);
5969
5970 VALUE value = rb_class_new_instance(7, argv, rb_cPrismRescueModifierNode);
5971 if (freeze) rb_obj_freeze(value);
5972
5973 rb_ary_push(value_stack, value);
5974 break;
5975 }
5976#line 190 "prism/templates/ext/prism/api_node.c.erb"
5977 case PM_RESCUE_NODE: {
5978 pm_rescue_node_t *cast = (pm_rescue_node_t *) node;
5979 VALUE argv[11];
5980
5981 // source
5982 argv[0] = source;
5983
5984 // node_id
5985 argv[1] = ULONG2NUM(node->node_id);
5986
5987 // location
5988 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
5989
5990 // flags
5991 argv[3] = ULONG2NUM(node->flags);
5992
5993 // keyword_loc
5994#line 240 "prism/templates/ext/prism/api_node.c.erb"
5995 argv[4] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
5996
5997 // exceptions
5998#line 216 "prism/templates/ext/prism/api_node.c.erb"
5999 argv[5] = rb_ary_new_capa(cast->exceptions.size);
6000 for (size_t index = 0; index < cast->exceptions.size; index++) {
6001 rb_ary_push(argv[5], rb_ary_pop(value_stack));
6002 }
6003 if (freeze) rb_obj_freeze(argv[5]);
6004
6005 // operator_loc
6006#line 243 "prism/templates/ext/prism/api_node.c.erb"
6007 argv[6] = cast->operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
6008
6009 // reference
6010#line 213 "prism/templates/ext/prism/api_node.c.erb"
6011 argv[7] = rb_ary_pop(value_stack);
6012
6013 // then_keyword_loc
6014#line 243 "prism/templates/ext/prism/api_node.c.erb"
6015 argv[8] = cast->then_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->then_keyword_loc.start, cast->then_keyword_loc.end, source, freeze);
6016
6017 // statements
6018#line 213 "prism/templates/ext/prism/api_node.c.erb"
6019 argv[9] = rb_ary_pop(value_stack);
6020
6021 // subsequent
6022#line 213 "prism/templates/ext/prism/api_node.c.erb"
6023 argv[10] = rb_ary_pop(value_stack);
6024
6025 VALUE value = rb_class_new_instance(11, argv, rb_cPrismRescueNode);
6026 if (freeze) rb_obj_freeze(value);
6027
6028 rb_ary_push(value_stack, value);
6029 break;
6030 }
6031#line 190 "prism/templates/ext/prism/api_node.c.erb"
6032 case PM_REST_PARAMETER_NODE: {
6033 pm_rest_parameter_node_t *cast = (pm_rest_parameter_node_t *) node;
6034 VALUE argv[7];
6035
6036 // source
6037 argv[0] = source;
6038
6039 // node_id
6040 argv[1] = ULONG2NUM(node->node_id);
6041
6042 // location
6043 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6044
6045 // flags
6046 argv[3] = ULONG2NUM(node->flags);
6047
6048 // name
6049 argv[4] = cast->name == 0 ? Qnil : RARRAY_AREF(constants, cast->name - 1);
6050
6051 // name_loc
6052#line 243 "prism/templates/ext/prism/api_node.c.erb"
6053 argv[5] = cast->name_loc.start == NULL ? Qnil : pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source, freeze);
6054
6055 // operator_loc
6056#line 240 "prism/templates/ext/prism/api_node.c.erb"
6057 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
6058
6059 VALUE value = rb_class_new_instance(7, argv, rb_cPrismRestParameterNode);
6060 if (freeze) rb_obj_freeze(value);
6061
6062 rb_ary_push(value_stack, value);
6063 break;
6064 }
6065#line 190 "prism/templates/ext/prism/api_node.c.erb"
6066 case PM_RETRY_NODE: {
6067 VALUE argv[4];
6068
6069 // source
6070 argv[0] = source;
6071
6072 // node_id
6073 argv[1] = ULONG2NUM(node->node_id);
6074
6075 // location
6076 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6077
6078 // flags
6079 argv[3] = ULONG2NUM(node->flags);
6080
6081 VALUE value = rb_class_new_instance(4, argv, rb_cPrismRetryNode);
6082 if (freeze) rb_obj_freeze(value);
6083
6084 rb_ary_push(value_stack, value);
6085 break;
6086 }
6087#line 190 "prism/templates/ext/prism/api_node.c.erb"
6088 case PM_RETURN_NODE: {
6089 pm_return_node_t *cast = (pm_return_node_t *) node;
6090 VALUE argv[6];
6091
6092 // source
6093 argv[0] = source;
6094
6095 // node_id
6096 argv[1] = ULONG2NUM(node->node_id);
6097
6098 // location
6099 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6100
6101 // flags
6102 argv[3] = ULONG2NUM(node->flags);
6103
6104 // keyword_loc
6105#line 240 "prism/templates/ext/prism/api_node.c.erb"
6106 argv[4] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
6107
6108 // arguments
6109#line 213 "prism/templates/ext/prism/api_node.c.erb"
6110 argv[5] = rb_ary_pop(value_stack);
6111
6112 VALUE value = rb_class_new_instance(6, argv, rb_cPrismReturnNode);
6113 if (freeze) rb_obj_freeze(value);
6114
6115 rb_ary_push(value_stack, value);
6116 break;
6117 }
6118#line 190 "prism/templates/ext/prism/api_node.c.erb"
6119 case PM_SELF_NODE: {
6120 VALUE argv[4];
6121
6122 // source
6123 argv[0] = source;
6124
6125 // node_id
6126 argv[1] = ULONG2NUM(node->node_id);
6127
6128 // location
6129 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6130
6131 // flags
6132 argv[3] = ULONG2NUM(node->flags);
6133
6134 VALUE value = rb_class_new_instance(4, argv, rb_cPrismSelfNode);
6135 if (freeze) rb_obj_freeze(value);
6136
6137 rb_ary_push(value_stack, value);
6138 break;
6139 }
6140#line 190 "prism/templates/ext/prism/api_node.c.erb"
6141 case PM_SHAREABLE_CONSTANT_NODE: {
6142 VALUE argv[5];
6143
6144 // source
6145 argv[0] = source;
6146
6147 // node_id
6148 argv[1] = ULONG2NUM(node->node_id);
6149
6150 // location
6151 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6152
6153 // flags
6154 argv[3] = ULONG2NUM(node->flags);
6155
6156 // write
6157#line 213 "prism/templates/ext/prism/api_node.c.erb"
6158 argv[4] = rb_ary_pop(value_stack);
6159
6160 VALUE value = rb_class_new_instance(5, argv, rb_cPrismShareableConstantNode);
6161 if (freeze) rb_obj_freeze(value);
6162
6163 rb_ary_push(value_stack, value);
6164 break;
6165 }
6166#line 190 "prism/templates/ext/prism/api_node.c.erb"
6167 case PM_SINGLETON_CLASS_NODE: {
6168 pm_singleton_class_node_t *cast = (pm_singleton_class_node_t *) node;
6169 VALUE argv[10];
6170
6171 // source
6172 argv[0] = source;
6173
6174 // node_id
6175 argv[1] = ULONG2NUM(node->node_id);
6176
6177 // location
6178 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6179
6180 // flags
6181 argv[3] = ULONG2NUM(node->flags);
6182
6183 // locals
6184#line 232 "prism/templates/ext/prism/api_node.c.erb"
6185 argv[4] = rb_ary_new_capa(cast->locals.size);
6186 for (size_t index = 0; index < cast->locals.size; index++) {
6187 assert(cast->locals.ids[index] != 0);
6188 rb_ary_push(argv[4], RARRAY_AREF(constants, cast->locals.ids[index] - 1));
6189 }
6190 if (freeze) rb_obj_freeze(argv[4]);
6191
6192 // class_keyword_loc
6193#line 240 "prism/templates/ext/prism/api_node.c.erb"
6194 argv[5] = pm_location_new(parser, cast->class_keyword_loc.start, cast->class_keyword_loc.end, source, freeze);
6195
6196 // operator_loc
6197#line 240 "prism/templates/ext/prism/api_node.c.erb"
6198 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
6199
6200 // expression
6201#line 213 "prism/templates/ext/prism/api_node.c.erb"
6202 argv[7] = rb_ary_pop(value_stack);
6203
6204 // body
6205#line 213 "prism/templates/ext/prism/api_node.c.erb"
6206 argv[8] = rb_ary_pop(value_stack);
6207
6208 // end_keyword_loc
6209#line 240 "prism/templates/ext/prism/api_node.c.erb"
6210 argv[9] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source, freeze);
6211
6212 VALUE value = rb_class_new_instance(10, argv, rb_cPrismSingletonClassNode);
6213 if (freeze) rb_obj_freeze(value);
6214
6215 rb_ary_push(value_stack, value);
6216 break;
6217 }
6218#line 190 "prism/templates/ext/prism/api_node.c.erb"
6219 case PM_SOURCE_ENCODING_NODE: {
6220 VALUE argv[4];
6221
6222 // source
6223 argv[0] = source;
6224
6225 // node_id
6226 argv[1] = ULONG2NUM(node->node_id);
6227
6228 // location
6229 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6230
6231 // flags
6232 argv[3] = ULONG2NUM(node->flags);
6233
6234 VALUE value = rb_class_new_instance(4, argv, rb_cPrismSourceEncodingNode);
6235 if (freeze) rb_obj_freeze(value);
6236
6237 rb_ary_push(value_stack, value);
6238 break;
6239 }
6240#line 190 "prism/templates/ext/prism/api_node.c.erb"
6241 case PM_SOURCE_FILE_NODE: {
6242 pm_source_file_node_t *cast = (pm_source_file_node_t *) node;
6243 VALUE argv[5];
6244
6245 // source
6246 argv[0] = source;
6247
6248 // node_id
6249 argv[1] = ULONG2NUM(node->node_id);
6250
6251 // location
6252 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6253
6254 // flags
6255 argv[3] = ULONG2NUM(node->flags);
6256
6257 // filepath
6258#line 223 "prism/templates/ext/prism/api_node.c.erb"
6259 argv[4] = pm_string_new(&cast->filepath, encoding);
6260
6261 VALUE value = rb_class_new_instance(5, argv, rb_cPrismSourceFileNode);
6262 if (freeze) rb_obj_freeze(value);
6263
6264 rb_ary_push(value_stack, value);
6265 break;
6266 }
6267#line 190 "prism/templates/ext/prism/api_node.c.erb"
6268 case PM_SOURCE_LINE_NODE: {
6269 VALUE argv[4];
6270
6271 // source
6272 argv[0] = source;
6273
6274 // node_id
6275 argv[1] = ULONG2NUM(node->node_id);
6276
6277 // location
6278 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6279
6280 // flags
6281 argv[3] = ULONG2NUM(node->flags);
6282
6283 VALUE value = rb_class_new_instance(4, argv, rb_cPrismSourceLineNode);
6284 if (freeze) rb_obj_freeze(value);
6285
6286 rb_ary_push(value_stack, value);
6287 break;
6288 }
6289#line 190 "prism/templates/ext/prism/api_node.c.erb"
6290 case PM_SPLAT_NODE: {
6291 pm_splat_node_t *cast = (pm_splat_node_t *) node;
6292 VALUE argv[6];
6293
6294 // source
6295 argv[0] = source;
6296
6297 // node_id
6298 argv[1] = ULONG2NUM(node->node_id);
6299
6300 // location
6301 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6302
6303 // flags
6304 argv[3] = ULONG2NUM(node->flags);
6305
6306 // operator_loc
6307#line 240 "prism/templates/ext/prism/api_node.c.erb"
6308 argv[4] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source, freeze);
6309
6310 // expression
6311#line 213 "prism/templates/ext/prism/api_node.c.erb"
6312 argv[5] = rb_ary_pop(value_stack);
6313
6314 VALUE value = rb_class_new_instance(6, argv, rb_cPrismSplatNode);
6315 if (freeze) rb_obj_freeze(value);
6316
6317 rb_ary_push(value_stack, value);
6318 break;
6319 }
6320#line 190 "prism/templates/ext/prism/api_node.c.erb"
6321 case PM_STATEMENTS_NODE: {
6322 pm_statements_node_t *cast = (pm_statements_node_t *) node;
6323 VALUE argv[5];
6324
6325 // source
6326 argv[0] = source;
6327
6328 // node_id
6329 argv[1] = ULONG2NUM(node->node_id);
6330
6331 // location
6332 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6333
6334 // flags
6335 argv[3] = ULONG2NUM(node->flags);
6336
6337 // body
6338#line 216 "prism/templates/ext/prism/api_node.c.erb"
6339 argv[4] = rb_ary_new_capa(cast->body.size);
6340 for (size_t index = 0; index < cast->body.size; index++) {
6341 rb_ary_push(argv[4], rb_ary_pop(value_stack));
6342 }
6343 if (freeze) rb_obj_freeze(argv[4]);
6344
6345 VALUE value = rb_class_new_instance(5, argv, rb_cPrismStatementsNode);
6346 if (freeze) rb_obj_freeze(value);
6347
6348 rb_ary_push(value_stack, value);
6349 break;
6350 }
6351#line 190 "prism/templates/ext/prism/api_node.c.erb"
6352 case PM_STRING_NODE: {
6353 pm_string_node_t *cast = (pm_string_node_t *) node;
6354 VALUE argv[8];
6355
6356 // source
6357 argv[0] = source;
6358
6359 // node_id
6360 argv[1] = ULONG2NUM(node->node_id);
6361
6362 // location
6363 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6364
6365 // flags
6366 argv[3] = ULONG2NUM(node->flags);
6367
6368 // opening_loc
6369#line 243 "prism/templates/ext/prism/api_node.c.erb"
6370 argv[4] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
6371
6372 // content_loc
6373#line 240 "prism/templates/ext/prism/api_node.c.erb"
6374 argv[5] = pm_location_new(parser, cast->content_loc.start, cast->content_loc.end, source, freeze);
6375
6376 // closing_loc
6377#line 243 "prism/templates/ext/prism/api_node.c.erb"
6378 argv[6] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
6379
6380 // unescaped
6381#line 223 "prism/templates/ext/prism/api_node.c.erb"
6382 argv[7] = pm_string_new(&cast->unescaped, encoding);
6383
6384 VALUE value = rb_class_new_instance(8, argv, rb_cPrismStringNode);
6385 if (freeze) rb_obj_freeze(value);
6386
6387 rb_ary_push(value_stack, value);
6388 break;
6389 }
6390#line 190 "prism/templates/ext/prism/api_node.c.erb"
6391 case PM_SUPER_NODE: {
6392 pm_super_node_t *cast = (pm_super_node_t *) node;
6393 VALUE argv[9];
6394
6395 // source
6396 argv[0] = source;
6397
6398 // node_id
6399 argv[1] = ULONG2NUM(node->node_id);
6400
6401 // location
6402 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6403
6404 // flags
6405 argv[3] = ULONG2NUM(node->flags);
6406
6407 // keyword_loc
6408#line 240 "prism/templates/ext/prism/api_node.c.erb"
6409 argv[4] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
6410
6411 // lparen_loc
6412#line 243 "prism/templates/ext/prism/api_node.c.erb"
6413 argv[5] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source, freeze);
6414
6415 // arguments
6416#line 213 "prism/templates/ext/prism/api_node.c.erb"
6417 argv[6] = rb_ary_pop(value_stack);
6418
6419 // rparen_loc
6420#line 243 "prism/templates/ext/prism/api_node.c.erb"
6421 argv[7] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source, freeze);
6422
6423 // block
6424#line 213 "prism/templates/ext/prism/api_node.c.erb"
6425 argv[8] = rb_ary_pop(value_stack);
6426
6427 VALUE value = rb_class_new_instance(9, argv, rb_cPrismSuperNode);
6428 if (freeze) rb_obj_freeze(value);
6429
6430 rb_ary_push(value_stack, value);
6431 break;
6432 }
6433#line 190 "prism/templates/ext/prism/api_node.c.erb"
6434 case PM_SYMBOL_NODE: {
6435 pm_symbol_node_t *cast = (pm_symbol_node_t *) node;
6436 VALUE argv[8];
6437
6438 // source
6439 argv[0] = source;
6440
6441 // node_id
6442 argv[1] = ULONG2NUM(node->node_id);
6443
6444 // location
6445 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6446
6447 // flags
6448 argv[3] = ULONG2NUM(node->flags);
6449
6450 // opening_loc
6451#line 243 "prism/templates/ext/prism/api_node.c.erb"
6452 argv[4] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
6453
6454 // value_loc
6455#line 243 "prism/templates/ext/prism/api_node.c.erb"
6456 argv[5] = cast->value_loc.start == NULL ? Qnil : pm_location_new(parser, cast->value_loc.start, cast->value_loc.end, source, freeze);
6457
6458 // closing_loc
6459#line 243 "prism/templates/ext/prism/api_node.c.erb"
6460 argv[6] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
6461
6462 // unescaped
6463#line 223 "prism/templates/ext/prism/api_node.c.erb"
6464 argv[7] = pm_string_new(&cast->unescaped, encoding);
6465
6466 VALUE value = rb_class_new_instance(8, argv, rb_cPrismSymbolNode);
6467 if (freeze) rb_obj_freeze(value);
6468
6469 rb_ary_push(value_stack, value);
6470 break;
6471 }
6472#line 190 "prism/templates/ext/prism/api_node.c.erb"
6473 case PM_TRUE_NODE: {
6474 VALUE argv[4];
6475
6476 // source
6477 argv[0] = source;
6478
6479 // node_id
6480 argv[1] = ULONG2NUM(node->node_id);
6481
6482 // location
6483 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6484
6485 // flags
6486 argv[3] = ULONG2NUM(node->flags);
6487
6488 VALUE value = rb_class_new_instance(4, argv, rb_cPrismTrueNode);
6489 if (freeze) rb_obj_freeze(value);
6490
6491 rb_ary_push(value_stack, value);
6492 break;
6493 }
6494#line 190 "prism/templates/ext/prism/api_node.c.erb"
6495 case PM_UNDEF_NODE: {
6496 pm_undef_node_t *cast = (pm_undef_node_t *) node;
6497 VALUE argv[6];
6498
6499 // source
6500 argv[0] = source;
6501
6502 // node_id
6503 argv[1] = ULONG2NUM(node->node_id);
6504
6505 // location
6506 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6507
6508 // flags
6509 argv[3] = ULONG2NUM(node->flags);
6510
6511 // names
6512#line 216 "prism/templates/ext/prism/api_node.c.erb"
6513 argv[4] = rb_ary_new_capa(cast->names.size);
6514 for (size_t index = 0; index < cast->names.size; index++) {
6515 rb_ary_push(argv[4], rb_ary_pop(value_stack));
6516 }
6517 if (freeze) rb_obj_freeze(argv[4]);
6518
6519 // keyword_loc
6520#line 240 "prism/templates/ext/prism/api_node.c.erb"
6521 argv[5] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
6522
6523 VALUE value = rb_class_new_instance(6, argv, rb_cPrismUndefNode);
6524 if (freeze) rb_obj_freeze(value);
6525
6526 rb_ary_push(value_stack, value);
6527 break;
6528 }
6529#line 190 "prism/templates/ext/prism/api_node.c.erb"
6530 case PM_UNLESS_NODE: {
6531 pm_unless_node_t *cast = (pm_unless_node_t *) node;
6532 VALUE argv[10];
6533
6534 // source
6535 argv[0] = source;
6536
6537 // node_id
6538 argv[1] = ULONG2NUM(node->node_id);
6539
6540 // location
6541 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6542
6543 // flags
6544 argv[3] = ULONG2NUM(node->flags);
6545
6546 // keyword_loc
6547#line 240 "prism/templates/ext/prism/api_node.c.erb"
6548 argv[4] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
6549
6550 // predicate
6551#line 213 "prism/templates/ext/prism/api_node.c.erb"
6552 argv[5] = rb_ary_pop(value_stack);
6553
6554 // then_keyword_loc
6555#line 243 "prism/templates/ext/prism/api_node.c.erb"
6556 argv[6] = cast->then_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->then_keyword_loc.start, cast->then_keyword_loc.end, source, freeze);
6557
6558 // statements
6559#line 213 "prism/templates/ext/prism/api_node.c.erb"
6560 argv[7] = rb_ary_pop(value_stack);
6561
6562 // else_clause
6563#line 213 "prism/templates/ext/prism/api_node.c.erb"
6564 argv[8] = rb_ary_pop(value_stack);
6565
6566 // end_keyword_loc
6567#line 243 "prism/templates/ext/prism/api_node.c.erb"
6568 argv[9] = cast->end_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source, freeze);
6569
6570 VALUE value = rb_class_new_instance(10, argv, rb_cPrismUnlessNode);
6571 if (freeze) rb_obj_freeze(value);
6572
6573 rb_ary_push(value_stack, value);
6574 break;
6575 }
6576#line 190 "prism/templates/ext/prism/api_node.c.erb"
6577 case PM_UNTIL_NODE: {
6578 pm_until_node_t *cast = (pm_until_node_t *) node;
6579 VALUE argv[9];
6580
6581 // source
6582 argv[0] = source;
6583
6584 // node_id
6585 argv[1] = ULONG2NUM(node->node_id);
6586
6587 // location
6588 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6589
6590 // flags
6591 argv[3] = ULONG2NUM(node->flags);
6592
6593 // keyword_loc
6594#line 240 "prism/templates/ext/prism/api_node.c.erb"
6595 argv[4] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
6596
6597 // do_keyword_loc
6598#line 243 "prism/templates/ext/prism/api_node.c.erb"
6599 argv[5] = cast->do_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->do_keyword_loc.start, cast->do_keyword_loc.end, source, freeze);
6600
6601 // closing_loc
6602#line 243 "prism/templates/ext/prism/api_node.c.erb"
6603 argv[6] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
6604
6605 // predicate
6606#line 213 "prism/templates/ext/prism/api_node.c.erb"
6607 argv[7] = rb_ary_pop(value_stack);
6608
6609 // statements
6610#line 213 "prism/templates/ext/prism/api_node.c.erb"
6611 argv[8] = rb_ary_pop(value_stack);
6612
6613 VALUE value = rb_class_new_instance(9, argv, rb_cPrismUntilNode);
6614 if (freeze) rb_obj_freeze(value);
6615
6616 rb_ary_push(value_stack, value);
6617 break;
6618 }
6619#line 190 "prism/templates/ext/prism/api_node.c.erb"
6620 case PM_WHEN_NODE: {
6621 pm_when_node_t *cast = (pm_when_node_t *) node;
6622 VALUE argv[8];
6623
6624 // source
6625 argv[0] = source;
6626
6627 // node_id
6628 argv[1] = ULONG2NUM(node->node_id);
6629
6630 // location
6631 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6632
6633 // flags
6634 argv[3] = ULONG2NUM(node->flags);
6635
6636 // keyword_loc
6637#line 240 "prism/templates/ext/prism/api_node.c.erb"
6638 argv[4] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
6639
6640 // conditions
6641#line 216 "prism/templates/ext/prism/api_node.c.erb"
6642 argv[5] = rb_ary_new_capa(cast->conditions.size);
6643 for (size_t index = 0; index < cast->conditions.size; index++) {
6644 rb_ary_push(argv[5], rb_ary_pop(value_stack));
6645 }
6646 if (freeze) rb_obj_freeze(argv[5]);
6647
6648 // then_keyword_loc
6649#line 243 "prism/templates/ext/prism/api_node.c.erb"
6650 argv[6] = cast->then_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->then_keyword_loc.start, cast->then_keyword_loc.end, source, freeze);
6651
6652 // statements
6653#line 213 "prism/templates/ext/prism/api_node.c.erb"
6654 argv[7] = rb_ary_pop(value_stack);
6655
6656 VALUE value = rb_class_new_instance(8, argv, rb_cPrismWhenNode);
6657 if (freeze) rb_obj_freeze(value);
6658
6659 rb_ary_push(value_stack, value);
6660 break;
6661 }
6662#line 190 "prism/templates/ext/prism/api_node.c.erb"
6663 case PM_WHILE_NODE: {
6664 pm_while_node_t *cast = (pm_while_node_t *) node;
6665 VALUE argv[9];
6666
6667 // source
6668 argv[0] = source;
6669
6670 // node_id
6671 argv[1] = ULONG2NUM(node->node_id);
6672
6673 // location
6674 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6675
6676 // flags
6677 argv[3] = ULONG2NUM(node->flags);
6678
6679 // keyword_loc
6680#line 240 "prism/templates/ext/prism/api_node.c.erb"
6681 argv[4] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
6682
6683 // do_keyword_loc
6684#line 243 "prism/templates/ext/prism/api_node.c.erb"
6685 argv[5] = cast->do_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->do_keyword_loc.start, cast->do_keyword_loc.end, source, freeze);
6686
6687 // closing_loc
6688#line 243 "prism/templates/ext/prism/api_node.c.erb"
6689 argv[6] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
6690
6691 // predicate
6692#line 213 "prism/templates/ext/prism/api_node.c.erb"
6693 argv[7] = rb_ary_pop(value_stack);
6694
6695 // statements
6696#line 213 "prism/templates/ext/prism/api_node.c.erb"
6697 argv[8] = rb_ary_pop(value_stack);
6698
6699 VALUE value = rb_class_new_instance(9, argv, rb_cPrismWhileNode);
6700 if (freeze) rb_obj_freeze(value);
6701
6702 rb_ary_push(value_stack, value);
6703 break;
6704 }
6705#line 190 "prism/templates/ext/prism/api_node.c.erb"
6706 case PM_X_STRING_NODE: {
6707 pm_x_string_node_t *cast = (pm_x_string_node_t *) node;
6708 VALUE argv[8];
6709
6710 // source
6711 argv[0] = source;
6712
6713 // node_id
6714 argv[1] = ULONG2NUM(node->node_id);
6715
6716 // location
6717 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6718
6719 // flags
6720 argv[3] = ULONG2NUM(node->flags);
6721
6722 // opening_loc
6723#line 240 "prism/templates/ext/prism/api_node.c.erb"
6724 argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source, freeze);
6725
6726 // content_loc
6727#line 240 "prism/templates/ext/prism/api_node.c.erb"
6728 argv[5] = pm_location_new(parser, cast->content_loc.start, cast->content_loc.end, source, freeze);
6729
6730 // closing_loc
6731#line 240 "prism/templates/ext/prism/api_node.c.erb"
6732 argv[6] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source, freeze);
6733
6734 // unescaped
6735#line 223 "prism/templates/ext/prism/api_node.c.erb"
6736 argv[7] = pm_string_new(&cast->unescaped, encoding);
6737
6738 VALUE value = rb_class_new_instance(8, argv, rb_cPrismXStringNode);
6739 if (freeze) rb_obj_freeze(value);
6740
6741 rb_ary_push(value_stack, value);
6742 break;
6743 }
6744#line 190 "prism/templates/ext/prism/api_node.c.erb"
6745 case PM_YIELD_NODE: {
6746 pm_yield_node_t *cast = (pm_yield_node_t *) node;
6747 VALUE argv[8];
6748
6749 // source
6750 argv[0] = source;
6751
6752 // node_id
6753 argv[1] = ULONG2NUM(node->node_id);
6754
6755 // location
6756 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source, freeze);
6757
6758 // flags
6759 argv[3] = ULONG2NUM(node->flags);
6760
6761 // keyword_loc
6762#line 240 "prism/templates/ext/prism/api_node.c.erb"
6763 argv[4] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source, freeze);
6764
6765 // lparen_loc
6766#line 243 "prism/templates/ext/prism/api_node.c.erb"
6767 argv[5] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source, freeze);
6768
6769 // arguments
6770#line 213 "prism/templates/ext/prism/api_node.c.erb"
6771 argv[6] = rb_ary_pop(value_stack);
6772
6773 // rparen_loc
6774#line 243 "prism/templates/ext/prism/api_node.c.erb"
6775 argv[7] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source, freeze);
6776
6777 VALUE value = rb_class_new_instance(8, argv, rb_cPrismYieldNode);
6778 if (freeze) rb_obj_freeze(value);
6779
6780 rb_ary_push(value_stack, value);
6781 break;
6782 }
6783 default:
6784 rb_raise(rb_eRuntimeError, "unknown node type: %d", PM_NODE_TYPE(node));
6785 }
6786 }
6787 }
6788
6789 return rb_ary_pop(value_stack);
6790}
6791
6792void
6793Init_prism_api_node(void) {
6794 rb_cPrismAliasGlobalVariableNode = rb_define_class_under(rb_cPrism, "AliasGlobalVariableNode", rb_cPrismNode);
6795 rb_cPrismAliasMethodNode = rb_define_class_under(rb_cPrism, "AliasMethodNode", rb_cPrismNode);
6796 rb_cPrismAlternationPatternNode = rb_define_class_under(rb_cPrism, "AlternationPatternNode", rb_cPrismNode);
6797 rb_cPrismAndNode = rb_define_class_under(rb_cPrism, "AndNode", rb_cPrismNode);
6798 rb_cPrismArgumentsNode = rb_define_class_under(rb_cPrism, "ArgumentsNode", rb_cPrismNode);
6799 rb_cPrismArrayNode = rb_define_class_under(rb_cPrism, "ArrayNode", rb_cPrismNode);
6800 rb_cPrismArrayPatternNode = rb_define_class_under(rb_cPrism, "ArrayPatternNode", rb_cPrismNode);
6801 rb_cPrismAssocNode = rb_define_class_under(rb_cPrism, "AssocNode", rb_cPrismNode);
6802 rb_cPrismAssocSplatNode = rb_define_class_under(rb_cPrism, "AssocSplatNode", rb_cPrismNode);
6803 rb_cPrismBackReferenceReadNode = rb_define_class_under(rb_cPrism, "BackReferenceReadNode", rb_cPrismNode);
6804 rb_cPrismBeginNode = rb_define_class_under(rb_cPrism, "BeginNode", rb_cPrismNode);
6805 rb_cPrismBlockArgumentNode = rb_define_class_under(rb_cPrism, "BlockArgumentNode", rb_cPrismNode);
6806 rb_cPrismBlockLocalVariableNode = rb_define_class_under(rb_cPrism, "BlockLocalVariableNode", rb_cPrismNode);
6807 rb_cPrismBlockNode = rb_define_class_under(rb_cPrism, "BlockNode", rb_cPrismNode);
6808 rb_cPrismBlockParameterNode = rb_define_class_under(rb_cPrism, "BlockParameterNode", rb_cPrismNode);
6809 rb_cPrismBlockParametersNode = rb_define_class_under(rb_cPrism, "BlockParametersNode", rb_cPrismNode);
6810 rb_cPrismBreakNode = rb_define_class_under(rb_cPrism, "BreakNode", rb_cPrismNode);
6811 rb_cPrismCallAndWriteNode = rb_define_class_under(rb_cPrism, "CallAndWriteNode", rb_cPrismNode);
6812 rb_cPrismCallNode = rb_define_class_under(rb_cPrism, "CallNode", rb_cPrismNode);
6813 rb_cPrismCallOperatorWriteNode = rb_define_class_under(rb_cPrism, "CallOperatorWriteNode", rb_cPrismNode);
6814 rb_cPrismCallOrWriteNode = rb_define_class_under(rb_cPrism, "CallOrWriteNode", rb_cPrismNode);
6815 rb_cPrismCallTargetNode = rb_define_class_under(rb_cPrism, "CallTargetNode", rb_cPrismNode);
6816 rb_cPrismCapturePatternNode = rb_define_class_under(rb_cPrism, "CapturePatternNode", rb_cPrismNode);
6817 rb_cPrismCaseMatchNode = rb_define_class_under(rb_cPrism, "CaseMatchNode", rb_cPrismNode);
6818 rb_cPrismCaseNode = rb_define_class_under(rb_cPrism, "CaseNode", rb_cPrismNode);
6819 rb_cPrismClassNode = rb_define_class_under(rb_cPrism, "ClassNode", rb_cPrismNode);
6820 rb_cPrismClassVariableAndWriteNode = rb_define_class_under(rb_cPrism, "ClassVariableAndWriteNode", rb_cPrismNode);
6821 rb_cPrismClassVariableOperatorWriteNode = rb_define_class_under(rb_cPrism, "ClassVariableOperatorWriteNode", rb_cPrismNode);
6822 rb_cPrismClassVariableOrWriteNode = rb_define_class_under(rb_cPrism, "ClassVariableOrWriteNode", rb_cPrismNode);
6823 rb_cPrismClassVariableReadNode = rb_define_class_under(rb_cPrism, "ClassVariableReadNode", rb_cPrismNode);
6824 rb_cPrismClassVariableTargetNode = rb_define_class_under(rb_cPrism, "ClassVariableTargetNode", rb_cPrismNode);
6825 rb_cPrismClassVariableWriteNode = rb_define_class_under(rb_cPrism, "ClassVariableWriteNode", rb_cPrismNode);
6826 rb_cPrismConstantAndWriteNode = rb_define_class_under(rb_cPrism, "ConstantAndWriteNode", rb_cPrismNode);
6827 rb_cPrismConstantOperatorWriteNode = rb_define_class_under(rb_cPrism, "ConstantOperatorWriteNode", rb_cPrismNode);
6828 rb_cPrismConstantOrWriteNode = rb_define_class_under(rb_cPrism, "ConstantOrWriteNode", rb_cPrismNode);
6829 rb_cPrismConstantPathAndWriteNode = rb_define_class_under(rb_cPrism, "ConstantPathAndWriteNode", rb_cPrismNode);
6830 rb_cPrismConstantPathNode = rb_define_class_under(rb_cPrism, "ConstantPathNode", rb_cPrismNode);
6831 rb_cPrismConstantPathOperatorWriteNode = rb_define_class_under(rb_cPrism, "ConstantPathOperatorWriteNode", rb_cPrismNode);
6832 rb_cPrismConstantPathOrWriteNode = rb_define_class_under(rb_cPrism, "ConstantPathOrWriteNode", rb_cPrismNode);
6833 rb_cPrismConstantPathTargetNode = rb_define_class_under(rb_cPrism, "ConstantPathTargetNode", rb_cPrismNode);
6834 rb_cPrismConstantPathWriteNode = rb_define_class_under(rb_cPrism, "ConstantPathWriteNode", rb_cPrismNode);
6835 rb_cPrismConstantReadNode = rb_define_class_under(rb_cPrism, "ConstantReadNode", rb_cPrismNode);
6836 rb_cPrismConstantTargetNode = rb_define_class_under(rb_cPrism, "ConstantTargetNode", rb_cPrismNode);
6837 rb_cPrismConstantWriteNode = rb_define_class_under(rb_cPrism, "ConstantWriteNode", rb_cPrismNode);
6838 rb_cPrismDefNode = rb_define_class_under(rb_cPrism, "DefNode", rb_cPrismNode);
6839 rb_cPrismDefinedNode = rb_define_class_under(rb_cPrism, "DefinedNode", rb_cPrismNode);
6840 rb_cPrismElseNode = rb_define_class_under(rb_cPrism, "ElseNode", rb_cPrismNode);
6841 rb_cPrismEmbeddedStatementsNode = rb_define_class_under(rb_cPrism, "EmbeddedStatementsNode", rb_cPrismNode);
6842 rb_cPrismEmbeddedVariableNode = rb_define_class_under(rb_cPrism, "EmbeddedVariableNode", rb_cPrismNode);
6843 rb_cPrismEnsureNode = rb_define_class_under(rb_cPrism, "EnsureNode", rb_cPrismNode);
6844 rb_cPrismFalseNode = rb_define_class_under(rb_cPrism, "FalseNode", rb_cPrismNode);
6845 rb_cPrismFindPatternNode = rb_define_class_under(rb_cPrism, "FindPatternNode", rb_cPrismNode);
6846 rb_cPrismFlipFlopNode = rb_define_class_under(rb_cPrism, "FlipFlopNode", rb_cPrismNode);
6847 rb_cPrismFloatNode = rb_define_class_under(rb_cPrism, "FloatNode", rb_cPrismNode);
6848 rb_cPrismForNode = rb_define_class_under(rb_cPrism, "ForNode", rb_cPrismNode);
6849 rb_cPrismForwardingArgumentsNode = rb_define_class_under(rb_cPrism, "ForwardingArgumentsNode", rb_cPrismNode);
6850 rb_cPrismForwardingParameterNode = rb_define_class_under(rb_cPrism, "ForwardingParameterNode", rb_cPrismNode);
6851 rb_cPrismForwardingSuperNode = rb_define_class_under(rb_cPrism, "ForwardingSuperNode", rb_cPrismNode);
6852 rb_cPrismGlobalVariableAndWriteNode = rb_define_class_under(rb_cPrism, "GlobalVariableAndWriteNode", rb_cPrismNode);
6853 rb_cPrismGlobalVariableOperatorWriteNode = rb_define_class_under(rb_cPrism, "GlobalVariableOperatorWriteNode", rb_cPrismNode);
6854 rb_cPrismGlobalVariableOrWriteNode = rb_define_class_under(rb_cPrism, "GlobalVariableOrWriteNode", rb_cPrismNode);
6855 rb_cPrismGlobalVariableReadNode = rb_define_class_under(rb_cPrism, "GlobalVariableReadNode", rb_cPrismNode);
6856 rb_cPrismGlobalVariableTargetNode = rb_define_class_under(rb_cPrism, "GlobalVariableTargetNode", rb_cPrismNode);
6857 rb_cPrismGlobalVariableWriteNode = rb_define_class_under(rb_cPrism, "GlobalVariableWriteNode", rb_cPrismNode);
6858 rb_cPrismHashNode = rb_define_class_under(rb_cPrism, "HashNode", rb_cPrismNode);
6859 rb_cPrismHashPatternNode = rb_define_class_under(rb_cPrism, "HashPatternNode", rb_cPrismNode);
6860 rb_cPrismIfNode = rb_define_class_under(rb_cPrism, "IfNode", rb_cPrismNode);
6861 rb_cPrismImaginaryNode = rb_define_class_under(rb_cPrism, "ImaginaryNode", rb_cPrismNode);
6862 rb_cPrismImplicitNode = rb_define_class_under(rb_cPrism, "ImplicitNode", rb_cPrismNode);
6863 rb_cPrismImplicitRestNode = rb_define_class_under(rb_cPrism, "ImplicitRestNode", rb_cPrismNode);
6864 rb_cPrismInNode = rb_define_class_under(rb_cPrism, "InNode", rb_cPrismNode);
6865 rb_cPrismIndexAndWriteNode = rb_define_class_under(rb_cPrism, "IndexAndWriteNode", rb_cPrismNode);
6866 rb_cPrismIndexOperatorWriteNode = rb_define_class_under(rb_cPrism, "IndexOperatorWriteNode", rb_cPrismNode);
6867 rb_cPrismIndexOrWriteNode = rb_define_class_under(rb_cPrism, "IndexOrWriteNode", rb_cPrismNode);
6868 rb_cPrismIndexTargetNode = rb_define_class_under(rb_cPrism, "IndexTargetNode", rb_cPrismNode);
6869 rb_cPrismInstanceVariableAndWriteNode = rb_define_class_under(rb_cPrism, "InstanceVariableAndWriteNode", rb_cPrismNode);
6870 rb_cPrismInstanceVariableOperatorWriteNode = rb_define_class_under(rb_cPrism, "InstanceVariableOperatorWriteNode", rb_cPrismNode);
6871 rb_cPrismInstanceVariableOrWriteNode = rb_define_class_under(rb_cPrism, "InstanceVariableOrWriteNode", rb_cPrismNode);
6872 rb_cPrismInstanceVariableReadNode = rb_define_class_under(rb_cPrism, "InstanceVariableReadNode", rb_cPrismNode);
6873 rb_cPrismInstanceVariableTargetNode = rb_define_class_under(rb_cPrism, "InstanceVariableTargetNode", rb_cPrismNode);
6874 rb_cPrismInstanceVariableWriteNode = rb_define_class_under(rb_cPrism, "InstanceVariableWriteNode", rb_cPrismNode);
6875 rb_cPrismIntegerNode = rb_define_class_under(rb_cPrism, "IntegerNode", rb_cPrismNode);
6876 rb_cPrismInterpolatedMatchLastLineNode = rb_define_class_under(rb_cPrism, "InterpolatedMatchLastLineNode", rb_cPrismNode);
6877 rb_cPrismInterpolatedRegularExpressionNode = rb_define_class_under(rb_cPrism, "InterpolatedRegularExpressionNode", rb_cPrismNode);
6878 rb_cPrismInterpolatedStringNode = rb_define_class_under(rb_cPrism, "InterpolatedStringNode", rb_cPrismNode);
6879 rb_cPrismInterpolatedSymbolNode = rb_define_class_under(rb_cPrism, "InterpolatedSymbolNode", rb_cPrismNode);
6880 rb_cPrismInterpolatedXStringNode = rb_define_class_under(rb_cPrism, "InterpolatedXStringNode", rb_cPrismNode);
6881 rb_cPrismItLocalVariableReadNode = rb_define_class_under(rb_cPrism, "ItLocalVariableReadNode", rb_cPrismNode);
6882 rb_cPrismItParametersNode = rb_define_class_under(rb_cPrism, "ItParametersNode", rb_cPrismNode);
6883 rb_cPrismKeywordHashNode = rb_define_class_under(rb_cPrism, "KeywordHashNode", rb_cPrismNode);
6884 rb_cPrismKeywordRestParameterNode = rb_define_class_under(rb_cPrism, "KeywordRestParameterNode", rb_cPrismNode);
6885 rb_cPrismLambdaNode = rb_define_class_under(rb_cPrism, "LambdaNode", rb_cPrismNode);
6886 rb_cPrismLocalVariableAndWriteNode = rb_define_class_under(rb_cPrism, "LocalVariableAndWriteNode", rb_cPrismNode);
6887 rb_cPrismLocalVariableOperatorWriteNode = rb_define_class_under(rb_cPrism, "LocalVariableOperatorWriteNode", rb_cPrismNode);
6888 rb_cPrismLocalVariableOrWriteNode = rb_define_class_under(rb_cPrism, "LocalVariableOrWriteNode", rb_cPrismNode);
6889 rb_cPrismLocalVariableReadNode = rb_define_class_under(rb_cPrism, "LocalVariableReadNode", rb_cPrismNode);
6890 rb_cPrismLocalVariableTargetNode = rb_define_class_under(rb_cPrism, "LocalVariableTargetNode", rb_cPrismNode);
6891 rb_cPrismLocalVariableWriteNode = rb_define_class_under(rb_cPrism, "LocalVariableWriteNode", rb_cPrismNode);
6892 rb_cPrismMatchLastLineNode = rb_define_class_under(rb_cPrism, "MatchLastLineNode", rb_cPrismNode);
6893 rb_cPrismMatchPredicateNode = rb_define_class_under(rb_cPrism, "MatchPredicateNode", rb_cPrismNode);
6894 rb_cPrismMatchRequiredNode = rb_define_class_under(rb_cPrism, "MatchRequiredNode", rb_cPrismNode);
6895 rb_cPrismMatchWriteNode = rb_define_class_under(rb_cPrism, "MatchWriteNode", rb_cPrismNode);
6896 rb_cPrismMissingNode = rb_define_class_under(rb_cPrism, "MissingNode", rb_cPrismNode);
6897 rb_cPrismModuleNode = rb_define_class_under(rb_cPrism, "ModuleNode", rb_cPrismNode);
6898 rb_cPrismMultiTargetNode = rb_define_class_under(rb_cPrism, "MultiTargetNode", rb_cPrismNode);
6899 rb_cPrismMultiWriteNode = rb_define_class_under(rb_cPrism, "MultiWriteNode", rb_cPrismNode);
6900 rb_cPrismNextNode = rb_define_class_under(rb_cPrism, "NextNode", rb_cPrismNode);
6901 rb_cPrismNilNode = rb_define_class_under(rb_cPrism, "NilNode", rb_cPrismNode);
6902 rb_cPrismNoKeywordsParameterNode = rb_define_class_under(rb_cPrism, "NoKeywordsParameterNode", rb_cPrismNode);
6903 rb_cPrismNumberedParametersNode = rb_define_class_under(rb_cPrism, "NumberedParametersNode", rb_cPrismNode);
6904 rb_cPrismNumberedReferenceReadNode = rb_define_class_under(rb_cPrism, "NumberedReferenceReadNode", rb_cPrismNode);
6905 rb_cPrismOptionalKeywordParameterNode = rb_define_class_under(rb_cPrism, "OptionalKeywordParameterNode", rb_cPrismNode);
6906 rb_cPrismOptionalParameterNode = rb_define_class_under(rb_cPrism, "OptionalParameterNode", rb_cPrismNode);
6907 rb_cPrismOrNode = rb_define_class_under(rb_cPrism, "OrNode", rb_cPrismNode);
6908 rb_cPrismParametersNode = rb_define_class_under(rb_cPrism, "ParametersNode", rb_cPrismNode);
6909 rb_cPrismParenthesesNode = rb_define_class_under(rb_cPrism, "ParenthesesNode", rb_cPrismNode);
6910 rb_cPrismPinnedExpressionNode = rb_define_class_under(rb_cPrism, "PinnedExpressionNode", rb_cPrismNode);
6911 rb_cPrismPinnedVariableNode = rb_define_class_under(rb_cPrism, "PinnedVariableNode", rb_cPrismNode);
6912 rb_cPrismPostExecutionNode = rb_define_class_under(rb_cPrism, "PostExecutionNode", rb_cPrismNode);
6913 rb_cPrismPreExecutionNode = rb_define_class_under(rb_cPrism, "PreExecutionNode", rb_cPrismNode);
6914 rb_cPrismProgramNode = rb_define_class_under(rb_cPrism, "ProgramNode", rb_cPrismNode);
6915 rb_cPrismRangeNode = rb_define_class_under(rb_cPrism, "RangeNode", rb_cPrismNode);
6916 rb_cPrismRationalNode = rb_define_class_under(rb_cPrism, "RationalNode", rb_cPrismNode);
6917 rb_cPrismRedoNode = rb_define_class_under(rb_cPrism, "RedoNode", rb_cPrismNode);
6918 rb_cPrismRegularExpressionNode = rb_define_class_under(rb_cPrism, "RegularExpressionNode", rb_cPrismNode);
6919 rb_cPrismRequiredKeywordParameterNode = rb_define_class_under(rb_cPrism, "RequiredKeywordParameterNode", rb_cPrismNode);
6920 rb_cPrismRequiredParameterNode = rb_define_class_under(rb_cPrism, "RequiredParameterNode", rb_cPrismNode);
6921 rb_cPrismRescueModifierNode = rb_define_class_under(rb_cPrism, "RescueModifierNode", rb_cPrismNode);
6922 rb_cPrismRescueNode = rb_define_class_under(rb_cPrism, "RescueNode", rb_cPrismNode);
6923 rb_cPrismRestParameterNode = rb_define_class_under(rb_cPrism, "RestParameterNode", rb_cPrismNode);
6924 rb_cPrismRetryNode = rb_define_class_under(rb_cPrism, "RetryNode", rb_cPrismNode);
6925 rb_cPrismReturnNode = rb_define_class_under(rb_cPrism, "ReturnNode", rb_cPrismNode);
6926 rb_cPrismSelfNode = rb_define_class_under(rb_cPrism, "SelfNode", rb_cPrismNode);
6927 rb_cPrismShareableConstantNode = rb_define_class_under(rb_cPrism, "ShareableConstantNode", rb_cPrismNode);
6928 rb_cPrismSingletonClassNode = rb_define_class_under(rb_cPrism, "SingletonClassNode", rb_cPrismNode);
6929 rb_cPrismSourceEncodingNode = rb_define_class_under(rb_cPrism, "SourceEncodingNode", rb_cPrismNode);
6930 rb_cPrismSourceFileNode = rb_define_class_under(rb_cPrism, "SourceFileNode", rb_cPrismNode);
6931 rb_cPrismSourceLineNode = rb_define_class_under(rb_cPrism, "SourceLineNode", rb_cPrismNode);
6932 rb_cPrismSplatNode = rb_define_class_under(rb_cPrism, "SplatNode", rb_cPrismNode);
6933 rb_cPrismStatementsNode = rb_define_class_under(rb_cPrism, "StatementsNode", rb_cPrismNode);
6934 rb_cPrismStringNode = rb_define_class_under(rb_cPrism, "StringNode", rb_cPrismNode);
6935 rb_cPrismSuperNode = rb_define_class_under(rb_cPrism, "SuperNode", rb_cPrismNode);
6936 rb_cPrismSymbolNode = rb_define_class_under(rb_cPrism, "SymbolNode", rb_cPrismNode);
6937 rb_cPrismTrueNode = rb_define_class_under(rb_cPrism, "TrueNode", rb_cPrismNode);
6938 rb_cPrismUndefNode = rb_define_class_under(rb_cPrism, "UndefNode", rb_cPrismNode);
6939 rb_cPrismUnlessNode = rb_define_class_under(rb_cPrism, "UnlessNode", rb_cPrismNode);
6940 rb_cPrismUntilNode = rb_define_class_under(rb_cPrism, "UntilNode", rb_cPrismNode);
6941 rb_cPrismWhenNode = rb_define_class_under(rb_cPrism, "WhenNode", rb_cPrismNode);
6942 rb_cPrismWhileNode = rb_define_class_under(rb_cPrism, "WhileNode", rb_cPrismNode);
6943 rb_cPrismXStringNode = rb_define_class_under(rb_cPrism, "XStringNode", rb_cPrismNode);
6944 rb_cPrismYieldNode = rb_define_class_under(rb_cPrism, "YieldNode", rb_cPrismNode);
6945}
rb_define_class_under
VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
Defines a class under the namespace of outer.
Definition class.c:1509
xfree
#define xfree
Old name of ruby_xfree.
Definition xmalloc.h:58
ID2SYM
#define ID2SYM
Old name of RB_ID2SYM.
Definition symbol.h:44
ULONG2NUM
#define ULONG2NUM
Old name of RB_ULONG2NUM.
Definition long.h:60
xmalloc
#define xmalloc
Old name of ruby_xmalloc.
Definition xmalloc.h:53
LONG2FIX
#define LONG2FIX
Old name of RB_INT2FIX.
Definition long.h:49
LONG2NUM
#define LONG2NUM
Old name of RB_LONG2NUM.
Definition long.h:50
ULL2NUM
#define ULL2NUM
Old name of RB_ULL2NUM.
Definition long_long.h:31
Qnil
#define Qnil
Old name of RUBY_Qnil.
Definition special_consts.h:60
DBL2NUM
#define DBL2NUM
Old name of rb_float_new.
Definition double.h:29
UINT2NUM
#define UINT2NUM
Old name of RB_UINT2NUM.
Definition int.h:46
rb_eRuntimeError
VALUE rb_eRuntimeError
RuntimeError exception.
Definition error.c:1429
rb_class_new_instance
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:2249
rb_obj_freeze
VALUE rb_obj_freeze(VALUE obj)
Just calls rb_obj_freeze_inline() inside.
Definition object.c:1342
rb_funcall
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1117
rb_ary_new
VALUE rb_ary_new(void)
Allocates a new, empty array.
rb_ary_new_capa
VALUE rb_ary_new_capa(long capa)
Identical to rb_ary_new(), except it additionally specifies how many rooms of objects it should alloc...
rb_ary_pop
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
rb_ary_push
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
rb_str_new
#define rb_str_new(str, len)
Allocates an instance of rb_cString.
Definition string.h:1499
rb_str_intern
VALUE rb_str_intern(VALUE str)
Identical to rb_to_symbol(), except it assumes the receiver being an instance of RString.
Definition symbol.c:937
rb_intern_const
static ID rb_intern_const(const char *str)
This is a "tiny optimisation" over rb_intern().
Definition symbol.h:285
ruby::backward::cxxanyargs::type
VALUE type(ANYARGS)
ANYARGS-ed function type.
Definition cxxanyargs.hpp:56
pm_parser_t
struct pm_parser pm_parser_t
The parser used to parse Ruby source.
Definition parser.h:267
pm_token_type_name
PRISM_EXPORTED_FUNCTION const char * pm_token_type_name(pm_token_type_t token_type)
Returns a string representation of the given token type.
Definition token_type.c:19
RARRAY_AREF
#define RARRAY_AREF(a, i)
Definition rarray.h:403
pm_alias_global_variable_node::old_name
struct pm_node * old_name
AliasGlobalVariableNode::old_name.
Definition ast.h:1139
pm_alias_global_variable_node::new_name
struct pm_node * new_name
AliasGlobalVariableNode::new_name.
Definition ast.h:1129
pm_alias_global_variable_node::keyword_loc
pm_location_t keyword_loc
AliasGlobalVariableNode::keyword_loc.
Definition ast.h:1149
pm_alias_method_node::old_name
struct pm_node * old_name
AliasMethodNode::old_name.
Definition ast.h:1199
pm_alias_method_node::new_name
struct pm_node * new_name
AliasMethodNode::new_name.
Definition ast.h:1183
pm_alias_method_node::keyword_loc
pm_location_t keyword_loc
AliasMethodNode::keyword_loc.
Definition ast.h:1209
pm_alternation_pattern_node::operator_loc
pm_location_t operator_loc
AlternationPatternNode::operator_loc.
Definition ast.h:1257
pm_alternation_pattern_node::left
struct pm_node * left
AlternationPatternNode::left.
Definition ast.h:1237
pm_alternation_pattern_node::right
struct pm_node * right
AlternationPatternNode::right.
Definition ast.h:1247
pm_and_node::left
struct pm_node * left
AndNode::left.
Definition ast.h:1288
pm_and_node::right
struct pm_node * right
AndNode::right.
Definition ast.h:1301
pm_and_node::operator_loc
pm_location_t operator_loc
AndNode::operator_loc.
Definition ast.h:1311
pm_arguments_node::arguments
struct pm_node_list arguments
ArgumentsNode::arguments.
Definition ast.h:1346
pm_array_node::closing_loc
pm_location_t closing_loc
ArrayNode::closing_loc.
Definition ast.h:1398
pm_array_node::elements
struct pm_node_list elements
ArrayNode::elements.
Definition ast.h:1374
pm_array_node::opening_loc
pm_location_t opening_loc
ArrayNode::opening_loc.
Definition ast.h:1386
pm_array_pattern_node::requireds
struct pm_node_list requireds
ArrayPatternNode::requireds.
Definition ast.h:1454
pm_array_pattern_node::rest
struct pm_node * rest
ArrayPatternNode::rest.
Definition ast.h:1464
pm_array_pattern_node::constant
struct pm_node * constant
ArrayPatternNode::constant.
Definition ast.h:1444
pm_array_pattern_node::opening_loc
pm_location_t opening_loc
ArrayPatternNode::opening_loc.
Definition ast.h:1484
pm_array_pattern_node::closing_loc
pm_location_t closing_loc
ArrayPatternNode::closing_loc.
Definition ast.h:1494
pm_array_pattern_node::posts
struct pm_node_list posts
ArrayPatternNode::posts.
Definition ast.h:1474
pm_assoc_node::value
struct pm_node * value
AssocNode::value.
Definition ast.h:1541
pm_assoc_node::key
struct pm_node * key
AssocNode::key.
Definition ast.h:1528
pm_assoc_node::operator_loc
pm_location_t operator_loc
AssocNode::operator_loc.
Definition ast.h:1551
pm_assoc_splat_node::value
struct pm_node * value
AssocSplatNode::value.
Definition ast.h:1579
pm_assoc_splat_node::operator_loc
pm_location_t operator_loc
AssocSplatNode::operator_loc.
Definition ast.h:1589
pm_back_reference_read_node::name
pm_constant_id_t name
BackReferenceReadNode::name.
Definition ast.h:1618
pm_begin_node::ensure_clause
struct pm_ensure_node * ensure_clause
BeginNode::ensure_clause.
Definition ast.h:1688
pm_begin_node::rescue_clause
struct pm_rescue_node * rescue_clause
BeginNode::rescue_clause.
Definition ast.h:1668
pm_begin_node::statements
struct pm_statements_node * statements
BeginNode::statements.
Definition ast.h:1658
pm_begin_node::end_keyword_loc
pm_location_t end_keyword_loc
BeginNode::end_keyword_loc.
Definition ast.h:1698
pm_begin_node::begin_keyword_loc
pm_location_t begin_keyword_loc
BeginNode::begin_keyword_loc.
Definition ast.h:1648
pm_begin_node::else_clause
struct pm_else_node * else_clause
BeginNode::else_clause.
Definition ast.h:1678
pm_block_argument_node::expression
struct pm_node * expression
BlockArgumentNode::expression.
Definition ast.h:1726
pm_block_argument_node::operator_loc
pm_location_t operator_loc
BlockArgumentNode::operator_loc.
Definition ast.h:1736
pm_block_local_variable_node::name
pm_constant_id_t name
BlockLocalVariableNode::name.
Definition ast.h:1767
pm_block_node::closing_loc
pm_location_t closing_loc
BlockNode::closing_loc.
Definition ast.h:1839
pm_block_node::parameters
struct pm_node * parameters
BlockNode::parameters.
Definition ast.h:1809
pm_block_node::opening_loc
pm_location_t opening_loc
BlockNode::opening_loc.
Definition ast.h:1829
pm_block_node::body
struct pm_node * body
BlockNode::body.
Definition ast.h:1819
pm_block_node::locals
pm_constant_id_list_t locals
BlockNode::locals.
Definition ast.h:1795
pm_block_parameter_node::operator_loc
pm_location_t operator_loc
BlockParameterNode::operator_loc.
Definition ast.h:1893
pm_block_parameter_node::name_loc
pm_location_t name_loc
BlockParameterNode::name_loc.
Definition ast.h:1882
pm_block_parameter_node::name
pm_constant_id_t name
BlockParameterNode::name.
Definition ast.h:1872
pm_block_parameters_node::parameters
struct pm_parameters_node * parameters
BlockParametersNode::parameters.
Definition ast.h:1929
pm_block_parameters_node::locals
struct pm_node_list locals
BlockParametersNode::locals.
Definition ast.h:1943
pm_block_parameters_node::closing_loc
pm_location_t closing_loc
BlockParametersNode::closing_loc.
Definition ast.h:1971
pm_block_parameters_node::opening_loc
pm_location_t opening_loc
BlockParametersNode::opening_loc.
Definition ast.h:1957
pm_break_node::arguments
struct pm_arguments_node * arguments
BreakNode::arguments.
Definition ast.h:1999
pm_break_node::keyword_loc
pm_location_t keyword_loc
BreakNode::keyword_loc.
Definition ast.h:2009
pm_call_and_write_node::operator_loc
pm_location_t operator_loc
CallAndWriteNode::operator_loc.
Definition ast.h:2093
pm_call_and_write_node::value
struct pm_node * value
CallAndWriteNode::value.
Definition ast.h:2103
pm_call_and_write_node::call_operator_loc
pm_location_t call_operator_loc
CallAndWriteNode::call_operator_loc.
Definition ast.h:2053
pm_call_and_write_node::message_loc
pm_location_t message_loc
CallAndWriteNode::message_loc.
Definition ast.h:2063
pm_call_and_write_node::read_name
pm_constant_id_t read_name
CallAndWriteNode::read_name.
Definition ast.h:2073
pm_call_and_write_node::write_name
pm_constant_id_t write_name
CallAndWriteNode::write_name.
Definition ast.h:2083
pm_call_and_write_node::receiver
struct pm_node * receiver
CallAndWriteNode::receiver.
Definition ast.h:2043
pm_call_node::opening_loc
pm_location_t opening_loc
CallNode::opening_loc.
Definition ast.h:2200
pm_call_node::closing_loc
pm_location_t closing_loc
CallNode::closing_loc.
Definition ast.h:2220
pm_call_node::receiver
struct pm_node * receiver
CallNode::receiver.
Definition ast.h:2158
pm_call_node::name
pm_constant_id_t name
CallNode::name.
Definition ast.h:2181
pm_call_node::equal_loc
pm_location_t equal_loc
CallNode::equal_loc.
Definition ast.h:2233
pm_call_node::call_operator_loc
pm_location_t call_operator_loc
CallNode::call_operator_loc.
Definition ast.h:2171
pm_call_node::message_loc
pm_location_t message_loc
CallNode::message_loc.
Definition ast.h:2191
pm_call_node::arguments
struct pm_arguments_node * arguments
CallNode::arguments.
Definition ast.h:2210
pm_call_node::block
struct pm_node * block
CallNode::block.
Definition ast.h:2243
pm_call_operator_write_node::read_name
pm_constant_id_t read_name
CallOperatorWriteNode::read_name.
Definition ast.h:2307
pm_call_operator_write_node::binary_operator
pm_constant_id_t binary_operator
CallOperatorWriteNode::binary_operator.
Definition ast.h:2327
pm_call_operator_write_node::binary_operator_loc
pm_location_t binary_operator_loc
CallOperatorWriteNode::binary_operator_loc.
Definition ast.h:2337
pm_call_operator_write_node::receiver
struct pm_node * receiver
CallOperatorWriteNode::receiver.
Definition ast.h:2277
pm_call_operator_write_node::write_name
pm_constant_id_t write_name
CallOperatorWriteNode::write_name.
Definition ast.h:2317
pm_call_operator_write_node::message_loc
pm_location_t message_loc
CallOperatorWriteNode::message_loc.
Definition ast.h:2297
pm_call_operator_write_node::value
struct pm_node * value
CallOperatorWriteNode::value.
Definition ast.h:2347
pm_call_operator_write_node::call_operator_loc
pm_location_t call_operator_loc
CallOperatorWriteNode::call_operator_loc.
Definition ast.h:2287
pm_call_or_write_node::operator_loc
pm_location_t operator_loc
CallOrWriteNode::operator_loc.
Definition ast.h:2431
pm_call_or_write_node::call_operator_loc
pm_location_t call_operator_loc
CallOrWriteNode::call_operator_loc.
Definition ast.h:2391
pm_call_or_write_node::receiver
struct pm_node * receiver
CallOrWriteNode::receiver.
Definition ast.h:2381
pm_call_or_write_node::value
struct pm_node * value
CallOrWriteNode::value.
Definition ast.h:2441
pm_call_or_write_node::write_name
pm_constant_id_t write_name
CallOrWriteNode::write_name.
Definition ast.h:2421
pm_call_or_write_node::read_name
pm_constant_id_t read_name
CallOrWriteNode::read_name.
Definition ast.h:2411
pm_call_or_write_node::message_loc
pm_location_t message_loc
CallOrWriteNode::message_loc.
Definition ast.h:2401
pm_call_target_node::name
pm_constant_id_t name
CallTargetNode::name.
Definition ast.h:2503
pm_call_target_node::receiver
struct pm_node * receiver
CallTargetNode::receiver.
Definition ast.h:2483
pm_call_target_node::call_operator_loc
pm_location_t call_operator_loc
CallTargetNode::call_operator_loc.
Definition ast.h:2493
pm_call_target_node::message_loc
pm_location_t message_loc
CallTargetNode::message_loc.
Definition ast.h:2513
pm_capture_pattern_node::target
struct pm_local_variable_target_node * target
CapturePatternNode::target.
Definition ast.h:2551
pm_capture_pattern_node::operator_loc
pm_location_t operator_loc
CapturePatternNode::operator_loc.
Definition ast.h:2561
pm_capture_pattern_node::value
struct pm_node * value
CapturePatternNode::value.
Definition ast.h:2541
pm_case_match_node::end_keyword_loc
pm_location_t end_keyword_loc
CaseMatchNode::end_keyword_loc.
Definition ast.h:2631
pm_case_match_node::conditions
struct pm_node_list conditions
CaseMatchNode::conditions.
Definition ast.h:2601
pm_case_match_node::case_keyword_loc
pm_location_t case_keyword_loc
CaseMatchNode::case_keyword_loc.
Definition ast.h:2621
pm_case_match_node::else_clause
struct pm_else_node * else_clause
CaseMatchNode::else_clause.
Definition ast.h:2611
pm_case_match_node::predicate
struct pm_node * predicate
CaseMatchNode::predicate.
Definition ast.h:2591
pm_case_node::predicate
struct pm_node * predicate
CaseNode::predicate.
Definition ast.h:2661
pm_case_node::else_clause
struct pm_else_node * else_clause
CaseNode::else_clause.
Definition ast.h:2681
pm_case_node::conditions
struct pm_node_list conditions
CaseNode::conditions.
Definition ast.h:2671
pm_case_node::case_keyword_loc
pm_location_t case_keyword_loc
CaseNode::case_keyword_loc.
Definition ast.h:2691
pm_case_node::end_keyword_loc
pm_location_t end_keyword_loc
CaseNode::end_keyword_loc.
Definition ast.h:2701
pm_class_node::class_keyword_loc
pm_location_t class_keyword_loc
ClassNode::class_keyword_loc.
Definition ast.h:2734
pm_class_node::end_keyword_loc
pm_location_t end_keyword_loc
ClassNode::end_keyword_loc.
Definition ast.h:2780
pm_class_node::constant_path
struct pm_node * constant_path
ClassNode::constant_path.
Definition ast.h:2739
pm_class_node::locals
pm_constant_id_list_t locals
ClassNode::locals.
Definition ast.h:2724
pm_class_node::inheritance_operator_loc
pm_location_t inheritance_operator_loc
ClassNode::inheritance_operator_loc.
Definition ast.h:2749
pm_class_node::name
pm_constant_id_t name
ClassNode::name.
Definition ast.h:2789
pm_class_node::body
struct pm_node * body
ClassNode::body.
Definition ast.h:2770
pm_class_node::superclass
struct pm_node * superclass
ClassNode::superclass.
Definition ast.h:2759
pm_class_variable_and_write_node::value
struct pm_node * value
ClassVariableAndWriteNode::value.
Definition ast.h:2847
pm_class_variable_and_write_node::name
pm_constant_id_t name
ClassVariableAndWriteNode::name.
Definition ast.h:2817
pm_class_variable_and_write_node::operator_loc
pm_location_t operator_loc
ClassVariableAndWriteNode::operator_loc.
Definition ast.h:2837
pm_class_variable_and_write_node::name_loc
pm_location_t name_loc
ClassVariableAndWriteNode::name_loc.
Definition ast.h:2827
pm_class_variable_operator_write_node::name
pm_constant_id_t name
ClassVariableOperatorWriteNode::name.
Definition ast.h:2870
pm_class_variable_operator_write_node::name_loc
pm_location_t name_loc
ClassVariableOperatorWriteNode::name_loc.
Definition ast.h:2875
pm_class_variable_operator_write_node::binary_operator
pm_constant_id_t binary_operator
ClassVariableOperatorWriteNode::binary_operator.
Definition ast.h:2890
pm_class_variable_operator_write_node::value
struct pm_node * value
ClassVariableOperatorWriteNode::value.
Definition ast.h:2885
pm_class_variable_operator_write_node::binary_operator_loc
pm_location_t binary_operator_loc
ClassVariableOperatorWriteNode::binary_operator_loc.
Definition ast.h:2880
pm_class_variable_or_write_node::name_loc
pm_location_t name_loc
ClassVariableOrWriteNode::name_loc.
Definition ast.h:2918
pm_class_variable_or_write_node::operator_loc
pm_location_t operator_loc
ClassVariableOrWriteNode::operator_loc.
Definition ast.h:2923
pm_class_variable_or_write_node::name
pm_constant_id_t name
ClassVariableOrWriteNode::name.
Definition ast.h:2913
pm_class_variable_or_write_node::value
struct pm_node * value
ClassVariableOrWriteNode::value.
Definition ast.h:2928
pm_class_variable_read_node::name
pm_constant_id_t name
ClassVariableReadNode::name.
Definition ast.h:2957
pm_class_variable_target_node::name
pm_constant_id_t name
ClassVariableTargetNode::name.
Definition ast.h:2980
pm_class_variable_write_node::name_loc
pm_location_t name_loc
ClassVariableWriteNode::name_loc.
Definition ast.h:3019
pm_class_variable_write_node::value
struct pm_node * value
ClassVariableWriteNode::value.
Definition ast.h:3032
pm_class_variable_write_node::operator_loc
pm_location_t operator_loc
ClassVariableWriteNode::operator_loc.
Definition ast.h:3042
pm_class_variable_write_node::name
pm_constant_id_t name
ClassVariableWriteNode::name.
Definition ast.h:3009
pm_constant_and_write_node::operator_loc
pm_location_t operator_loc
ConstantAndWriteNode::operator_loc.
Definition ast.h:3075
pm_constant_and_write_node::name_loc
pm_location_t name_loc
ConstantAndWriteNode::name_loc.
Definition ast.h:3070
pm_constant_and_write_node::name
pm_constant_id_t name
ConstantAndWriteNode::name.
Definition ast.h:3065
pm_constant_and_write_node::value
struct pm_node * value
ConstantAndWriteNode::value.
Definition ast.h:3080
pm_constant_id_list_t::size
size_t size
The number of constant ids in the list.
Definition pm_constant_pool.h:38
pm_constant_id_list_t::ids
pm_constant_id_t * ids
The constant ids in the list.
Definition pm_constant_pool.h:44
pm_constant_operator_write_node::name
pm_constant_id_t name
ConstantOperatorWriteNode::name.
Definition ast.h:3103
pm_constant_operator_write_node::name_loc
pm_location_t name_loc
ConstantOperatorWriteNode::name_loc.
Definition ast.h:3108
pm_constant_operator_write_node::binary_operator
pm_constant_id_t binary_operator
ConstantOperatorWriteNode::binary_operator.
Definition ast.h:3123
pm_constant_operator_write_node::binary_operator_loc
pm_location_t binary_operator_loc
ConstantOperatorWriteNode::binary_operator_loc.
Definition ast.h:3113
pm_constant_operator_write_node::value
struct pm_node * value
ConstantOperatorWriteNode::value.
Definition ast.h:3118
pm_constant_or_write_node::operator_loc
pm_location_t operator_loc
ConstantOrWriteNode::operator_loc.
Definition ast.h:3156
pm_constant_or_write_node::name_loc
pm_location_t name_loc
ConstantOrWriteNode::name_loc.
Definition ast.h:3151
pm_constant_or_write_node::name
pm_constant_id_t name
ConstantOrWriteNode::name.
Definition ast.h:3146
pm_constant_or_write_node::value
struct pm_node * value
ConstantOrWriteNode::value.
Definition ast.h:3161
pm_constant_path_and_write_node::target
struct pm_constant_path_node * target
ConstantPathAndWriteNode::target.
Definition ast.h:3184
pm_constant_path_and_write_node::operator_loc
pm_location_t operator_loc
ConstantPathAndWriteNode::operator_loc.
Definition ast.h:3189
pm_constant_path_and_write_node::value
struct pm_node * value
ConstantPathAndWriteNode::value.
Definition ast.h:3194
pm_constant_path_node::delimiter_loc
pm_location_t delimiter_loc
ConstantPathNode::delimiter_loc.
Definition ast.h:3248
pm_constant_path_node::name_loc
pm_location_t name_loc
ConstantPathNode::name_loc.
Definition ast.h:3261
pm_constant_path_node::name
pm_constant_id_t name
ConstantPathNode::name.
Definition ast.h:3235
pm_constant_path_node::parent
struct pm_node * parent
ConstantPathNode::parent.
Definition ast.h:3228
pm_constant_path_operator_write_node::target
struct pm_constant_path_node * target
ConstantPathOperatorWriteNode::target.
Definition ast.h:3284
pm_constant_path_operator_write_node::value
struct pm_node * value
ConstantPathOperatorWriteNode::value.
Definition ast.h:3294
pm_constant_path_operator_write_node::binary_operator
pm_constant_id_t binary_operator
ConstantPathOperatorWriteNode::binary_operator.
Definition ast.h:3299
pm_constant_path_operator_write_node::binary_operator_loc
pm_location_t binary_operator_loc
ConstantPathOperatorWriteNode::binary_operator_loc.
Definition ast.h:3289
pm_constant_path_or_write_node::operator_loc
pm_location_t operator_loc
ConstantPathOrWriteNode::operator_loc.
Definition ast.h:3327
pm_constant_path_or_write_node::value
struct pm_node * value
ConstantPathOrWriteNode::value.
Definition ast.h:3332
pm_constant_path_or_write_node::target
struct pm_constant_path_node * target
ConstantPathOrWriteNode::target.
Definition ast.h:3322
pm_constant_path_target_node::parent
struct pm_node * parent
ConstantPathTargetNode::parent.
Definition ast.h:3355
pm_constant_path_target_node::delimiter_loc
pm_location_t delimiter_loc
ConstantPathTargetNode::delimiter_loc.
Definition ast.h:3365
pm_constant_path_target_node::name
pm_constant_id_t name
ConstantPathTargetNode::name.
Definition ast.h:3360
pm_constant_path_target_node::name_loc
pm_location_t name_loc
ConstantPathTargetNode::name_loc.
Definition ast.h:3370
pm_constant_path_write_node::target
struct pm_constant_path_node * target
ConstantPathWriteNode::target.
Definition ast.h:3407
pm_constant_path_write_node::operator_loc
pm_location_t operator_loc
ConstantPathWriteNode::operator_loc.
Definition ast.h:3417
pm_constant_path_write_node::value
struct pm_node * value
ConstantPathWriteNode::value.
Definition ast.h:3427
pm_constant_pool_t::size
uint32_t size
The number of buckets in the hash map.
Definition pm_constant_pool.h:142
pm_constant_pool_t::constants
pm_constant_t * constants
The constants that are stored in the buckets.
Definition pm_constant_pool.h:139
pm_constant_read_node::name
pm_constant_id_t name
ConstantReadNode::name.
Definition ast.h:3456
pm_constant_t
A constant in the pool which effectively stores a string.
Definition pm_constant_pool.h:125
pm_constant_t::length
size_t length
The length of the string.
Definition pm_constant_pool.h:130
pm_constant_t::start
const uint8_t * start
A pointer to the start of the string.
Definition pm_constant_pool.h:127
pm_constant_target_node::name
pm_constant_id_t name
ConstantTargetNode::name.
Definition ast.h:3479
pm_constant_write_node::value
struct pm_node * value
ConstantWriteNode::value.
Definition ast.h:3531
pm_constant_write_node::name
pm_constant_id_t name
ConstantWriteNode::name.
Definition ast.h:3508
pm_constant_write_node::name_loc
pm_location_t name_loc
ConstantWriteNode::name_loc.
Definition ast.h:3518
pm_constant_write_node::operator_loc
pm_location_t operator_loc
ConstantWriteNode::operator_loc.
Definition ast.h:3541
pm_def_node::parameters
struct pm_parameters_node * parameters
DefNode::parameters.
Definition ast.h:3580
pm_def_node::end_keyword_loc
pm_location_t end_keyword_loc
DefNode::end_keyword_loc.
Definition ast.h:3620
pm_def_node::name
pm_constant_id_t name
DefNode::name.
Definition ast.h:3565
pm_def_node::name_loc
pm_location_t name_loc
DefNode::name_loc.
Definition ast.h:3570
pm_def_node::rparen_loc
pm_location_t rparen_loc
DefNode::rparen_loc.
Definition ast.h:3610
pm_def_node::body
struct pm_node * body
DefNode::body.
Definition ast.h:3585
pm_def_node::equal_loc
pm_location_t equal_loc
DefNode::equal_loc.
Definition ast.h:3615
pm_def_node::def_keyword_loc
pm_location_t def_keyword_loc
DefNode::def_keyword_loc.
Definition ast.h:3595
pm_def_node::receiver
struct pm_node * receiver
DefNode::receiver.
Definition ast.h:3575
pm_def_node::lparen_loc
pm_location_t lparen_loc
DefNode::lparen_loc.
Definition ast.h:3605
pm_def_node::operator_loc
pm_location_t operator_loc
DefNode::operator_loc.
Definition ast.h:3600
pm_def_node::locals
pm_constant_id_list_t locals
DefNode::locals.
Definition ast.h:3590
pm_defined_node::lparen_loc
pm_location_t lparen_loc
DefinedNode::lparen_loc.
Definition ast.h:3643
pm_defined_node::rparen_loc
pm_location_t rparen_loc
DefinedNode::rparen_loc.
Definition ast.h:3653
pm_defined_node::keyword_loc
pm_location_t keyword_loc
DefinedNode::keyword_loc.
Definition ast.h:3658
pm_defined_node::value
struct pm_node * value
DefinedNode::value.
Definition ast.h:3648
pm_else_node::statements
struct pm_statements_node * statements
ElseNode::statements.
Definition ast.h:3686
pm_else_node::else_keyword_loc
pm_location_t else_keyword_loc
ElseNode::else_keyword_loc.
Definition ast.h:3681
pm_else_node::end_keyword_loc
pm_location_t end_keyword_loc
ElseNode::end_keyword_loc.
Definition ast.h:3691
pm_embedded_statements_node::closing_loc
pm_location_t closing_loc
EmbeddedStatementsNode::closing_loc.
Definition ast.h:3724
pm_embedded_statements_node::statements
struct pm_statements_node * statements
EmbeddedStatementsNode::statements.
Definition ast.h:3719
pm_embedded_statements_node::opening_loc
pm_location_t opening_loc
EmbeddedStatementsNode::opening_loc.
Definition ast.h:3714
pm_embedded_variable_node::variable
struct pm_node * variable
EmbeddedVariableNode::variable.
Definition ast.h:3752
pm_embedded_variable_node::operator_loc
pm_location_t operator_loc
EmbeddedVariableNode::operator_loc.
Definition ast.h:3747
pm_ensure_node::statements
struct pm_statements_node * statements
EnsureNode::statements.
Definition ast.h:3784
pm_ensure_node::ensure_keyword_loc
pm_location_t ensure_keyword_loc
EnsureNode::ensure_keyword_loc.
Definition ast.h:3779
pm_ensure_node::end_keyword_loc
pm_location_t end_keyword_loc
EnsureNode::end_keyword_loc.
Definition ast.h:3789
pm_find_pattern_node::constant
struct pm_node * constant
FindPatternNode::constant.
Definition ast.h:3844
pm_find_pattern_node::right
struct pm_node * right
FindPatternNode::right.
Definition ast.h:3883
pm_find_pattern_node::opening_loc
pm_location_t opening_loc
FindPatternNode::opening_loc.
Definition ast.h:3896
pm_find_pattern_node::requireds
struct pm_node_list requireds
FindPatternNode::requireds.
Definition ast.h:3870
pm_find_pattern_node::left
struct pm_splat_node * left
FindPatternNode::left.
Definition ast.h:3857
pm_find_pattern_node::closing_loc
pm_location_t closing_loc
FindPatternNode::closing_loc.
Definition ast.h:3909
pm_flip_flop_node::operator_loc
pm_location_t operator_loc
FlipFlopNode::operator_loc.
Definition ast.h:3945
pm_flip_flop_node::left
struct pm_node * left
FlipFlopNode::left.
Definition ast.h:3935
pm_flip_flop_node::right
struct pm_node * right
FlipFlopNode::right.
Definition ast.h:3940
pm_float_node::value
double value
FloatNode::value.
Definition ast.h:3970
pm_for_node::statements
struct pm_statements_node * statements
ForNode::statements.
Definition ast.h:4020
pm_for_node::index
struct pm_node * index
ForNode::index.
Definition ast.h:3998
pm_for_node::collection
struct pm_node * collection
ForNode::collection.
Definition ast.h:4008
pm_for_node::end_keyword_loc
pm_location_t end_keyword_loc
ForNode::end_keyword_loc.
Definition ast.h:4060
pm_for_node::for_keyword_loc
pm_location_t for_keyword_loc
ForNode::for_keyword_loc.
Definition ast.h:4030
pm_for_node::do_keyword_loc
pm_location_t do_keyword_loc
ForNode::do_keyword_loc.
Definition ast.h:4050
pm_for_node::in_keyword_loc
pm_location_t in_keyword_loc
ForNode::in_keyword_loc.
Definition ast.h:4040
pm_forwarding_super_node::block
struct pm_block_node * block
ForwardingSuperNode::block.
Definition ast.h:4129
pm_global_variable_and_write_node::operator_loc
pm_location_t operator_loc
GlobalVariableAndWriteNode::operator_loc.
Definition ast.h:4162
pm_global_variable_and_write_node::name_loc
pm_location_t name_loc
GlobalVariableAndWriteNode::name_loc.
Definition ast.h:4157
pm_global_variable_and_write_node::value
struct pm_node * value
GlobalVariableAndWriteNode::value.
Definition ast.h:4167
pm_global_variable_and_write_node::name
pm_constant_id_t name
GlobalVariableAndWriteNode::name.
Definition ast.h:4152
pm_global_variable_operator_write_node::name
pm_constant_id_t name
GlobalVariableOperatorWriteNode::name.
Definition ast.h:4190
pm_global_variable_operator_write_node::binary_operator
pm_constant_id_t binary_operator
GlobalVariableOperatorWriteNode::binary_operator.
Definition ast.h:4210
pm_global_variable_operator_write_node::value
struct pm_node * value
GlobalVariableOperatorWriteNode::value.
Definition ast.h:4205
pm_global_variable_operator_write_node::name_loc
pm_location_t name_loc
GlobalVariableOperatorWriteNode::name_loc.
Definition ast.h:4195
pm_global_variable_operator_write_node::binary_operator_loc
pm_location_t binary_operator_loc
GlobalVariableOperatorWriteNode::binary_operator_loc.
Definition ast.h:4200
pm_global_variable_or_write_node::name
pm_constant_id_t name
GlobalVariableOrWriteNode::name.
Definition ast.h:4233
pm_global_variable_or_write_node::name_loc
pm_location_t name_loc
GlobalVariableOrWriteNode::name_loc.
Definition ast.h:4238
pm_global_variable_or_write_node::operator_loc
pm_location_t operator_loc
GlobalVariableOrWriteNode::operator_loc.
Definition ast.h:4243
pm_global_variable_or_write_node::value
struct pm_node * value
GlobalVariableOrWriteNode::value.
Definition ast.h:4248
pm_global_variable_read_node::name
pm_constant_id_t name
GlobalVariableReadNode::name.
Definition ast.h:4277
pm_global_variable_target_node::name
pm_constant_id_t name
GlobalVariableTargetNode::name.
Definition ast.h:4300
pm_global_variable_write_node::value
struct pm_node * value
GlobalVariableWriteNode::value.
Definition ast.h:4352
pm_global_variable_write_node::name_loc
pm_location_t name_loc
GlobalVariableWriteNode::name_loc.
Definition ast.h:4339
pm_global_variable_write_node::operator_loc
pm_location_t operator_loc
GlobalVariableWriteNode::operator_loc.
Definition ast.h:4362
pm_global_variable_write_node::name
pm_constant_id_t name
GlobalVariableWriteNode::name.
Definition ast.h:4329
pm_hash_node::elements
struct pm_node_list elements
HashNode::elements.
Definition ast.h:4403
pm_hash_node::closing_loc
pm_location_t closing_loc
HashNode::closing_loc.
Definition ast.h:4413
pm_hash_node::opening_loc
pm_location_t opening_loc
HashNode::opening_loc.
Definition ast.h:4390
pm_hash_pattern_node::elements
struct pm_node_list elements
HashPatternNode::elements.
Definition ast.h:4463
pm_hash_pattern_node::opening_loc
pm_location_t opening_loc
HashPatternNode::opening_loc.
Definition ast.h:4492
pm_hash_pattern_node::rest
struct pm_node * rest
HashPatternNode::rest.
Definition ast.h:4479
pm_hash_pattern_node::closing_loc
pm_location_t closing_loc
HashPatternNode::closing_loc.
Definition ast.h:4505
pm_hash_pattern_node::constant
struct pm_node * constant
HashPatternNode::constant.
Definition ast.h:4453
pm_if_node::predicate
struct pm_node * predicate
IfNode::predicate.
Definition ast.h:4559
pm_if_node::end_keyword_loc
pm_location_t end_keyword_loc
IfNode::end_keyword_loc.
Definition ast.h:4617
pm_if_node::if_keyword_loc
pm_location_t if_keyword_loc
IfNode::if_keyword_loc.
Definition ast.h:4541
pm_if_node::statements
struct pm_statements_node * statements
IfNode::statements.
Definition ast.h:4586
pm_if_node::subsequent
struct pm_node * subsequent
IfNode::subsequent.
Definition ast.h:4605
pm_if_node::then_keyword_loc
pm_location_t then_keyword_loc
IfNode::then_keyword_loc.
Definition ast.h:4572
pm_imaginary_node::numeric
struct pm_node * numeric
ImaginaryNode::numeric.
Definition ast.h:4640
pm_implicit_node::value
struct pm_node * value
ImplicitNode::value.
Definition ast.h:4669
pm_in_node::statements
struct pm_statements_node * statements
InNode::statements.
Definition ast.h:4724
pm_in_node::pattern
struct pm_node * pattern
InNode::pattern.
Definition ast.h:4719
pm_in_node::then_loc
pm_location_t then_loc
InNode::then_loc.
Definition ast.h:4734
pm_in_node::in_loc
pm_location_t in_loc
InNode::in_loc.
Definition ast.h:4729
pm_index_and_write_node::arguments
struct pm_arguments_node * arguments
IndexAndWriteNode::arguments.
Definition ast.h:4778
pm_index_and_write_node::receiver
struct pm_node * receiver
IndexAndWriteNode::receiver.
Definition ast.h:4763
pm_index_and_write_node::block
struct pm_block_argument_node * block
IndexAndWriteNode::block.
Definition ast.h:4788
pm_index_and_write_node::value
struct pm_node * value
IndexAndWriteNode::value.
Definition ast.h:4798
pm_index_and_write_node::operator_loc
pm_location_t operator_loc
IndexAndWriteNode::operator_loc.
Definition ast.h:4793
pm_index_and_write_node::closing_loc
pm_location_t closing_loc
IndexAndWriteNode::closing_loc.
Definition ast.h:4783
pm_index_and_write_node::opening_loc
pm_location_t opening_loc
IndexAndWriteNode::opening_loc.
Definition ast.h:4773
pm_index_and_write_node::call_operator_loc
pm_location_t call_operator_loc
IndexAndWriteNode::call_operator_loc.
Definition ast.h:4768
pm_index_operator_write_node::block
struct pm_block_argument_node * block
IndexOperatorWriteNode::block.
Definition ast.h:4852
pm_index_operator_write_node::binary_operator_loc
pm_location_t binary_operator_loc
IndexOperatorWriteNode::binary_operator_loc.
Definition ast.h:4862
pm_index_operator_write_node::value
struct pm_node * value
IndexOperatorWriteNode::value.
Definition ast.h:4867
pm_index_operator_write_node::opening_loc
pm_location_t opening_loc
IndexOperatorWriteNode::opening_loc.
Definition ast.h:4837
pm_index_operator_write_node::call_operator_loc
pm_location_t call_operator_loc
IndexOperatorWriteNode::call_operator_loc.
Definition ast.h:4832
pm_index_operator_write_node::closing_loc
pm_location_t closing_loc
IndexOperatorWriteNode::closing_loc.
Definition ast.h:4847
pm_index_operator_write_node::arguments
struct pm_arguments_node * arguments
IndexOperatorWriteNode::arguments.
Definition ast.h:4842
pm_index_operator_write_node::binary_operator
pm_constant_id_t binary_operator
IndexOperatorWriteNode::binary_operator.
Definition ast.h:4857
pm_index_operator_write_node::receiver
struct pm_node * receiver
IndexOperatorWriteNode::receiver.
Definition ast.h:4827
pm_index_or_write_node::closing_loc
pm_location_t closing_loc
IndexOrWriteNode::closing_loc.
Definition ast.h:4916
pm_index_or_write_node::call_operator_loc
pm_location_t call_operator_loc
IndexOrWriteNode::call_operator_loc.
Definition ast.h:4901
pm_index_or_write_node::block
struct pm_block_argument_node * block
IndexOrWriteNode::block.
Definition ast.h:4921
pm_index_or_write_node::operator_loc
pm_location_t operator_loc
IndexOrWriteNode::operator_loc.
Definition ast.h:4926
pm_index_or_write_node::receiver
struct pm_node * receiver
IndexOrWriteNode::receiver.
Definition ast.h:4896
pm_index_or_write_node::opening_loc
pm_location_t opening_loc
IndexOrWriteNode::opening_loc.
Definition ast.h:4906
pm_index_or_write_node::value
struct pm_node * value
IndexOrWriteNode::value.
Definition ast.h:4931
pm_index_or_write_node::arguments
struct pm_arguments_node * arguments
IndexOrWriteNode::arguments.
Definition ast.h:4911
pm_index_target_node::receiver
struct pm_node * receiver
IndexTargetNode::receiver.
Definition ast.h:4968
pm_index_target_node::closing_loc
pm_location_t closing_loc
IndexTargetNode::closing_loc.
Definition ast.h:4983
pm_index_target_node::arguments
struct pm_arguments_node * arguments
IndexTargetNode::arguments.
Definition ast.h:4978
pm_index_target_node::opening_loc
pm_location_t opening_loc
IndexTargetNode::opening_loc.
Definition ast.h:4973
pm_index_target_node::block
struct pm_block_argument_node * block
IndexTargetNode::block.
Definition ast.h:4988
pm_instance_variable_and_write_node::operator_loc
pm_location_t operator_loc
InstanceVariableAndWriteNode::operator_loc.
Definition ast.h:5021
pm_instance_variable_and_write_node::name_loc
pm_location_t name_loc
InstanceVariableAndWriteNode::name_loc.
Definition ast.h:5016
pm_instance_variable_and_write_node::value
struct pm_node * value
InstanceVariableAndWriteNode::value.
Definition ast.h:5026
pm_instance_variable_and_write_node::name
pm_constant_id_t name
InstanceVariableAndWriteNode::name.
Definition ast.h:5011
pm_instance_variable_operator_write_node::value
struct pm_node * value
InstanceVariableOperatorWriteNode::value.
Definition ast.h:5064
pm_instance_variable_operator_write_node::binary_operator
pm_constant_id_t binary_operator
InstanceVariableOperatorWriteNode::binary_operator.
Definition ast.h:5069
pm_instance_variable_operator_write_node::binary_operator_loc
pm_location_t binary_operator_loc
InstanceVariableOperatorWriteNode::binary_operator_loc.
Definition ast.h:5059
pm_instance_variable_operator_write_node::name
pm_constant_id_t name
InstanceVariableOperatorWriteNode::name.
Definition ast.h:5049
pm_instance_variable_operator_write_node::name_loc
pm_location_t name_loc
InstanceVariableOperatorWriteNode::name_loc.
Definition ast.h:5054
pm_instance_variable_or_write_node::operator_loc
pm_location_t operator_loc
InstanceVariableOrWriteNode::operator_loc.
Definition ast.h:5102
pm_instance_variable_or_write_node::value
struct pm_node * value
InstanceVariableOrWriteNode::value.
Definition ast.h:5107
pm_instance_variable_or_write_node::name_loc
pm_location_t name_loc
InstanceVariableOrWriteNode::name_loc.
Definition ast.h:5097
pm_instance_variable_or_write_node::name
pm_constant_id_t name
InstanceVariableOrWriteNode::name.
Definition ast.h:5092
pm_instance_variable_read_node::name
pm_constant_id_t name
InstanceVariableReadNode::name.
Definition ast.h:5136
pm_instance_variable_target_node::name
pm_constant_id_t name
InstanceVariableTargetNode::name.
Definition ast.h:5159
pm_instance_variable_write_node::operator_loc
pm_location_t operator_loc
InstanceVariableWriteNode::operator_loc.
Definition ast.h:5221
pm_instance_variable_write_node::name
pm_constant_id_t name
InstanceVariableWriteNode::name.
Definition ast.h:5188
pm_instance_variable_write_node::value
struct pm_node * value
InstanceVariableWriteNode::value.
Definition ast.h:5211
pm_instance_variable_write_node::name_loc
pm_location_t name_loc
InstanceVariableWriteNode::name_loc.
Definition ast.h:5198
pm_integer_node::value
pm_integer_t value
IntegerNode::value.
Definition ast.h:5252
pm_integer_t
A structure represents an arbitrary-sized integer.
Definition pm_integer.h:20
pm_integer_t::length
size_t length
The number of allocated values.
Definition pm_integer.h:25
pm_integer_t::value
uint32_t value
Embedded value for small integer.
Definition pm_integer.h:36
pm_integer_t::values
uint32_t * values
List of 32-bit integers.
Definition pm_integer.h:30
pm_integer_t::negative
bool negative
Whether or not the integer is negative.
Definition pm_integer.h:42
pm_interpolated_match_last_line_node::closing_loc
pm_location_t closing_loc
InterpolatedMatchLastLineNode::closing_loc.
Definition ast.h:5298
pm_interpolated_match_last_line_node::parts
struct pm_node_list parts
InterpolatedMatchLastLineNode::parts.
Definition ast.h:5293
pm_interpolated_match_last_line_node::opening_loc
pm_location_t opening_loc
InterpolatedMatchLastLineNode::opening_loc.
Definition ast.h:5288
pm_interpolated_regular_expression_node::opening_loc
pm_location_t opening_loc
InterpolatedRegularExpressionNode::opening_loc.
Definition ast.h:5334
pm_interpolated_regular_expression_node::parts
struct pm_node_list parts
InterpolatedRegularExpressionNode::parts.
Definition ast.h:5339
pm_interpolated_regular_expression_node::closing_loc
pm_location_t closing_loc
InterpolatedRegularExpressionNode::closing_loc.
Definition ast.h:5344
pm_interpolated_string_node::closing_loc
pm_location_t closing_loc
InterpolatedStringNode::closing_loc.
Definition ast.h:5381
pm_interpolated_string_node::opening_loc
pm_location_t opening_loc
InterpolatedStringNode::opening_loc.
Definition ast.h:5371
pm_interpolated_string_node::parts
struct pm_node_list parts
InterpolatedStringNode::parts.
Definition ast.h:5376
pm_interpolated_symbol_node::parts
struct pm_node_list parts
InterpolatedSymbolNode::parts.
Definition ast.h:5409
pm_interpolated_symbol_node::closing_loc
pm_location_t closing_loc
InterpolatedSymbolNode::closing_loc.
Definition ast.h:5414
pm_interpolated_symbol_node::opening_loc
pm_location_t opening_loc
InterpolatedSymbolNode::opening_loc.
Definition ast.h:5404
pm_interpolated_x_string_node::opening_loc
pm_location_t opening_loc
InterpolatedXStringNode::opening_loc.
Definition ast.h:5437
pm_interpolated_x_string_node::closing_loc
pm_location_t closing_loc
InterpolatedXStringNode::closing_loc.
Definition ast.h:5447
pm_interpolated_x_string_node::parts
struct pm_node_list parts
InterpolatedXStringNode::parts.
Definition ast.h:5442
pm_keyword_hash_node::elements
struct pm_node_list elements
KeywordHashNode::elements.
Definition ast.h:5509
pm_keyword_rest_parameter_node::name
pm_constant_id_t name
KeywordRestParameterNode::name.
Definition ast.h:5536
pm_keyword_rest_parameter_node::operator_loc
pm_location_t operator_loc
KeywordRestParameterNode::operator_loc.
Definition ast.h:5546
pm_keyword_rest_parameter_node::name_loc
pm_location_t name_loc
KeywordRestParameterNode::name_loc.
Definition ast.h:5541
pm_lambda_node::closing_loc
pm_location_t closing_loc
LambdaNode::closing_loc.
Definition ast.h:5584
pm_lambda_node::body
struct pm_node * body
LambdaNode::body.
Definition ast.h:5594
pm_lambda_node::opening_loc
pm_location_t opening_loc
LambdaNode::opening_loc.
Definition ast.h:5579
pm_lambda_node::parameters
struct pm_node * parameters
LambdaNode::parameters.
Definition ast.h:5589
pm_lambda_node::operator_loc
pm_location_t operator_loc
LambdaNode::operator_loc.
Definition ast.h:5574
pm_lambda_node::locals
pm_constant_id_list_t locals
LambdaNode::locals.
Definition ast.h:5569
pm_local_variable_and_write_node::name
pm_constant_id_t name
LocalVariableAndWriteNode::name.
Definition ast.h:5632
pm_local_variable_and_write_node::depth
uint32_t depth
LocalVariableAndWriteNode::depth.
Definition ast.h:5637
pm_local_variable_and_write_node::operator_loc
pm_location_t operator_loc
LocalVariableAndWriteNode::operator_loc.
Definition ast.h:5622
pm_local_variable_and_write_node::value
struct pm_node * value
LocalVariableAndWriteNode::value.
Definition ast.h:5627
pm_local_variable_and_write_node::name_loc
pm_location_t name_loc
LocalVariableAndWriteNode::name_loc.
Definition ast.h:5617
pm_local_variable_operator_write_node::depth
uint32_t depth
LocalVariableOperatorWriteNode::depth.
Definition ast.h:5685
pm_local_variable_operator_write_node::binary_operator
pm_constant_id_t binary_operator
LocalVariableOperatorWriteNode::binary_operator.
Definition ast.h:5680
pm_local_variable_operator_write_node::value
struct pm_node * value
LocalVariableOperatorWriteNode::value.
Definition ast.h:5670
pm_local_variable_operator_write_node::name_loc
pm_location_t name_loc
LocalVariableOperatorWriteNode::name_loc.
Definition ast.h:5660
pm_local_variable_operator_write_node::binary_operator_loc
pm_location_t binary_operator_loc
LocalVariableOperatorWriteNode::binary_operator_loc.
Definition ast.h:5665
pm_local_variable_operator_write_node::name
pm_constant_id_t name
LocalVariableOperatorWriteNode::name.
Definition ast.h:5675
pm_local_variable_or_write_node::depth
uint32_t depth
LocalVariableOrWriteNode::depth.
Definition ast.h:5728
pm_local_variable_or_write_node::operator_loc
pm_location_t operator_loc
LocalVariableOrWriteNode::operator_loc.
Definition ast.h:5713
pm_local_variable_or_write_node::value
struct pm_node * value
LocalVariableOrWriteNode::value.
Definition ast.h:5718
pm_local_variable_or_write_node::name
pm_constant_id_t name
LocalVariableOrWriteNode::name.
Definition ast.h:5723
pm_local_variable_or_write_node::name_loc
pm_location_t name_loc
LocalVariableOrWriteNode::name_loc.
Definition ast.h:5708
pm_local_variable_read_node::depth
uint32_t depth
LocalVariableReadNode::depth.
Definition ast.h:5774
pm_local_variable_read_node::name
pm_constant_id_t name
LocalVariableReadNode::name.
Definition ast.h:5761
pm_local_variable_target_node::depth
uint32_t depth
LocalVariableTargetNode::depth.
Definition ast.h:5805
pm_local_variable_target_node::name
pm_constant_id_t name
LocalVariableTargetNode::name.
Definition ast.h:5800
pm_local_variable_write_node::operator_loc
pm_location_t operator_loc
LocalVariableWriteNode::operator_loc.
Definition ast.h:5884
pm_local_variable_write_node::name_loc
pm_location_t name_loc
LocalVariableWriteNode::name_loc.
Definition ast.h:5857
pm_local_variable_write_node::value
struct pm_node * value
LocalVariableWriteNode::value.
Definition ast.h:5874
pm_local_variable_write_node::depth
uint32_t depth
LocalVariableWriteNode::depth.
Definition ast.h:5847
pm_local_variable_write_node::name
pm_constant_id_t name
LocalVariableWriteNode::name.
Definition ast.h:5834
pm_location_t::start
const uint8_t * start
A pointer to the start location of the range in the source.
Definition ast.h:546
pm_location_t::end
const uint8_t * end
A pointer to the end location of the range in the source.
Definition ast.h:549
pm_match_last_line_node::content_loc
pm_location_t content_loc
MatchLastLineNode::content_loc.
Definition ast.h:5925
pm_match_last_line_node::opening_loc
pm_location_t opening_loc
MatchLastLineNode::opening_loc.
Definition ast.h:5920
pm_match_last_line_node::closing_loc
pm_location_t closing_loc
MatchLastLineNode::closing_loc.
Definition ast.h:5930
pm_match_last_line_node::unescaped
pm_string_t unescaped
MatchLastLineNode::unescaped.
Definition ast.h:5935
pm_match_predicate_node::operator_loc
pm_location_t operator_loc
MatchPredicateNode::operator_loc.
Definition ast.h:5968
pm_match_predicate_node::pattern
struct pm_node * pattern
MatchPredicateNode::pattern.
Definition ast.h:5963
pm_match_predicate_node::value
struct pm_node * value
MatchPredicateNode::value.
Definition ast.h:5958
pm_match_required_node::operator_loc
pm_location_t operator_loc
MatchRequiredNode::operator_loc.
Definition ast.h:6055
pm_match_required_node::value
struct pm_node * value
MatchRequiredNode::value.
Definition ast.h:5996
pm_match_required_node::pattern
struct pm_node * pattern
MatchRequiredNode::pattern.
Definition ast.h:6045
pm_match_write_node::targets
struct pm_node_list targets
MatchWriteNode::targets.
Definition ast.h:6083
pm_match_write_node::call
struct pm_call_node * call
MatchWriteNode::call.
Definition ast.h:6078
pm_module_node::end_keyword_loc
pm_location_t end_keyword_loc
ModuleNode::end_keyword_loc.
Definition ast.h:6141
pm_module_node::constant_path
struct pm_node * constant_path
ModuleNode::constant_path.
Definition ast.h:6131
pm_module_node::body
struct pm_node * body
ModuleNode::body.
Definition ast.h:6136
pm_module_node::locals
pm_constant_id_list_t locals
ModuleNode::locals.
Definition ast.h:6121
pm_module_node::module_keyword_loc
pm_location_t module_keyword_loc
ModuleNode::module_keyword_loc.
Definition ast.h:6126
pm_module_node::name
pm_constant_id_t name
ModuleNode::name.
Definition ast.h:6146
pm_multi_target_node::lparen_loc
pm_location_t lparen_loc
MultiTargetNode::lparen_loc.
Definition ast.h:6224
pm_multi_target_node::lefts
struct pm_node_list lefts
MultiTargetNode::lefts.
Definition ast.h:6184
pm_multi_target_node::rest
struct pm_node * rest
MultiTargetNode::rest.
Definition ast.h:6204
pm_multi_target_node::rparen_loc
pm_location_t rparen_loc
MultiTargetNode::rparen_loc.
Definition ast.h:6234
pm_multi_target_node::rights
struct pm_node_list rights
MultiTargetNode::rights.
Definition ast.h:6214
pm_multi_write_node::rparen_loc
pm_location_t rparen_loc
MultiWriteNode::rparen_loc.
Definition ast.h:6317
pm_multi_write_node::value
struct pm_node * value
MultiWriteNode::value.
Definition ast.h:6337
pm_multi_write_node::rest
struct pm_node * rest
MultiWriteNode::rest.
Definition ast.h:6287
pm_multi_write_node::rights
struct pm_node_list rights
MultiWriteNode::rights.
Definition ast.h:6297
pm_multi_write_node::operator_loc
pm_location_t operator_loc
MultiWriteNode::operator_loc.
Definition ast.h:6327
pm_multi_write_node::lparen_loc
pm_location_t lparen_loc
MultiWriteNode::lparen_loc.
Definition ast.h:6307
pm_multi_write_node::lefts
struct pm_node_list lefts
MultiWriteNode::lefts.
Definition ast.h:6267
pm_newline_list_t::offsets
size_t * offsets
The list of offsets.
Definition pm_newline_list.h:39
pm_newline_list_t::size
size_t size
The number of offsets in the list.
Definition pm_newline_list.h:33
pm_next_node::arguments
struct pm_arguments_node * arguments
NextNode::arguments.
Definition ast.h:6360
pm_next_node::keyword_loc
pm_location_t keyword_loc
NextNode::keyword_loc.
Definition ast.h:6365
pm_no_keywords_parameter_node::keyword_loc
pm_location_t keyword_loc
NoKeywordsParameterNode::keyword_loc.
Definition ast.h:6412
pm_no_keywords_parameter_node::operator_loc
pm_location_t operator_loc
NoKeywordsParameterNode::operator_loc.
Definition ast.h:6407
pm_node_list::size
size_t size
The number of nodes in the list.
Definition ast.h:559
pm_node_list::nodes
struct pm_node ** nodes
The nodes in the list.
Definition ast.h:565
pm_node_stack_node
Definition api_node.c:258
pm_node::node_id
uint32_t node_id
The unique identifier for this node, which is deterministic based on the source.
Definition ast.h:1069
pm_node::flags
pm_node_flags_t flags
This represents any flags on the node.
Definition ast.h:1063
pm_node::location
pm_location_t location
This is the location of the node in the source.
Definition ast.h:1075
pm_numbered_parameters_node::maximum
uint8_t maximum
NumberedParametersNode::maximum.
Definition ast.h:6435
pm_numbered_reference_read_node::number
uint32_t number
NumberedReferenceReadNode::number.
Definition ast.h:6466
pm_optional_keyword_parameter_node::name
pm_constant_id_t name
OptionalKeywordParameterNode::name.
Definition ast.h:6493
pm_optional_keyword_parameter_node::value
struct pm_node * value
OptionalKeywordParameterNode::value.
Definition ast.h:6503
pm_optional_keyword_parameter_node::name_loc
pm_location_t name_loc
OptionalKeywordParameterNode::name_loc.
Definition ast.h:6498
pm_optional_parameter_node::name_loc
pm_location_t name_loc
OptionalParameterNode::name_loc.
Definition ast.h:6535
pm_optional_parameter_node::value
struct pm_node * value
OptionalParameterNode::value.
Definition ast.h:6545
pm_optional_parameter_node::name
pm_constant_id_t name
OptionalParameterNode::name.
Definition ast.h:6530
pm_optional_parameter_node::operator_loc
pm_location_t operator_loc
OptionalParameterNode::operator_loc.
Definition ast.h:6540
pm_or_node::left
struct pm_node * left
OrNode::left.
Definition ast.h:6576
pm_or_node::right
struct pm_node * right
OrNode::right.
Definition ast.h:6589
pm_or_node::operator_loc
pm_location_t operator_loc
OrNode::operator_loc.
Definition ast.h:6599
pm_parameters_node::rest
struct pm_node * rest
ParametersNode::rest.
Definition ast.h:6633
pm_parameters_node::requireds
struct pm_node_list requireds
ParametersNode::requireds.
Definition ast.h:6623
pm_parameters_node::block
struct pm_block_parameter_node * block
ParametersNode::block.
Definition ast.h:6653
pm_parameters_node::optionals
struct pm_node_list optionals
ParametersNode::optionals.
Definition ast.h:6628
pm_parameters_node::posts
struct pm_node_list posts
ParametersNode::posts.
Definition ast.h:6638
pm_parameters_node::keyword_rest
struct pm_node * keyword_rest
ParametersNode::keyword_rest.
Definition ast.h:6648
pm_parameters_node::keywords
struct pm_node_list keywords
ParametersNode::keywords.
Definition ast.h:6643
pm_parentheses_node::body
struct pm_node * body
ParenthesesNode::body.
Definition ast.h:6679
pm_parentheses_node::closing_loc
pm_location_t closing_loc
ParenthesesNode::closing_loc.
Definition ast.h:6689
pm_parentheses_node::opening_loc
pm_location_t opening_loc
ParenthesesNode::opening_loc.
Definition ast.h:6684
pm_parser::end
const uint8_t * end
The pointer to the end of the source.
Definition parser.h:697
pm_parser::constant_pool
pm_constant_pool_t constant_pool
This constant pool keeps all of the constants defined throughout the file so that we can reference th...
Definition parser.h:789
pm_parser::start
const uint8_t * start
The pointer to the start of the source.
Definition parser.h:694
pm_parser::start_line
int32_t start_line
The line number at the start of the parse.
Definition parser.h:812
pm_parser::newline_list
pm_newline_list_t newline_list
This is the list of newline offsets in the source file.
Definition parser.h:792
pm_pinned_expression_node::rparen_loc
pm_location_t rparen_loc
PinnedExpressionNode::rparen_loc.
Definition ast.h:6747
pm_pinned_expression_node::expression
struct pm_node * expression
PinnedExpressionNode::expression.
Definition ast.h:6717
pm_pinned_expression_node::lparen_loc
pm_location_t lparen_loc
PinnedExpressionNode::lparen_loc.
Definition ast.h:6737
pm_pinned_expression_node::operator_loc
pm_location_t operator_loc
PinnedExpressionNode::operator_loc.
Definition ast.h:6727
pm_pinned_variable_node::variable
struct pm_node * variable
PinnedVariableNode::variable.
Definition ast.h:6775
pm_pinned_variable_node::operator_loc
pm_location_t operator_loc
PinnedVariableNode::operator_loc.
Definition ast.h:6785
pm_post_execution_node::closing_loc
pm_location_t closing_loc
PostExecutionNode::closing_loc.
Definition ast.h:6823
pm_post_execution_node::statements
struct pm_statements_node * statements
PostExecutionNode::statements.
Definition ast.h:6808
pm_post_execution_node::opening_loc
pm_location_t opening_loc
PostExecutionNode::opening_loc.
Definition ast.h:6818
pm_post_execution_node::keyword_loc
pm_location_t keyword_loc
PostExecutionNode::keyword_loc.
Definition ast.h:6813
pm_pre_execution_node::statements
struct pm_statements_node * statements
PreExecutionNode::statements.
Definition ast.h:6846
pm_pre_execution_node::closing_loc
pm_location_t closing_loc
PreExecutionNode::closing_loc.
Definition ast.h:6861
pm_pre_execution_node::opening_loc
pm_location_t opening_loc
PreExecutionNode::opening_loc.
Definition ast.h:6856
pm_pre_execution_node::keyword_loc
pm_location_t keyword_loc
PreExecutionNode::keyword_loc.
Definition ast.h:6851
pm_program_node::statements
struct pm_statements_node * statements
ProgramNode::statements.
Definition ast.h:6886
pm_program_node::locals
pm_constant_id_list_t locals
ProgramNode::locals.
Definition ast.h:6881
pm_range_node::right
struct pm_node * right
RangeNode::right.
Definition ast.h:6937
pm_range_node::operator_loc
pm_location_t operator_loc
RangeNode::operator_loc.
Definition ast.h:6944
pm_range_node::left
struct pm_node * left
RangeNode::left.
Definition ast.h:6923
pm_rational_node::denominator
pm_integer_t denominator
RationalNode::denominator.
Definition ast.h:6986
pm_rational_node::numerator
pm_integer_t numerator
RationalNode::numerator.
Definition ast.h:6977
pm_regular_expression_node::closing_loc
pm_location_t closing_loc
RegularExpressionNode::closing_loc.
Definition ast.h:7050
pm_regular_expression_node::unescaped
pm_string_t unescaped
RegularExpressionNode::unescaped.
Definition ast.h:7055
pm_regular_expression_node::opening_loc
pm_location_t opening_loc
RegularExpressionNode::opening_loc.
Definition ast.h:7040
pm_regular_expression_node::content_loc
pm_location_t content_loc
RegularExpressionNode::content_loc.
Definition ast.h:7045
pm_required_keyword_parameter_node::name_loc
pm_location_t name_loc
RequiredKeywordParameterNode::name_loc.
Definition ast.h:7087
pm_required_keyword_parameter_node::name
pm_constant_id_t name
RequiredKeywordParameterNode::name.
Definition ast.h:7082
pm_required_parameter_node::name
pm_constant_id_t name
RequiredParameterNode::name.
Definition ast.h:7114
pm_rescue_modifier_node::rescue_expression
struct pm_node * rescue_expression
RescueModifierNode::rescue_expression.
Definition ast.h:7147
pm_rescue_modifier_node::keyword_loc
pm_location_t keyword_loc
RescueModifierNode::keyword_loc.
Definition ast.h:7142
pm_rescue_modifier_node::expression
struct pm_node * expression
RescueModifierNode::expression.
Definition ast.h:7137
pm_rescue_node::keyword_loc
pm_location_t keyword_loc
RescueNode::keyword_loc.
Definition ast.h:7175
pm_rescue_node::subsequent
struct pm_rescue_node * subsequent
RescueNode::subsequent.
Definition ast.h:7205
pm_rescue_node::then_keyword_loc
pm_location_t then_keyword_loc
RescueNode::then_keyword_loc.
Definition ast.h:7195
pm_rescue_node::operator_loc
pm_location_t operator_loc
RescueNode::operator_loc.
Definition ast.h:7185
pm_rescue_node::reference
struct pm_node * reference
RescueNode::reference.
Definition ast.h:7190
pm_rescue_node::exceptions
struct pm_node_list exceptions
RescueNode::exceptions.
Definition ast.h:7180
pm_rescue_node::statements
struct pm_statements_node * statements
RescueNode::statements.
Definition ast.h:7200
pm_rest_parameter_node::name
pm_constant_id_t name
RestParameterNode::name.
Definition ast.h:7232
pm_rest_parameter_node::name_loc
pm_location_t name_loc
RestParameterNode::name_loc.
Definition ast.h:7237
pm_rest_parameter_node::operator_loc
pm_location_t operator_loc
RestParameterNode::operator_loc.
Definition ast.h:7242
pm_return_node::keyword_loc
pm_location_t keyword_loc
ReturnNode::keyword_loc.
Definition ast.h:7283
pm_return_node::arguments
struct pm_arguments_node * arguments
ReturnNode::arguments.
Definition ast.h:7288
pm_shareable_constant_node::write
struct pm_node * write
ShareableConstantNode::write.
Definition ast.h:7337
pm_singleton_class_node::locals
pm_constant_id_list_t locals
SingletonClassNode::locals.
Definition ast.h:7360
pm_singleton_class_node::operator_loc
pm_location_t operator_loc
SingletonClassNode::operator_loc.
Definition ast.h:7370
pm_singleton_class_node::expression
struct pm_node * expression
SingletonClassNode::expression.
Definition ast.h:7375
pm_singleton_class_node::end_keyword_loc
pm_location_t end_keyword_loc
SingletonClassNode::end_keyword_loc.
Definition ast.h:7385
pm_singleton_class_node::class_keyword_loc
pm_location_t class_keyword_loc
SingletonClassNode::class_keyword_loc.
Definition ast.h:7365
pm_singleton_class_node::body
struct pm_node * body
SingletonClassNode::body.
Definition ast.h:7380
pm_source_file_node::filepath
pm_string_t filepath
SourceFileNode::filepath.
Definition ast.h:7434
pm_splat_node::expression
struct pm_node * expression
SplatNode::expression.
Definition ast.h:7480
pm_splat_node::operator_loc
pm_location_t operator_loc
SplatNode::operator_loc.
Definition ast.h:7475
pm_statements_node::body
struct pm_node_list body
StatementsNode::body.
Definition ast.h:7503
pm_string_node::unescaped
pm_string_t unescaped
StringNode::unescaped.
Definition ast.h:7553
pm_string_node::content_loc
pm_location_t content_loc
StringNode::content_loc.
Definition ast.h:7543
pm_string_node::closing_loc
pm_location_t closing_loc
StringNode::closing_loc.
Definition ast.h:7548
pm_string_node::opening_loc
pm_location_t opening_loc
StringNode::opening_loc.
Definition ast.h:7538
pm_string_t
A generic string type that can have various ownership semantics.
Definition pm_string.h:33
pm_super_node::arguments
struct pm_arguments_node * arguments
SuperNode::arguments.
Definition ast.h:7593
pm_super_node::lparen_loc
pm_location_t lparen_loc
SuperNode::lparen_loc.
Definition ast.h:7586
pm_super_node::keyword_loc
pm_location_t keyword_loc
SuperNode::keyword_loc.
Definition ast.h:7581
pm_super_node::rparen_loc
pm_location_t rparen_loc
SuperNode::rparen_loc.
Definition ast.h:7598
pm_super_node::block
struct pm_node * block
SuperNode::block.
Definition ast.h:7603
pm_symbol_node::opening_loc
pm_location_t opening_loc
SymbolNode::opening_loc.
Definition ast.h:7634
pm_symbol_node::value_loc
pm_location_t value_loc
SymbolNode::value_loc.
Definition ast.h:7639
pm_symbol_node::closing_loc
pm_location_t closing_loc
SymbolNode::closing_loc.
Definition ast.h:7644
pm_symbol_node::unescaped
pm_string_t unescaped
SymbolNode::unescaped.
Definition ast.h:7649
pm_token_t
This struct represents a token in the Ruby source.
Definition ast.h:529
pm_undef_node::keyword_loc
pm_location_t keyword_loc
UndefNode::keyword_loc.
Definition ast.h:7695
pm_undef_node::names
struct pm_node_list names
UndefNode::names.
Definition ast.h:7690
pm_unless_node::keyword_loc
pm_location_t keyword_loc
UnlessNode::keyword_loc.
Definition ast.h:7729
pm_unless_node::then_keyword_loc
pm_location_t then_keyword_loc
UnlessNode::then_keyword_loc.
Definition ast.h:7752
pm_unless_node::end_keyword_loc
pm_location_t end_keyword_loc
UnlessNode::end_keyword_loc.
Definition ast.h:7783
pm_unless_node::statements
struct pm_statements_node * statements
UnlessNode::statements.
Definition ast.h:7763
pm_unless_node::predicate
struct pm_node * predicate
UnlessNode::predicate.
Definition ast.h:7742
pm_unless_node::else_clause
struct pm_else_node * else_clause
UnlessNode::else_clause.
Definition ast.h:7773
pm_until_node::statements
struct pm_statements_node * statements
UntilNode::statements.
Definition ast.h:7832
pm_until_node::closing_loc
pm_location_t closing_loc
UntilNode::closing_loc.
Definition ast.h:7822
pm_until_node::predicate
struct pm_node * predicate
UntilNode::predicate.
Definition ast.h:7827
pm_until_node::keyword_loc
pm_location_t keyword_loc
UntilNode::keyword_loc.
Definition ast.h:7812
pm_until_node::do_keyword_loc
pm_location_t do_keyword_loc
UntilNode::do_keyword_loc.
Definition ast.h:7817
pm_when_node::statements
struct pm_statements_node * statements
WhenNode::statements.
Definition ast.h:7872
pm_when_node::then_keyword_loc
pm_location_t then_keyword_loc
WhenNode::then_keyword_loc.
Definition ast.h:7867
pm_when_node::keyword_loc
pm_location_t keyword_loc
WhenNode::keyword_loc.
Definition ast.h:7857
pm_when_node::conditions
struct pm_node_list conditions
WhenNode::conditions.
Definition ast.h:7862
pm_while_node::closing_loc
pm_location_t closing_loc
WhileNode::closing_loc.
Definition ast.h:7911
pm_while_node::keyword_loc
pm_location_t keyword_loc
WhileNode::keyword_loc.
Definition ast.h:7901
pm_while_node::statements
struct pm_statements_node * statements
WhileNode::statements.
Definition ast.h:7921
pm_while_node::do_keyword_loc
pm_location_t do_keyword_loc
WhileNode::do_keyword_loc.
Definition ast.h:7906
pm_while_node::predicate
struct pm_node * predicate
WhileNode::predicate.
Definition ast.h:7916
pm_x_string_node::closing_loc
pm_location_t closing_loc
XStringNode::closing_loc.
Definition ast.h:7958
pm_x_string_node::opening_loc
pm_location_t opening_loc
XStringNode::opening_loc.
Definition ast.h:7948
pm_x_string_node::content_loc
pm_location_t content_loc
XStringNode::content_loc.
Definition ast.h:7953
pm_x_string_node::unescaped
pm_string_t unescaped
XStringNode::unescaped.
Definition ast.h:7963
pm_yield_node::keyword_loc
pm_location_t keyword_loc
YieldNode::keyword_loc.
Definition ast.h:7986
pm_yield_node::lparen_loc
pm_location_t lparen_loc
YieldNode::lparen_loc.
Definition ast.h:7991
pm_yield_node::rparen_loc
pm_location_t rparen_loc
YieldNode::rparen_loc.
Definition ast.h:8001
pm_yield_node::arguments
struct pm_arguments_node * arguments
YieldNode::arguments.
Definition ast.h:7996
ID
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition value.h:52
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40