Ruby: prism/api_node.c Source File

Ruby 3.4.9p82 (2026-03-11 revision 76cca827ab52ab1d346a728f068d5b8da3e2952b)

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