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