Ruby: prism/api_node.c Source File

Ruby 3.3.4p94 (2024-07-09 revision be1089c8ec5ba40e09b1553e36b3174bf4014d9d)

api_node.c
1/******************************************************************************/
2/* This file is generated by the templates/template.rb script and should not */
3/* be modified manually. See */
4/* templates/ext/prism/api_node.c.erb */
5/* if you are looking to modify the */
6/* template */
7/******************************************************************************/
8#line 2 "api_node.c.erb"
9#include "prism/extension.h"
10
11extern VALUE rb_cPrism;
12extern VALUE rb_cPrismNode;
13extern VALUE rb_cPrismSource;
14extern VALUE rb_cPrismToken;
15extern VALUE rb_cPrismLocation;
16
17static VALUE rb_cPrismAliasGlobalVariableNode;
18static VALUE rb_cPrismAliasMethodNode;
19static VALUE rb_cPrismAlternationPatternNode;
20static VALUE rb_cPrismAndNode;
21static VALUE rb_cPrismArgumentsNode;
22static VALUE rb_cPrismArrayNode;
23static VALUE rb_cPrismArrayPatternNode;
24static VALUE rb_cPrismAssocNode;
25static VALUE rb_cPrismAssocSplatNode;
26static VALUE rb_cPrismBackReferenceReadNode;
27static VALUE rb_cPrismBeginNode;
28static VALUE rb_cPrismBlockArgumentNode;
29static VALUE rb_cPrismBlockLocalVariableNode;
30static VALUE rb_cPrismBlockNode;
31static VALUE rb_cPrismBlockParameterNode;
32static VALUE rb_cPrismBlockParametersNode;
33static VALUE rb_cPrismBreakNode;
34static VALUE rb_cPrismCallAndWriteNode;
35static VALUE rb_cPrismCallNode;
36static VALUE rb_cPrismCallOperatorWriteNode;
37static VALUE rb_cPrismCallOrWriteNode;
38static VALUE rb_cPrismCallTargetNode;
39static VALUE rb_cPrismCapturePatternNode;
40static VALUE rb_cPrismCaseMatchNode;
41static VALUE rb_cPrismCaseNode;
42static VALUE rb_cPrismClassNode;
43static VALUE rb_cPrismClassVariableAndWriteNode;
44static VALUE rb_cPrismClassVariableOperatorWriteNode;
45static VALUE rb_cPrismClassVariableOrWriteNode;
46static VALUE rb_cPrismClassVariableReadNode;
47static VALUE rb_cPrismClassVariableTargetNode;
48static VALUE rb_cPrismClassVariableWriteNode;
49static VALUE rb_cPrismConstantAndWriteNode;
50static VALUE rb_cPrismConstantOperatorWriteNode;
51static VALUE rb_cPrismConstantOrWriteNode;
52static VALUE rb_cPrismConstantPathAndWriteNode;
53static VALUE rb_cPrismConstantPathNode;
54static VALUE rb_cPrismConstantPathOperatorWriteNode;
55static VALUE rb_cPrismConstantPathOrWriteNode;
56static VALUE rb_cPrismConstantPathTargetNode;
57static VALUE rb_cPrismConstantPathWriteNode;
58static VALUE rb_cPrismConstantReadNode;
59static VALUE rb_cPrismConstantTargetNode;
60static VALUE rb_cPrismConstantWriteNode;
61static VALUE rb_cPrismDefNode;
62static VALUE rb_cPrismDefinedNode;
63static VALUE rb_cPrismElseNode;
64static VALUE rb_cPrismEmbeddedStatementsNode;
65static VALUE rb_cPrismEmbeddedVariableNode;
66static VALUE rb_cPrismEnsureNode;
67static VALUE rb_cPrismFalseNode;
68static VALUE rb_cPrismFindPatternNode;
69static VALUE rb_cPrismFlipFlopNode;
70static VALUE rb_cPrismFloatNode;
71static VALUE rb_cPrismForNode;
72static VALUE rb_cPrismForwardingArgumentsNode;
73static VALUE rb_cPrismForwardingParameterNode;
74static VALUE rb_cPrismForwardingSuperNode;
75static VALUE rb_cPrismGlobalVariableAndWriteNode;
76static VALUE rb_cPrismGlobalVariableOperatorWriteNode;
77static VALUE rb_cPrismGlobalVariableOrWriteNode;
78static VALUE rb_cPrismGlobalVariableReadNode;
79static VALUE rb_cPrismGlobalVariableTargetNode;
80static VALUE rb_cPrismGlobalVariableWriteNode;
81static VALUE rb_cPrismHashNode;
82static VALUE rb_cPrismHashPatternNode;
83static VALUE rb_cPrismIfNode;
84static VALUE rb_cPrismImaginaryNode;
85static VALUE rb_cPrismImplicitNode;
86static VALUE rb_cPrismImplicitRestNode;
87static VALUE rb_cPrismInNode;
88static VALUE rb_cPrismIndexAndWriteNode;
89static VALUE rb_cPrismIndexOperatorWriteNode;
90static VALUE rb_cPrismIndexOrWriteNode;
91static VALUE rb_cPrismIndexTargetNode;
92static VALUE rb_cPrismInstanceVariableAndWriteNode;
93static VALUE rb_cPrismInstanceVariableOperatorWriteNode;
94static VALUE rb_cPrismInstanceVariableOrWriteNode;
95static VALUE rb_cPrismInstanceVariableReadNode;
96static VALUE rb_cPrismInstanceVariableTargetNode;
97static VALUE rb_cPrismInstanceVariableWriteNode;
98static VALUE rb_cPrismIntegerNode;
99static VALUE rb_cPrismInterpolatedMatchLastLineNode;
100static VALUE rb_cPrismInterpolatedRegularExpressionNode;
101static VALUE rb_cPrismInterpolatedStringNode;
102static VALUE rb_cPrismInterpolatedSymbolNode;
103static VALUE rb_cPrismInterpolatedXStringNode;
104static VALUE rb_cPrismKeywordHashNode;
105static VALUE rb_cPrismKeywordRestParameterNode;
106static VALUE rb_cPrismLambdaNode;
107static VALUE rb_cPrismLocalVariableAndWriteNode;
108static VALUE rb_cPrismLocalVariableOperatorWriteNode;
109static VALUE rb_cPrismLocalVariableOrWriteNode;
110static VALUE rb_cPrismLocalVariableReadNode;
111static VALUE rb_cPrismLocalVariableTargetNode;
112static VALUE rb_cPrismLocalVariableWriteNode;
113static VALUE rb_cPrismMatchLastLineNode;
114static VALUE rb_cPrismMatchPredicateNode;
115static VALUE rb_cPrismMatchRequiredNode;
116static VALUE rb_cPrismMatchWriteNode;
117static VALUE rb_cPrismMissingNode;
118static VALUE rb_cPrismModuleNode;
119static VALUE rb_cPrismMultiTargetNode;
120static VALUE rb_cPrismMultiWriteNode;
121static VALUE rb_cPrismNextNode;
122static VALUE rb_cPrismNilNode;
123static VALUE rb_cPrismNoKeywordsParameterNode;
124static VALUE rb_cPrismNumberedParametersNode;
125static VALUE rb_cPrismNumberedReferenceReadNode;
126static VALUE rb_cPrismOptionalKeywordParameterNode;
127static VALUE rb_cPrismOptionalParameterNode;
128static VALUE rb_cPrismOrNode;
129static VALUE rb_cPrismParametersNode;
130static VALUE rb_cPrismParenthesesNode;
131static VALUE rb_cPrismPinnedExpressionNode;
132static VALUE rb_cPrismPinnedVariableNode;
133static VALUE rb_cPrismPostExecutionNode;
134static VALUE rb_cPrismPreExecutionNode;
135static VALUE rb_cPrismProgramNode;
136static VALUE rb_cPrismRangeNode;
137static VALUE rb_cPrismRationalNode;
138static VALUE rb_cPrismRedoNode;
139static VALUE rb_cPrismRegularExpressionNode;
140static VALUE rb_cPrismRequiredKeywordParameterNode;
141static VALUE rb_cPrismRequiredParameterNode;
142static VALUE rb_cPrismRescueModifierNode;
143static VALUE rb_cPrismRescueNode;
144static VALUE rb_cPrismRestParameterNode;
145static VALUE rb_cPrismRetryNode;
146static VALUE rb_cPrismReturnNode;
147static VALUE rb_cPrismSelfNode;
148static VALUE rb_cPrismSingletonClassNode;
149static VALUE rb_cPrismSourceEncodingNode;
150static VALUE rb_cPrismSourceFileNode;
151static VALUE rb_cPrismSourceLineNode;
152static VALUE rb_cPrismSplatNode;
153static VALUE rb_cPrismStatementsNode;
154static VALUE rb_cPrismStringNode;
155static VALUE rb_cPrismSuperNode;
156static VALUE rb_cPrismSymbolNode;
157static VALUE rb_cPrismTrueNode;
158static VALUE rb_cPrismUndefNode;
159static VALUE rb_cPrismUnlessNode;
160static VALUE rb_cPrismUntilNode;
161static VALUE rb_cPrismWhenNode;
162static VALUE rb_cPrismWhileNode;
163static VALUE rb_cPrismXStringNode;
164static VALUE rb_cPrismYieldNode;
165
166static VALUE
167pm_location_new(pm_parser_t *parser, const uint8_t *start, const uint8_t *end, VALUE source) {
168 VALUE argv[] = { source, LONG2FIX(start - parser->start), LONG2FIX(end - start) };
169 return rb_class_new_instance(3, argv, rb_cPrismLocation);
170}
171
172 VALUE
173pm_token_new(pm_parser_t *parser, pm_token_t *token, rb_encoding *encoding, VALUE source) {
174 ID type = rb_intern(pm_token_type_to_str(token->type));
175 VALUE location = pm_location_new(parser, token->start, token->end, source);
176
177 VALUE argv[] = {
178 ID2SYM(type),
179 rb_enc_str_new((const char *) token->start, token->end - token->start, encoding),
180 location
181 };
182
183 return rb_class_new_instance(3, argv, rb_cPrismToken);
184}
185
186static VALUE
187pm_string_new(pm_string_t *string, rb_encoding *encoding) {
188 return rb_enc_str_new((const char *) pm_string_source(string), pm_string_length(string), encoding);
189}
190
191// Create a Prism::Source object from the given parser.
192 VALUE
193pm_source_new(pm_parser_t *parser, rb_encoding *encoding) {
194 VALUE source = rb_enc_str_new((const char *) parser->start, parser->end - parser->start, encoding);
195 VALUE offsets = rb_ary_new_capa(parser->newline_list.size);
196
197 for (size_t index = 0; index < parser->newline_list.size; index++) {
198 rb_ary_push(offsets, INT2FIX(parser->newline_list.offsets[index]));
199 }
200
201 VALUE source_argv[] = { source, LONG2NUM(parser->start_line), offsets };
202 return rb_class_new_instance(3, source_argv, rb_cPrismSource);
203}
204
205 typedef struct pm_node_stack_node {
206 struct pm_node_stack_node *prev;
207 pm_node_t *visit;
208 bool visited;
209} pm_node_stack_node_t;
210
211static void
212pm_node_stack_push(pm_node_stack_node_t **stack, pm_node_t *visit) {
213 pm_node_stack_node_t *node = malloc(sizeof(pm_node_stack_node_t));
214 node->prev = *stack;
215 node->visit = visit;
216 node->visited = false;
217 *stack = node;
218}
219
220static pm_node_t *
221pm_node_stack_pop(pm_node_stack_node_t **stack) {
222 pm_node_stack_node_t *current = *stack;
223 pm_node_t *visit = current->visit;
224
225 *stack = current->prev;
226 free(current);
227
228 return visit;
229}
230
231 VALUE
232pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
233 VALUE source = pm_source_new(parser, encoding);
234 ID *constants = calloc(parser->constant_pool.size, sizeof(ID));
235
236 for (uint32_t index = 0; index < parser->constant_pool.size; index++) {
237 pm_constant_t *constant = &parser->constant_pool.constants[index];
238 int state = 0;
239
240 VALUE string = rb_enc_str_new((const char *) constant->start, constant->length, encoding);
241 ID value = rb_protect(rb_intern_str, string, &state);
242
243 if (state != 0) {
244 value = rb_intern_const("?");
245 rb_set_errinfo(Qnil);
246 }
247
248 constants[index] = value;
249 }
250
251 pm_node_stack_node_t *node_stack = NULL;
252 pm_node_stack_push(&node_stack, node);
253 VALUE value_stack = rb_ary_new();
254
255 while (node_stack != NULL) {
256 if (!node_stack->visited) {
257 if (node_stack->visit == NULL) {
258 pm_node_stack_pop(&node_stack);
259 rb_ary_push(value_stack, Qnil);
260 continue;
261 }
262
263 pm_node_t *node = node_stack->visit;
264 node_stack->visited = true;
265
266 switch (PM_NODE_TYPE(node)) {
267#line 118 "api_node.c.erb"
268 case PM_ALIAS_GLOBAL_VARIABLE_NODE: {
269 pm_alias_global_variable_node_t *cast = (pm_alias_global_variable_node_t *) node;
270 pm_node_stack_push(&node_stack, (pm_node_t *) cast->new_name);
271 pm_node_stack_push(&node_stack, (pm_node_t *) cast->old_name);
272 break;
273 }
274#line 118 "api_node.c.erb"
275 case PM_ALIAS_METHOD_NODE: {
276 pm_alias_method_node_t *cast = (pm_alias_method_node_t *) node;
277 pm_node_stack_push(&node_stack, (pm_node_t *) cast->new_name);
278 pm_node_stack_push(&node_stack, (pm_node_t *) cast->old_name);
279 break;
280 }
281#line 118 "api_node.c.erb"
282 case PM_ALTERNATION_PATTERN_NODE: {
283 pm_alternation_pattern_node_t *cast = (pm_alternation_pattern_node_t *) node;
284 pm_node_stack_push(&node_stack, (pm_node_t *) cast->left);
285 pm_node_stack_push(&node_stack, (pm_node_t *) cast->right);
286 break;
287 }
288#line 118 "api_node.c.erb"
289 case PM_AND_NODE: {
290 pm_and_node_t *cast = (pm_and_node_t *) node;
291 pm_node_stack_push(&node_stack, (pm_node_t *) cast->left);
292 pm_node_stack_push(&node_stack, (pm_node_t *) cast->right);
293 break;
294 }
295#line 118 "api_node.c.erb"
296 case PM_ARGUMENTS_NODE: {
297 pm_arguments_node_t *cast = (pm_arguments_node_t *) node;
298 for (size_t index = 0; index < cast->arguments.size; index++) {
299 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments.nodes[index]);
300 }
301 break;
302 }
303#line 118 "api_node.c.erb"
304 case PM_ARRAY_NODE: {
305 pm_array_node_t *cast = (pm_array_node_t *) node;
306 for (size_t index = 0; index < cast->elements.size; index++) {
307 pm_node_stack_push(&node_stack, (pm_node_t *) cast->elements.nodes[index]);
308 }
309 break;
310 }
311#line 118 "api_node.c.erb"
312 case PM_ARRAY_PATTERN_NODE: {
313 pm_array_pattern_node_t *cast = (pm_array_pattern_node_t *) node;
314 pm_node_stack_push(&node_stack, (pm_node_t *) cast->constant);
315 for (size_t index = 0; index < cast->requireds.size; index++) {
316 pm_node_stack_push(&node_stack, (pm_node_t *) cast->requireds.nodes[index]);
317 }
318 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rest);
319 for (size_t index = 0; index < cast->posts.size; index++) {
320 pm_node_stack_push(&node_stack, (pm_node_t *) cast->posts.nodes[index]);
321 }
322 break;
323 }
324#line 118 "api_node.c.erb"
325 case PM_ASSOC_NODE: {
326 pm_assoc_node_t *cast = (pm_assoc_node_t *) node;
327 pm_node_stack_push(&node_stack, (pm_node_t *) cast->key);
328 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
329 break;
330 }
331#line 118 "api_node.c.erb"
332 case PM_ASSOC_SPLAT_NODE: {
333 pm_assoc_splat_node_t *cast = (pm_assoc_splat_node_t *) node;
334 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
335 break;
336 }
337#line 118 "api_node.c.erb"
338 case PM_BEGIN_NODE: {
339 pm_begin_node_t *cast = (pm_begin_node_t *) node;
340 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
341 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rescue_clause);
342 pm_node_stack_push(&node_stack, (pm_node_t *) cast->else_clause);
343 pm_node_stack_push(&node_stack, (pm_node_t *) cast->ensure_clause);
344 break;
345 }
346#line 118 "api_node.c.erb"
347 case PM_BLOCK_ARGUMENT_NODE: {
348 pm_block_argument_node_t *cast = (pm_block_argument_node_t *) node;
349 pm_node_stack_push(&node_stack, (pm_node_t *) cast->expression);
350 break;
351 }
352#line 118 "api_node.c.erb"
353 case PM_BLOCK_NODE: {
354 pm_block_node_t *cast = (pm_block_node_t *) node;
355 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parameters);
356 pm_node_stack_push(&node_stack, (pm_node_t *) cast->body);
357 break;
358 }
359#line 118 "api_node.c.erb"
360 case PM_BLOCK_PARAMETERS_NODE: {
361 pm_block_parameters_node_t *cast = (pm_block_parameters_node_t *) node;
362 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parameters);
363 for (size_t index = 0; index < cast->locals.size; index++) {
364 pm_node_stack_push(&node_stack, (pm_node_t *) cast->locals.nodes[index]);
365 }
366 break;
367 }
368#line 118 "api_node.c.erb"
369 case PM_BREAK_NODE: {
370 pm_break_node_t *cast = (pm_break_node_t *) node;
371 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
372 break;
373 }
374#line 118 "api_node.c.erb"
375 case PM_CALL_AND_WRITE_NODE: {
376 pm_call_and_write_node_t *cast = (pm_call_and_write_node_t *) node;
377 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
378 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
379 break;
380 }
381#line 118 "api_node.c.erb"
382 case PM_CALL_NODE: {
383 pm_call_node_t *cast = (pm_call_node_t *) node;
384 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
385 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
386 pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
387 break;
388 }
389#line 118 "api_node.c.erb"
390 case PM_CALL_OPERATOR_WRITE_NODE: {
391 pm_call_operator_write_node_t *cast = (pm_call_operator_write_node_t *) node;
392 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
393 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
394 break;
395 }
396#line 118 "api_node.c.erb"
397 case PM_CALL_OR_WRITE_NODE: {
398 pm_call_or_write_node_t *cast = (pm_call_or_write_node_t *) node;
399 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
400 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
401 break;
402 }
403#line 118 "api_node.c.erb"
404 case PM_CALL_TARGET_NODE: {
405 pm_call_target_node_t *cast = (pm_call_target_node_t *) node;
406 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
407 break;
408 }
409#line 118 "api_node.c.erb"
410 case PM_CAPTURE_PATTERN_NODE: {
411 pm_capture_pattern_node_t *cast = (pm_capture_pattern_node_t *) node;
412 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
413 pm_node_stack_push(&node_stack, (pm_node_t *) cast->target);
414 break;
415 }
416#line 118 "api_node.c.erb"
417 case PM_CASE_MATCH_NODE: {
418 pm_case_match_node_t *cast = (pm_case_match_node_t *) node;
419 pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate);
420 for (size_t index = 0; index < cast->conditions.size; index++) {
421 pm_node_stack_push(&node_stack, (pm_node_t *) cast->conditions.nodes[index]);
422 }
423 pm_node_stack_push(&node_stack, (pm_node_t *) cast->consequent);
424 break;
425 }
426#line 118 "api_node.c.erb"
427 case PM_CASE_NODE: {
428 pm_case_node_t *cast = (pm_case_node_t *) node;
429 pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate);
430 for (size_t index = 0; index < cast->conditions.size; index++) {
431 pm_node_stack_push(&node_stack, (pm_node_t *) cast->conditions.nodes[index]);
432 }
433 pm_node_stack_push(&node_stack, (pm_node_t *) cast->consequent);
434 break;
435 }
436#line 118 "api_node.c.erb"
437 case PM_CLASS_NODE: {
438 pm_class_node_t *cast = (pm_class_node_t *) node;
439 pm_node_stack_push(&node_stack, (pm_node_t *) cast->constant_path);
440 pm_node_stack_push(&node_stack, (pm_node_t *) cast->superclass);
441 pm_node_stack_push(&node_stack, (pm_node_t *) cast->body);
442 break;
443 }
444#line 118 "api_node.c.erb"
445 case PM_CLASS_VARIABLE_AND_WRITE_NODE: {
446 pm_class_variable_and_write_node_t *cast = (pm_class_variable_and_write_node_t *) node;
447 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
448 break;
449 }
450#line 118 "api_node.c.erb"
451 case PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE: {
452 pm_class_variable_operator_write_node_t *cast = (pm_class_variable_operator_write_node_t *) node;
453 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
454 break;
455 }
456#line 118 "api_node.c.erb"
457 case PM_CLASS_VARIABLE_OR_WRITE_NODE: {
458 pm_class_variable_or_write_node_t *cast = (pm_class_variable_or_write_node_t *) node;
459 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
460 break;
461 }
462#line 118 "api_node.c.erb"
463 case PM_CLASS_VARIABLE_WRITE_NODE: {
464 pm_class_variable_write_node_t *cast = (pm_class_variable_write_node_t *) node;
465 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
466 break;
467 }
468#line 118 "api_node.c.erb"
469 case PM_CONSTANT_AND_WRITE_NODE: {
470 pm_constant_and_write_node_t *cast = (pm_constant_and_write_node_t *) node;
471 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
472 break;
473 }
474#line 118 "api_node.c.erb"
475 case PM_CONSTANT_OPERATOR_WRITE_NODE: {
476 pm_constant_operator_write_node_t *cast = (pm_constant_operator_write_node_t *) node;
477 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
478 break;
479 }
480#line 118 "api_node.c.erb"
481 case PM_CONSTANT_OR_WRITE_NODE: {
482 pm_constant_or_write_node_t *cast = (pm_constant_or_write_node_t *) node;
483 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
484 break;
485 }
486#line 118 "api_node.c.erb"
487 case PM_CONSTANT_PATH_AND_WRITE_NODE: {
488 pm_constant_path_and_write_node_t *cast = (pm_constant_path_and_write_node_t *) node;
489 pm_node_stack_push(&node_stack, (pm_node_t *) cast->target);
490 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
491 break;
492 }
493#line 118 "api_node.c.erb"
494 case PM_CONSTANT_PATH_NODE: {
495 pm_constant_path_node_t *cast = (pm_constant_path_node_t *) node;
496 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parent);
497 pm_node_stack_push(&node_stack, (pm_node_t *) cast->child);
498 break;
499 }
500#line 118 "api_node.c.erb"
501 case PM_CONSTANT_PATH_OPERATOR_WRITE_NODE: {
502 pm_constant_path_operator_write_node_t *cast = (pm_constant_path_operator_write_node_t *) node;
503 pm_node_stack_push(&node_stack, (pm_node_t *) cast->target);
504 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
505 break;
506 }
507#line 118 "api_node.c.erb"
508 case PM_CONSTANT_PATH_OR_WRITE_NODE: {
509 pm_constant_path_or_write_node_t *cast = (pm_constant_path_or_write_node_t *) node;
510 pm_node_stack_push(&node_stack, (pm_node_t *) cast->target);
511 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
512 break;
513 }
514#line 118 "api_node.c.erb"
515 case PM_CONSTANT_PATH_TARGET_NODE: {
516 pm_constant_path_target_node_t *cast = (pm_constant_path_target_node_t *) node;
517 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parent);
518 pm_node_stack_push(&node_stack, (pm_node_t *) cast->child);
519 break;
520 }
521#line 118 "api_node.c.erb"
522 case PM_CONSTANT_PATH_WRITE_NODE: {
523 pm_constant_path_write_node_t *cast = (pm_constant_path_write_node_t *) node;
524 pm_node_stack_push(&node_stack, (pm_node_t *) cast->target);
525 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
526 break;
527 }
528#line 118 "api_node.c.erb"
529 case PM_CONSTANT_WRITE_NODE: {
530 pm_constant_write_node_t *cast = (pm_constant_write_node_t *) node;
531 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
532 break;
533 }
534#line 118 "api_node.c.erb"
535 case PM_DEF_NODE: {
536 pm_def_node_t *cast = (pm_def_node_t *) node;
537 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
538 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parameters);
539 pm_node_stack_push(&node_stack, (pm_node_t *) cast->body);
540 break;
541 }
542#line 118 "api_node.c.erb"
543 case PM_DEFINED_NODE: {
544 pm_defined_node_t *cast = (pm_defined_node_t *) node;
545 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
546 break;
547 }
548#line 118 "api_node.c.erb"
549 case PM_ELSE_NODE: {
550 pm_else_node_t *cast = (pm_else_node_t *) node;
551 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
552 break;
553 }
554#line 118 "api_node.c.erb"
555 case PM_EMBEDDED_STATEMENTS_NODE: {
556 pm_embedded_statements_node_t *cast = (pm_embedded_statements_node_t *) node;
557 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
558 break;
559 }
560#line 118 "api_node.c.erb"
561 case PM_EMBEDDED_VARIABLE_NODE: {
562 pm_embedded_variable_node_t *cast = (pm_embedded_variable_node_t *) node;
563 pm_node_stack_push(&node_stack, (pm_node_t *) cast->variable);
564 break;
565 }
566#line 118 "api_node.c.erb"
567 case PM_ENSURE_NODE: {
568 pm_ensure_node_t *cast = (pm_ensure_node_t *) node;
569 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
570 break;
571 }
572#line 118 "api_node.c.erb"
573 case PM_FIND_PATTERN_NODE: {
574 pm_find_pattern_node_t *cast = (pm_find_pattern_node_t *) node;
575 pm_node_stack_push(&node_stack, (pm_node_t *) cast->constant);
576 pm_node_stack_push(&node_stack, (pm_node_t *) cast->left);
577 for (size_t index = 0; index < cast->requireds.size; index++) {
578 pm_node_stack_push(&node_stack, (pm_node_t *) cast->requireds.nodes[index]);
579 }
580 pm_node_stack_push(&node_stack, (pm_node_t *) cast->right);
581 break;
582 }
583#line 118 "api_node.c.erb"
584 case PM_FLIP_FLOP_NODE: {
585 pm_flip_flop_node_t *cast = (pm_flip_flop_node_t *) node;
586 pm_node_stack_push(&node_stack, (pm_node_t *) cast->left);
587 pm_node_stack_push(&node_stack, (pm_node_t *) cast->right);
588 break;
589 }
590#line 118 "api_node.c.erb"
591 case PM_FOR_NODE: {
592 pm_for_node_t *cast = (pm_for_node_t *) node;
593 pm_node_stack_push(&node_stack, (pm_node_t *) cast->index);
594 pm_node_stack_push(&node_stack, (pm_node_t *) cast->collection);
595 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
596 break;
597 }
598#line 118 "api_node.c.erb"
599 case PM_FORWARDING_SUPER_NODE: {
600 pm_forwarding_super_node_t *cast = (pm_forwarding_super_node_t *) node;
601 pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
602 break;
603 }
604#line 118 "api_node.c.erb"
605 case PM_GLOBAL_VARIABLE_AND_WRITE_NODE: {
606 pm_global_variable_and_write_node_t *cast = (pm_global_variable_and_write_node_t *) node;
607 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
608 break;
609 }
610#line 118 "api_node.c.erb"
611 case PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: {
612 pm_global_variable_operator_write_node_t *cast = (pm_global_variable_operator_write_node_t *) node;
613 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
614 break;
615 }
616#line 118 "api_node.c.erb"
617 case PM_GLOBAL_VARIABLE_OR_WRITE_NODE: {
618 pm_global_variable_or_write_node_t *cast = (pm_global_variable_or_write_node_t *) node;
619 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
620 break;
621 }
622#line 118 "api_node.c.erb"
623 case PM_GLOBAL_VARIABLE_WRITE_NODE: {
624 pm_global_variable_write_node_t *cast = (pm_global_variable_write_node_t *) node;
625 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
626 break;
627 }
628#line 118 "api_node.c.erb"
629 case PM_HASH_NODE: {
630 pm_hash_node_t *cast = (pm_hash_node_t *) node;
631 for (size_t index = 0; index < cast->elements.size; index++) {
632 pm_node_stack_push(&node_stack, (pm_node_t *) cast->elements.nodes[index]);
633 }
634 break;
635 }
636#line 118 "api_node.c.erb"
637 case PM_HASH_PATTERN_NODE: {
638 pm_hash_pattern_node_t *cast = (pm_hash_pattern_node_t *) node;
639 pm_node_stack_push(&node_stack, (pm_node_t *) cast->constant);
640 for (size_t index = 0; index < cast->elements.size; index++) {
641 pm_node_stack_push(&node_stack, (pm_node_t *) cast->elements.nodes[index]);
642 }
643 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rest);
644 break;
645 }
646#line 118 "api_node.c.erb"
647 case PM_IF_NODE: {
648 pm_if_node_t *cast = (pm_if_node_t *) node;
649 pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate);
650 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
651 pm_node_stack_push(&node_stack, (pm_node_t *) cast->consequent);
652 break;
653 }
654#line 118 "api_node.c.erb"
655 case PM_IMAGINARY_NODE: {
656 pm_imaginary_node_t *cast = (pm_imaginary_node_t *) node;
657 pm_node_stack_push(&node_stack, (pm_node_t *) cast->numeric);
658 break;
659 }
660#line 118 "api_node.c.erb"
661 case PM_IMPLICIT_NODE: {
662 pm_implicit_node_t *cast = (pm_implicit_node_t *) node;
663 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
664 break;
665 }
666#line 118 "api_node.c.erb"
667 case PM_IN_NODE: {
668 pm_in_node_t *cast = (pm_in_node_t *) node;
669 pm_node_stack_push(&node_stack, (pm_node_t *) cast->pattern);
670 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
671 break;
672 }
673#line 118 "api_node.c.erb"
674 case PM_INDEX_AND_WRITE_NODE: {
675 pm_index_and_write_node_t *cast = (pm_index_and_write_node_t *) node;
676 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
677 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
678 pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
679 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
680 break;
681 }
682#line 118 "api_node.c.erb"
683 case PM_INDEX_OPERATOR_WRITE_NODE: {
684 pm_index_operator_write_node_t *cast = (pm_index_operator_write_node_t *) node;
685 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
686 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
687 pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
688 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
689 break;
690 }
691#line 118 "api_node.c.erb"
692 case PM_INDEX_OR_WRITE_NODE: {
693 pm_index_or_write_node_t *cast = (pm_index_or_write_node_t *) node;
694 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
695 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
696 pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
697 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
698 break;
699 }
700#line 118 "api_node.c.erb"
701 case PM_INDEX_TARGET_NODE: {
702 pm_index_target_node_t *cast = (pm_index_target_node_t *) node;
703 pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
704 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
705 pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
706 break;
707 }
708#line 118 "api_node.c.erb"
709 case PM_INSTANCE_VARIABLE_AND_WRITE_NODE: {
710 pm_instance_variable_and_write_node_t *cast = (pm_instance_variable_and_write_node_t *) node;
711 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
712 break;
713 }
714#line 118 "api_node.c.erb"
715 case PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: {
716 pm_instance_variable_operator_write_node_t *cast = (pm_instance_variable_operator_write_node_t *) node;
717 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
718 break;
719 }
720#line 118 "api_node.c.erb"
721 case PM_INSTANCE_VARIABLE_OR_WRITE_NODE: {
722 pm_instance_variable_or_write_node_t *cast = (pm_instance_variable_or_write_node_t *) node;
723 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
724 break;
725 }
726#line 118 "api_node.c.erb"
727 case PM_INSTANCE_VARIABLE_WRITE_NODE: {
728 pm_instance_variable_write_node_t *cast = (pm_instance_variable_write_node_t *) node;
729 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
730 break;
731 }
732#line 118 "api_node.c.erb"
733 case PM_INTERPOLATED_MATCH_LAST_LINE_NODE: {
734 pm_interpolated_match_last_line_node_t *cast = (pm_interpolated_match_last_line_node_t *) node;
735 for (size_t index = 0; index < cast->parts.size; index++) {
736 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parts.nodes[index]);
737 }
738 break;
739 }
740#line 118 "api_node.c.erb"
741 case PM_INTERPOLATED_REGULAR_EXPRESSION_NODE: {
742 pm_interpolated_regular_expression_node_t *cast = (pm_interpolated_regular_expression_node_t *) node;
743 for (size_t index = 0; index < cast->parts.size; index++) {
744 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parts.nodes[index]);
745 }
746 break;
747 }
748#line 118 "api_node.c.erb"
749 case PM_INTERPOLATED_STRING_NODE: {
750 pm_interpolated_string_node_t *cast = (pm_interpolated_string_node_t *) node;
751 for (size_t index = 0; index < cast->parts.size; index++) {
752 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parts.nodes[index]);
753 }
754 break;
755 }
756#line 118 "api_node.c.erb"
757 case PM_INTERPOLATED_SYMBOL_NODE: {
758 pm_interpolated_symbol_node_t *cast = (pm_interpolated_symbol_node_t *) node;
759 for (size_t index = 0; index < cast->parts.size; index++) {
760 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parts.nodes[index]);
761 }
762 break;
763 }
764#line 118 "api_node.c.erb"
765 case PM_INTERPOLATED_X_STRING_NODE: {
766 pm_interpolated_x_string_node_t *cast = (pm_interpolated_x_string_node_t *) node;
767 for (size_t index = 0; index < cast->parts.size; index++) {
768 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parts.nodes[index]);
769 }
770 break;
771 }
772#line 118 "api_node.c.erb"
773 case PM_KEYWORD_HASH_NODE: {
774 pm_keyword_hash_node_t *cast = (pm_keyword_hash_node_t *) node;
775 for (size_t index = 0; index < cast->elements.size; index++) {
776 pm_node_stack_push(&node_stack, (pm_node_t *) cast->elements.nodes[index]);
777 }
778 break;
779 }
780#line 118 "api_node.c.erb"
781 case PM_LAMBDA_NODE: {
782 pm_lambda_node_t *cast = (pm_lambda_node_t *) node;
783 pm_node_stack_push(&node_stack, (pm_node_t *) cast->parameters);
784 pm_node_stack_push(&node_stack, (pm_node_t *) cast->body);
785 break;
786 }
787#line 118 "api_node.c.erb"
788 case PM_LOCAL_VARIABLE_AND_WRITE_NODE: {
789 pm_local_variable_and_write_node_t *cast = (pm_local_variable_and_write_node_t *) node;
790 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
791 break;
792 }
793#line 118 "api_node.c.erb"
794 case PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: {
795 pm_local_variable_operator_write_node_t *cast = (pm_local_variable_operator_write_node_t *) node;
796 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
797 break;
798 }
799#line 118 "api_node.c.erb"
800 case PM_LOCAL_VARIABLE_OR_WRITE_NODE: {
801 pm_local_variable_or_write_node_t *cast = (pm_local_variable_or_write_node_t *) node;
802 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
803 break;
804 }
805#line 118 "api_node.c.erb"
806 case PM_LOCAL_VARIABLE_WRITE_NODE: {
807 pm_local_variable_write_node_t *cast = (pm_local_variable_write_node_t *) node;
808 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
809 break;
810 }
811#line 118 "api_node.c.erb"
812 case PM_MATCH_PREDICATE_NODE: {
813 pm_match_predicate_node_t *cast = (pm_match_predicate_node_t *) node;
814 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
815 pm_node_stack_push(&node_stack, (pm_node_t *) cast->pattern);
816 break;
817 }
818#line 118 "api_node.c.erb"
819 case PM_MATCH_REQUIRED_NODE: {
820 pm_match_required_node_t *cast = (pm_match_required_node_t *) node;
821 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
822 pm_node_stack_push(&node_stack, (pm_node_t *) cast->pattern);
823 break;
824 }
825#line 118 "api_node.c.erb"
826 case PM_MATCH_WRITE_NODE: {
827 pm_match_write_node_t *cast = (pm_match_write_node_t *) node;
828 pm_node_stack_push(&node_stack, (pm_node_t *) cast->call);
829 for (size_t index = 0; index < cast->targets.size; index++) {
830 pm_node_stack_push(&node_stack, (pm_node_t *) cast->targets.nodes[index]);
831 }
832 break;
833 }
834#line 118 "api_node.c.erb"
835 case PM_MODULE_NODE: {
836 pm_module_node_t *cast = (pm_module_node_t *) node;
837 pm_node_stack_push(&node_stack, (pm_node_t *) cast->constant_path);
838 pm_node_stack_push(&node_stack, (pm_node_t *) cast->body);
839 break;
840 }
841#line 118 "api_node.c.erb"
842 case PM_MULTI_TARGET_NODE: {
843 pm_multi_target_node_t *cast = (pm_multi_target_node_t *) node;
844 for (size_t index = 0; index < cast->lefts.size; index++) {
845 pm_node_stack_push(&node_stack, (pm_node_t *) cast->lefts.nodes[index]);
846 }
847 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rest);
848 for (size_t index = 0; index < cast->rights.size; index++) {
849 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rights.nodes[index]);
850 }
851 break;
852 }
853#line 118 "api_node.c.erb"
854 case PM_MULTI_WRITE_NODE: {
855 pm_multi_write_node_t *cast = (pm_multi_write_node_t *) node;
856 for (size_t index = 0; index < cast->lefts.size; index++) {
857 pm_node_stack_push(&node_stack, (pm_node_t *) cast->lefts.nodes[index]);
858 }
859 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rest);
860 for (size_t index = 0; index < cast->rights.size; index++) {
861 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rights.nodes[index]);
862 }
863 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
864 break;
865 }
866#line 118 "api_node.c.erb"
867 case PM_NEXT_NODE: {
868 pm_next_node_t *cast = (pm_next_node_t *) node;
869 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
870 break;
871 }
872#line 118 "api_node.c.erb"
873 case PM_OPTIONAL_KEYWORD_PARAMETER_NODE: {
874 pm_optional_keyword_parameter_node_t *cast = (pm_optional_keyword_parameter_node_t *) node;
875 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
876 break;
877 }
878#line 118 "api_node.c.erb"
879 case PM_OPTIONAL_PARAMETER_NODE: {
880 pm_optional_parameter_node_t *cast = (pm_optional_parameter_node_t *) node;
881 pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
882 break;
883 }
884#line 118 "api_node.c.erb"
885 case PM_OR_NODE: {
886 pm_or_node_t *cast = (pm_or_node_t *) node;
887 pm_node_stack_push(&node_stack, (pm_node_t *) cast->left);
888 pm_node_stack_push(&node_stack, (pm_node_t *) cast->right);
889 break;
890 }
891#line 118 "api_node.c.erb"
892 case PM_PARAMETERS_NODE: {
893 pm_parameters_node_t *cast = (pm_parameters_node_t *) node;
894 for (size_t index = 0; index < cast->requireds.size; index++) {
895 pm_node_stack_push(&node_stack, (pm_node_t *) cast->requireds.nodes[index]);
896 }
897 for (size_t index = 0; index < cast->optionals.size; index++) {
898 pm_node_stack_push(&node_stack, (pm_node_t *) cast->optionals.nodes[index]);
899 }
900 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rest);
901 for (size_t index = 0; index < cast->posts.size; index++) {
902 pm_node_stack_push(&node_stack, (pm_node_t *) cast->posts.nodes[index]);
903 }
904 for (size_t index = 0; index < cast->keywords.size; index++) {
905 pm_node_stack_push(&node_stack, (pm_node_t *) cast->keywords.nodes[index]);
906 }
907 pm_node_stack_push(&node_stack, (pm_node_t *) cast->keyword_rest);
908 pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
909 break;
910 }
911#line 118 "api_node.c.erb"
912 case PM_PARENTHESES_NODE: {
913 pm_parentheses_node_t *cast = (pm_parentheses_node_t *) node;
914 pm_node_stack_push(&node_stack, (pm_node_t *) cast->body);
915 break;
916 }
917#line 118 "api_node.c.erb"
918 case PM_PINNED_EXPRESSION_NODE: {
919 pm_pinned_expression_node_t *cast = (pm_pinned_expression_node_t *) node;
920 pm_node_stack_push(&node_stack, (pm_node_t *) cast->expression);
921 break;
922 }
923#line 118 "api_node.c.erb"
924 case PM_PINNED_VARIABLE_NODE: {
925 pm_pinned_variable_node_t *cast = (pm_pinned_variable_node_t *) node;
926 pm_node_stack_push(&node_stack, (pm_node_t *) cast->variable);
927 break;
928 }
929#line 118 "api_node.c.erb"
930 case PM_POST_EXECUTION_NODE: {
931 pm_post_execution_node_t *cast = (pm_post_execution_node_t *) node;
932 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
933 break;
934 }
935#line 118 "api_node.c.erb"
936 case PM_PRE_EXECUTION_NODE: {
937 pm_pre_execution_node_t *cast = (pm_pre_execution_node_t *) node;
938 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
939 break;
940 }
941#line 118 "api_node.c.erb"
942 case PM_PROGRAM_NODE: {
943 pm_program_node_t *cast = (pm_program_node_t *) node;
944 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
945 break;
946 }
947#line 118 "api_node.c.erb"
948 case PM_RANGE_NODE: {
949 pm_range_node_t *cast = (pm_range_node_t *) node;
950 pm_node_stack_push(&node_stack, (pm_node_t *) cast->left);
951 pm_node_stack_push(&node_stack, (pm_node_t *) cast->right);
952 break;
953 }
954#line 118 "api_node.c.erb"
955 case PM_RATIONAL_NODE: {
956 pm_rational_node_t *cast = (pm_rational_node_t *) node;
957 pm_node_stack_push(&node_stack, (pm_node_t *) cast->numeric);
958 break;
959 }
960#line 118 "api_node.c.erb"
961 case PM_RESCUE_MODIFIER_NODE: {
962 pm_rescue_modifier_node_t *cast = (pm_rescue_modifier_node_t *) node;
963 pm_node_stack_push(&node_stack, (pm_node_t *) cast->expression);
964 pm_node_stack_push(&node_stack, (pm_node_t *) cast->rescue_expression);
965 break;
966 }
967#line 118 "api_node.c.erb"
968 case PM_RESCUE_NODE: {
969 pm_rescue_node_t *cast = (pm_rescue_node_t *) node;
970 for (size_t index = 0; index < cast->exceptions.size; index++) {
971 pm_node_stack_push(&node_stack, (pm_node_t *) cast->exceptions.nodes[index]);
972 }
973 pm_node_stack_push(&node_stack, (pm_node_t *) cast->reference);
974 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
975 pm_node_stack_push(&node_stack, (pm_node_t *) cast->consequent);
976 break;
977 }
978#line 118 "api_node.c.erb"
979 case PM_RETURN_NODE: {
980 pm_return_node_t *cast = (pm_return_node_t *) node;
981 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
982 break;
983 }
984#line 118 "api_node.c.erb"
985 case PM_SINGLETON_CLASS_NODE: {
986 pm_singleton_class_node_t *cast = (pm_singleton_class_node_t *) node;
987 pm_node_stack_push(&node_stack, (pm_node_t *) cast->expression);
988 pm_node_stack_push(&node_stack, (pm_node_t *) cast->body);
989 break;
990 }
991#line 118 "api_node.c.erb"
992 case PM_SPLAT_NODE: {
993 pm_splat_node_t *cast = (pm_splat_node_t *) node;
994 pm_node_stack_push(&node_stack, (pm_node_t *) cast->expression);
995 break;
996 }
997#line 118 "api_node.c.erb"
998 case PM_STATEMENTS_NODE: {
999 pm_statements_node_t *cast = (pm_statements_node_t *) node;
1000 for (size_t index = 0; index < cast->body.size; index++) {
1001 pm_node_stack_push(&node_stack, (pm_node_t *) cast->body.nodes[index]);
1002 }
1003 break;
1004 }
1005#line 118 "api_node.c.erb"
1006 case PM_SUPER_NODE: {
1007 pm_super_node_t *cast = (pm_super_node_t *) node;
1008 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
1009 pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
1010 break;
1011 }
1012#line 118 "api_node.c.erb"
1013 case PM_UNDEF_NODE: {
1014 pm_undef_node_t *cast = (pm_undef_node_t *) node;
1015 for (size_t index = 0; index < cast->names.size; index++) {
1016 pm_node_stack_push(&node_stack, (pm_node_t *) cast->names.nodes[index]);
1017 }
1018 break;
1019 }
1020#line 118 "api_node.c.erb"
1021 case PM_UNLESS_NODE: {
1022 pm_unless_node_t *cast = (pm_unless_node_t *) node;
1023 pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate);
1024 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
1025 pm_node_stack_push(&node_stack, (pm_node_t *) cast->consequent);
1026 break;
1027 }
1028#line 118 "api_node.c.erb"
1029 case PM_UNTIL_NODE: {
1030 pm_until_node_t *cast = (pm_until_node_t *) node;
1031 pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate);
1032 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
1033 break;
1034 }
1035#line 118 "api_node.c.erb"
1036 case PM_WHEN_NODE: {
1037 pm_when_node_t *cast = (pm_when_node_t *) node;
1038 for (size_t index = 0; index < cast->conditions.size; index++) {
1039 pm_node_stack_push(&node_stack, (pm_node_t *) cast->conditions.nodes[index]);
1040 }
1041 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
1042 break;
1043 }
1044#line 118 "api_node.c.erb"
1045 case PM_WHILE_NODE: {
1046 pm_while_node_t *cast = (pm_while_node_t *) node;
1047 pm_node_stack_push(&node_stack, (pm_node_t *) cast->predicate);
1048 pm_node_stack_push(&node_stack, (pm_node_t *) cast->statements);
1049 break;
1050 }
1051#line 118 "api_node.c.erb"
1052 case PM_YIELD_NODE: {
1053 pm_yield_node_t *cast = (pm_yield_node_t *) node;
1054 pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
1055 break;
1056 }
1057 default:
1058 break;
1059 }
1060#line 138 "api_node.c.erb"
1061 } else {
1062 pm_node_t *node = pm_node_stack_pop(&node_stack);
1063
1064 switch (PM_NODE_TYPE(node)) {
1065#line 144 "api_node.c.erb"
1066 case PM_ALIAS_GLOBAL_VARIABLE_NODE: {
1067 pm_alias_global_variable_node_t *cast = (pm_alias_global_variable_node_t *) node;
1068 VALUE argv[4];
1069
1070 // new_name
1071#line 155 "api_node.c.erb"
1072 argv[0] = rb_ary_pop(value_stack);
1073
1074 // old_name
1075#line 155 "api_node.c.erb"
1076 argv[1] = rb_ary_pop(value_stack);
1077
1078 // keyword_loc
1079#line 180 "api_node.c.erb"
1080 argv[2] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
1081
1082 // location
1083 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
1084
1085 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismAliasGlobalVariableNode));
1086 break;
1087 }
1088#line 144 "api_node.c.erb"
1089 case PM_ALIAS_METHOD_NODE: {
1090 pm_alias_method_node_t *cast = (pm_alias_method_node_t *) node;
1091 VALUE argv[4];
1092
1093 // new_name
1094#line 155 "api_node.c.erb"
1095 argv[0] = rb_ary_pop(value_stack);
1096
1097 // old_name
1098#line 155 "api_node.c.erb"
1099 argv[1] = rb_ary_pop(value_stack);
1100
1101 // keyword_loc
1102#line 180 "api_node.c.erb"
1103 argv[2] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
1104
1105 // location
1106 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
1107
1108 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismAliasMethodNode));
1109 break;
1110 }
1111#line 144 "api_node.c.erb"
1112 case PM_ALTERNATION_PATTERN_NODE: {
1113 pm_alternation_pattern_node_t *cast = (pm_alternation_pattern_node_t *) node;
1114 VALUE argv[4];
1115
1116 // left
1117#line 155 "api_node.c.erb"
1118 argv[0] = rb_ary_pop(value_stack);
1119
1120 // right
1121#line 155 "api_node.c.erb"
1122 argv[1] = rb_ary_pop(value_stack);
1123
1124 // operator_loc
1125#line 180 "api_node.c.erb"
1126 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1127
1128 // location
1129 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
1130
1131 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismAlternationPatternNode));
1132 break;
1133 }
1134#line 144 "api_node.c.erb"
1135 case PM_AND_NODE: {
1136 pm_and_node_t *cast = (pm_and_node_t *) node;
1137 VALUE argv[4];
1138
1139 // left
1140#line 155 "api_node.c.erb"
1141 argv[0] = rb_ary_pop(value_stack);
1142
1143 // right
1144#line 155 "api_node.c.erb"
1145 argv[1] = rb_ary_pop(value_stack);
1146
1147 // operator_loc
1148#line 180 "api_node.c.erb"
1149 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1150
1151 // location
1152 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
1153
1154 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismAndNode));
1155 break;
1156 }
1157#line 144 "api_node.c.erb"
1158 case PM_ARGUMENTS_NODE: {
1159 pm_arguments_node_t *cast = (pm_arguments_node_t *) node;
1160 VALUE argv[3];
1161
1162 // flags
1163#line 192 "api_node.c.erb"
1164 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
1165
1166 // arguments
1167#line 158 "api_node.c.erb"
1168 argv[1] = rb_ary_new_capa(cast->arguments.size);
1169 for (size_t index = 0; index < cast->arguments.size; index++) {
1170 rb_ary_push(argv[1], rb_ary_pop(value_stack));
1171 }
1172
1173 // location
1174 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
1175
1176 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismArgumentsNode));
1177 break;
1178 }
1179#line 144 "api_node.c.erb"
1180 case PM_ARRAY_NODE: {
1181 pm_array_node_t *cast = (pm_array_node_t *) node;
1182 VALUE argv[5];
1183
1184 // flags
1185#line 192 "api_node.c.erb"
1186 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
1187
1188 // elements
1189#line 158 "api_node.c.erb"
1190 argv[1] = rb_ary_new_capa(cast->elements.size);
1191 for (size_t index = 0; index < cast->elements.size; index++) {
1192 rb_ary_push(argv[1], rb_ary_pop(value_stack));
1193 }
1194
1195 // opening_loc
1196#line 183 "api_node.c.erb"
1197 argv[2] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
1198
1199 // closing_loc
1200#line 183 "api_node.c.erb"
1201 argv[3] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
1202
1203 // location
1204 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
1205
1206 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismArrayNode));
1207 break;
1208 }
1209#line 144 "api_node.c.erb"
1210 case PM_ARRAY_PATTERN_NODE: {
1211 pm_array_pattern_node_t *cast = (pm_array_pattern_node_t *) node;
1212 VALUE argv[7];
1213
1214 // constant
1215#line 155 "api_node.c.erb"
1216 argv[0] = rb_ary_pop(value_stack);
1217
1218 // requireds
1219#line 158 "api_node.c.erb"
1220 argv[1] = rb_ary_new_capa(cast->requireds.size);
1221 for (size_t index = 0; index < cast->requireds.size; index++) {
1222 rb_ary_push(argv[1], rb_ary_pop(value_stack));
1223 }
1224
1225 // rest
1226#line 155 "api_node.c.erb"
1227 argv[2] = rb_ary_pop(value_stack);
1228
1229 // posts
1230#line 158 "api_node.c.erb"
1231 argv[3] = rb_ary_new_capa(cast->posts.size);
1232 for (size_t index = 0; index < cast->posts.size; index++) {
1233 rb_ary_push(argv[3], rb_ary_pop(value_stack));
1234 }
1235
1236 // opening_loc
1237#line 183 "api_node.c.erb"
1238 argv[4] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
1239
1240 // closing_loc
1241#line 183 "api_node.c.erb"
1242 argv[5] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
1243
1244 // location
1245 argv[6] = pm_location_new(parser, node->location.start, node->location.end, source);
1246
1247 rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismArrayPatternNode));
1248 break;
1249 }
1250#line 144 "api_node.c.erb"
1251 case PM_ASSOC_NODE: {
1252 pm_assoc_node_t *cast = (pm_assoc_node_t *) node;
1253 VALUE argv[4];
1254
1255 // key
1256#line 155 "api_node.c.erb"
1257 argv[0] = rb_ary_pop(value_stack);
1258
1259 // value
1260#line 155 "api_node.c.erb"
1261 argv[1] = rb_ary_pop(value_stack);
1262
1263 // operator_loc
1264#line 183 "api_node.c.erb"
1265 argv[2] = cast->operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1266
1267 // location
1268 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
1269
1270 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismAssocNode));
1271 break;
1272 }
1273#line 144 "api_node.c.erb"
1274 case PM_ASSOC_SPLAT_NODE: {
1275 pm_assoc_splat_node_t *cast = (pm_assoc_splat_node_t *) node;
1276 VALUE argv[3];
1277
1278 // value
1279#line 155 "api_node.c.erb"
1280 argv[0] = rb_ary_pop(value_stack);
1281
1282 // operator_loc
1283#line 180 "api_node.c.erb"
1284 argv[1] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1285
1286 // location
1287 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
1288
1289 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismAssocSplatNode));
1290 break;
1291 }
1292#line 144 "api_node.c.erb"
1293 case PM_BACK_REFERENCE_READ_NODE: {
1294 pm_back_reference_read_node_t *cast = (pm_back_reference_read_node_t *) node;
1295 VALUE argv[2];
1296
1297 // name
1298#line 167 "api_node.c.erb"
1299 assert(cast->name != 0);
1300 argv[0] = rb_id2sym(constants[cast->name - 1]);
1301
1302 // location
1303 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
1304
1305 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismBackReferenceReadNode));
1306 break;
1307 }
1308#line 144 "api_node.c.erb"
1309 case PM_BEGIN_NODE: {
1310 pm_begin_node_t *cast = (pm_begin_node_t *) node;
1311 VALUE argv[7];
1312
1313 // begin_keyword_loc
1314#line 183 "api_node.c.erb"
1315 argv[0] = cast->begin_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->begin_keyword_loc.start, cast->begin_keyword_loc.end, source);
1316
1317 // statements
1318#line 155 "api_node.c.erb"
1319 argv[1] = rb_ary_pop(value_stack);
1320
1321 // rescue_clause
1322#line 155 "api_node.c.erb"
1323 argv[2] = rb_ary_pop(value_stack);
1324
1325 // else_clause
1326#line 155 "api_node.c.erb"
1327 argv[3] = rb_ary_pop(value_stack);
1328
1329 // ensure_clause
1330#line 155 "api_node.c.erb"
1331 argv[4] = rb_ary_pop(value_stack);
1332
1333 // end_keyword_loc
1334#line 183 "api_node.c.erb"
1335 argv[5] = cast->end_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
1336
1337 // location
1338 argv[6] = pm_location_new(parser, node->location.start, node->location.end, source);
1339
1340 rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismBeginNode));
1341 break;
1342 }
1343#line 144 "api_node.c.erb"
1344 case PM_BLOCK_ARGUMENT_NODE: {
1345 pm_block_argument_node_t *cast = (pm_block_argument_node_t *) node;
1346 VALUE argv[3];
1347
1348 // expression
1349#line 155 "api_node.c.erb"
1350 argv[0] = rb_ary_pop(value_stack);
1351
1352 // operator_loc
1353#line 180 "api_node.c.erb"
1354 argv[1] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1355
1356 // location
1357 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
1358
1359 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismBlockArgumentNode));
1360 break;
1361 }
1362#line 144 "api_node.c.erb"
1363 case PM_BLOCK_LOCAL_VARIABLE_NODE: {
1364 pm_block_local_variable_node_t *cast = (pm_block_local_variable_node_t *) node;
1365 VALUE argv[2];
1366
1367 // name
1368#line 167 "api_node.c.erb"
1369 assert(cast->name != 0);
1370 argv[0] = rb_id2sym(constants[cast->name - 1]);
1371
1372 // location
1373 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
1374
1375 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismBlockLocalVariableNode));
1376 break;
1377 }
1378#line 144 "api_node.c.erb"
1379 case PM_BLOCK_NODE: {
1380 pm_block_node_t *cast = (pm_block_node_t *) node;
1381 VALUE argv[7];
1382
1383 // locals
1384#line 173 "api_node.c.erb"
1385 argv[0] = rb_ary_new_capa(cast->locals.size);
1386 for (size_t index = 0; index < cast->locals.size; index++) {
1387 assert(cast->locals.ids[index] != 0);
1388 rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
1389 }
1390
1391 // locals_body_index
1392#line 189 "api_node.c.erb"
1393 argv[1] = ULONG2NUM(cast->locals_body_index);
1394
1395 // parameters
1396#line 155 "api_node.c.erb"
1397 argv[2] = rb_ary_pop(value_stack);
1398
1399 // body
1400#line 155 "api_node.c.erb"
1401 argv[3] = rb_ary_pop(value_stack);
1402
1403 // opening_loc
1404#line 180 "api_node.c.erb"
1405 argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
1406
1407 // closing_loc
1408#line 180 "api_node.c.erb"
1409 argv[5] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
1410
1411 // location
1412 argv[6] = pm_location_new(parser, node->location.start, node->location.end, source);
1413
1414 rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismBlockNode));
1415 break;
1416 }
1417#line 144 "api_node.c.erb"
1418 case PM_BLOCK_PARAMETER_NODE: {
1419 pm_block_parameter_node_t *cast = (pm_block_parameter_node_t *) node;
1420 VALUE argv[4];
1421
1422 // name
1423 argv[0] = cast->name == 0 ? Qnil : rb_id2sym(constants[cast->name - 1]);
1424
1425 // name_loc
1426#line 183 "api_node.c.erb"
1427 argv[1] = cast->name_loc.start == NULL ? Qnil : pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
1428
1429 // operator_loc
1430#line 180 "api_node.c.erb"
1431 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1432
1433 // location
1434 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
1435
1436 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismBlockParameterNode));
1437 break;
1438 }
1439#line 144 "api_node.c.erb"
1440 case PM_BLOCK_PARAMETERS_NODE: {
1441 pm_block_parameters_node_t *cast = (pm_block_parameters_node_t *) node;
1442 VALUE argv[5];
1443
1444 // parameters
1445#line 155 "api_node.c.erb"
1446 argv[0] = rb_ary_pop(value_stack);
1447
1448 // locals
1449#line 158 "api_node.c.erb"
1450 argv[1] = rb_ary_new_capa(cast->locals.size);
1451 for (size_t index = 0; index < cast->locals.size; index++) {
1452 rb_ary_push(argv[1], rb_ary_pop(value_stack));
1453 }
1454
1455 // opening_loc
1456#line 183 "api_node.c.erb"
1457 argv[2] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
1458
1459 // closing_loc
1460#line 183 "api_node.c.erb"
1461 argv[3] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
1462
1463 // location
1464 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
1465
1466 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismBlockParametersNode));
1467 break;
1468 }
1469#line 144 "api_node.c.erb"
1470 case PM_BREAK_NODE: {
1471 pm_break_node_t *cast = (pm_break_node_t *) node;
1472 VALUE argv[3];
1473
1474 // arguments
1475#line 155 "api_node.c.erb"
1476 argv[0] = rb_ary_pop(value_stack);
1477
1478 // keyword_loc
1479#line 180 "api_node.c.erb"
1480 argv[1] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
1481
1482 // location
1483 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
1484
1485 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismBreakNode));
1486 break;
1487 }
1488#line 144 "api_node.c.erb"
1489 case PM_CALL_AND_WRITE_NODE: {
1490 pm_call_and_write_node_t *cast = (pm_call_and_write_node_t *) node;
1491 VALUE argv[9];
1492
1493 // flags
1494#line 192 "api_node.c.erb"
1495 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
1496
1497 // receiver
1498#line 155 "api_node.c.erb"
1499 argv[1] = rb_ary_pop(value_stack);
1500
1501 // call_operator_loc
1502#line 183 "api_node.c.erb"
1503 argv[2] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source);
1504
1505 // message_loc
1506#line 183 "api_node.c.erb"
1507 argv[3] = cast->message_loc.start == NULL ? Qnil : pm_location_new(parser, cast->message_loc.start, cast->message_loc.end, source);
1508
1509 // read_name
1510#line 167 "api_node.c.erb"
1511 assert(cast->read_name != 0);
1512 argv[4] = rb_id2sym(constants[cast->read_name - 1]);
1513
1514 // write_name
1515#line 167 "api_node.c.erb"
1516 assert(cast->write_name != 0);
1517 argv[5] = rb_id2sym(constants[cast->write_name - 1]);
1518
1519 // operator_loc
1520#line 180 "api_node.c.erb"
1521 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1522
1523 // value
1524#line 155 "api_node.c.erb"
1525 argv[7] = rb_ary_pop(value_stack);
1526
1527 // location
1528 argv[8] = pm_location_new(parser, node->location.start, node->location.end, source);
1529
1530 rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismCallAndWriteNode));
1531 break;
1532 }
1533#line 144 "api_node.c.erb"
1534 case PM_CALL_NODE: {
1535 pm_call_node_t *cast = (pm_call_node_t *) node;
1536 VALUE argv[10];
1537
1538 // flags
1539#line 192 "api_node.c.erb"
1540 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
1541
1542 // receiver
1543#line 155 "api_node.c.erb"
1544 argv[1] = rb_ary_pop(value_stack);
1545
1546 // call_operator_loc
1547#line 183 "api_node.c.erb"
1548 argv[2] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source);
1549
1550 // name
1551#line 167 "api_node.c.erb"
1552 assert(cast->name != 0);
1553 argv[3] = rb_id2sym(constants[cast->name - 1]);
1554
1555 // message_loc
1556#line 183 "api_node.c.erb"
1557 argv[4] = cast->message_loc.start == NULL ? Qnil : pm_location_new(parser, cast->message_loc.start, cast->message_loc.end, source);
1558
1559 // opening_loc
1560#line 183 "api_node.c.erb"
1561 argv[5] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
1562
1563 // arguments
1564#line 155 "api_node.c.erb"
1565 argv[6] = rb_ary_pop(value_stack);
1566
1567 // closing_loc
1568#line 183 "api_node.c.erb"
1569 argv[7] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
1570
1571 // block
1572#line 155 "api_node.c.erb"
1573 argv[8] = rb_ary_pop(value_stack);
1574
1575 // location
1576 argv[9] = pm_location_new(parser, node->location.start, node->location.end, source);
1577
1578 rb_ary_push(value_stack, rb_class_new_instance(10, argv, rb_cPrismCallNode));
1579 break;
1580 }
1581#line 144 "api_node.c.erb"
1582 case PM_CALL_OPERATOR_WRITE_NODE: {
1583 pm_call_operator_write_node_t *cast = (pm_call_operator_write_node_t *) node;
1584 VALUE argv[10];
1585
1586 // flags
1587#line 192 "api_node.c.erb"
1588 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
1589
1590 // receiver
1591#line 155 "api_node.c.erb"
1592 argv[1] = rb_ary_pop(value_stack);
1593
1594 // call_operator_loc
1595#line 183 "api_node.c.erb"
1596 argv[2] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source);
1597
1598 // message_loc
1599#line 183 "api_node.c.erb"
1600 argv[3] = cast->message_loc.start == NULL ? Qnil : pm_location_new(parser, cast->message_loc.start, cast->message_loc.end, source);
1601
1602 // read_name
1603#line 167 "api_node.c.erb"
1604 assert(cast->read_name != 0);
1605 argv[4] = rb_id2sym(constants[cast->read_name - 1]);
1606
1607 // write_name
1608#line 167 "api_node.c.erb"
1609 assert(cast->write_name != 0);
1610 argv[5] = rb_id2sym(constants[cast->write_name - 1]);
1611
1612 // operator
1613#line 167 "api_node.c.erb"
1614 assert(cast->operator != 0);
1615 argv[6] = rb_id2sym(constants[cast->operator - 1]);
1616
1617 // operator_loc
1618#line 180 "api_node.c.erb"
1619 argv[7] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1620
1621 // value
1622#line 155 "api_node.c.erb"
1623 argv[8] = rb_ary_pop(value_stack);
1624
1625 // location
1626 argv[9] = pm_location_new(parser, node->location.start, node->location.end, source);
1627
1628 rb_ary_push(value_stack, rb_class_new_instance(10, argv, rb_cPrismCallOperatorWriteNode));
1629 break;
1630 }
1631#line 144 "api_node.c.erb"
1632 case PM_CALL_OR_WRITE_NODE: {
1633 pm_call_or_write_node_t *cast = (pm_call_or_write_node_t *) node;
1634 VALUE argv[9];
1635
1636 // flags
1637#line 192 "api_node.c.erb"
1638 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
1639
1640 // receiver
1641#line 155 "api_node.c.erb"
1642 argv[1] = rb_ary_pop(value_stack);
1643
1644 // call_operator_loc
1645#line 183 "api_node.c.erb"
1646 argv[2] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source);
1647
1648 // message_loc
1649#line 183 "api_node.c.erb"
1650 argv[3] = cast->message_loc.start == NULL ? Qnil : pm_location_new(parser, cast->message_loc.start, cast->message_loc.end, source);
1651
1652 // read_name
1653#line 167 "api_node.c.erb"
1654 assert(cast->read_name != 0);
1655 argv[4] = rb_id2sym(constants[cast->read_name - 1]);
1656
1657 // write_name
1658#line 167 "api_node.c.erb"
1659 assert(cast->write_name != 0);
1660 argv[5] = rb_id2sym(constants[cast->write_name - 1]);
1661
1662 // operator_loc
1663#line 180 "api_node.c.erb"
1664 argv[6] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1665
1666 // value
1667#line 155 "api_node.c.erb"
1668 argv[7] = rb_ary_pop(value_stack);
1669
1670 // location
1671 argv[8] = pm_location_new(parser, node->location.start, node->location.end, source);
1672
1673 rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismCallOrWriteNode));
1674 break;
1675 }
1676#line 144 "api_node.c.erb"
1677 case PM_CALL_TARGET_NODE: {
1678 pm_call_target_node_t *cast = (pm_call_target_node_t *) node;
1679 VALUE argv[6];
1680
1681 // flags
1682#line 192 "api_node.c.erb"
1683 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
1684
1685 // receiver
1686#line 155 "api_node.c.erb"
1687 argv[1] = rb_ary_pop(value_stack);
1688
1689 // call_operator_loc
1690#line 180 "api_node.c.erb"
1691 argv[2] = pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source);
1692
1693 // name
1694#line 167 "api_node.c.erb"
1695 assert(cast->name != 0);
1696 argv[3] = rb_id2sym(constants[cast->name - 1]);
1697
1698 // message_loc
1699#line 180 "api_node.c.erb"
1700 argv[4] = pm_location_new(parser, cast->message_loc.start, cast->message_loc.end, source);
1701
1702 // location
1703 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
1704
1705 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismCallTargetNode));
1706 break;
1707 }
1708#line 144 "api_node.c.erb"
1709 case PM_CAPTURE_PATTERN_NODE: {
1710 pm_capture_pattern_node_t *cast = (pm_capture_pattern_node_t *) node;
1711 VALUE argv[4];
1712
1713 // value
1714#line 155 "api_node.c.erb"
1715 argv[0] = rb_ary_pop(value_stack);
1716
1717 // target
1718#line 155 "api_node.c.erb"
1719 argv[1] = rb_ary_pop(value_stack);
1720
1721 // operator_loc
1722#line 180 "api_node.c.erb"
1723 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1724
1725 // location
1726 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
1727
1728 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismCapturePatternNode));
1729 break;
1730 }
1731#line 144 "api_node.c.erb"
1732 case PM_CASE_MATCH_NODE: {
1733 pm_case_match_node_t *cast = (pm_case_match_node_t *) node;
1734 VALUE argv[6];
1735
1736 // predicate
1737#line 155 "api_node.c.erb"
1738 argv[0] = rb_ary_pop(value_stack);
1739
1740 // conditions
1741#line 158 "api_node.c.erb"
1742 argv[1] = rb_ary_new_capa(cast->conditions.size);
1743 for (size_t index = 0; index < cast->conditions.size; index++) {
1744 rb_ary_push(argv[1], rb_ary_pop(value_stack));
1745 }
1746
1747 // consequent
1748#line 155 "api_node.c.erb"
1749 argv[2] = rb_ary_pop(value_stack);
1750
1751 // case_keyword_loc
1752#line 180 "api_node.c.erb"
1753 argv[3] = pm_location_new(parser, cast->case_keyword_loc.start, cast->case_keyword_loc.end, source);
1754
1755 // end_keyword_loc
1756#line 180 "api_node.c.erb"
1757 argv[4] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
1758
1759 // location
1760 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
1761
1762 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismCaseMatchNode));
1763 break;
1764 }
1765#line 144 "api_node.c.erb"
1766 case PM_CASE_NODE: {
1767 pm_case_node_t *cast = (pm_case_node_t *) node;
1768 VALUE argv[6];
1769
1770 // predicate
1771#line 155 "api_node.c.erb"
1772 argv[0] = rb_ary_pop(value_stack);
1773
1774 // conditions
1775#line 158 "api_node.c.erb"
1776 argv[1] = rb_ary_new_capa(cast->conditions.size);
1777 for (size_t index = 0; index < cast->conditions.size; index++) {
1778 rb_ary_push(argv[1], rb_ary_pop(value_stack));
1779 }
1780
1781 // consequent
1782#line 155 "api_node.c.erb"
1783 argv[2] = rb_ary_pop(value_stack);
1784
1785 // case_keyword_loc
1786#line 180 "api_node.c.erb"
1787 argv[3] = pm_location_new(parser, cast->case_keyword_loc.start, cast->case_keyword_loc.end, source);
1788
1789 // end_keyword_loc
1790#line 180 "api_node.c.erb"
1791 argv[4] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
1792
1793 // location
1794 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
1795
1796 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismCaseNode));
1797 break;
1798 }
1799#line 144 "api_node.c.erb"
1800 case PM_CLASS_NODE: {
1801 pm_class_node_t *cast = (pm_class_node_t *) node;
1802 VALUE argv[9];
1803
1804 // locals
1805#line 173 "api_node.c.erb"
1806 argv[0] = rb_ary_new_capa(cast->locals.size);
1807 for (size_t index = 0; index < cast->locals.size; index++) {
1808 assert(cast->locals.ids[index] != 0);
1809 rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
1810 }
1811
1812 // class_keyword_loc
1813#line 180 "api_node.c.erb"
1814 argv[1] = pm_location_new(parser, cast->class_keyword_loc.start, cast->class_keyword_loc.end, source);
1815
1816 // constant_path
1817#line 155 "api_node.c.erb"
1818 argv[2] = rb_ary_pop(value_stack);
1819
1820 // inheritance_operator_loc
1821#line 183 "api_node.c.erb"
1822 argv[3] = cast->inheritance_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->inheritance_operator_loc.start, cast->inheritance_operator_loc.end, source);
1823
1824 // superclass
1825#line 155 "api_node.c.erb"
1826 argv[4] = rb_ary_pop(value_stack);
1827
1828 // body
1829#line 155 "api_node.c.erb"
1830 argv[5] = rb_ary_pop(value_stack);
1831
1832 // end_keyword_loc
1833#line 180 "api_node.c.erb"
1834 argv[6] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
1835
1836 // name
1837#line 167 "api_node.c.erb"
1838 assert(cast->name != 0);
1839 argv[7] = rb_id2sym(constants[cast->name - 1]);
1840
1841 // location
1842 argv[8] = pm_location_new(parser, node->location.start, node->location.end, source);
1843
1844 rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismClassNode));
1845 break;
1846 }
1847#line 144 "api_node.c.erb"
1848 case PM_CLASS_VARIABLE_AND_WRITE_NODE: {
1849 pm_class_variable_and_write_node_t *cast = (pm_class_variable_and_write_node_t *) node;
1850 VALUE argv[5];
1851
1852 // name
1853#line 167 "api_node.c.erb"
1854 assert(cast->name != 0);
1855 argv[0] = rb_id2sym(constants[cast->name - 1]);
1856
1857 // name_loc
1858#line 180 "api_node.c.erb"
1859 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
1860
1861 // operator_loc
1862#line 180 "api_node.c.erb"
1863 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1864
1865 // value
1866#line 155 "api_node.c.erb"
1867 argv[3] = rb_ary_pop(value_stack);
1868
1869 // location
1870 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
1871
1872 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismClassVariableAndWriteNode));
1873 break;
1874 }
1875#line 144 "api_node.c.erb"
1876 case PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE: {
1877 pm_class_variable_operator_write_node_t *cast = (pm_class_variable_operator_write_node_t *) node;
1878 VALUE argv[6];
1879
1880 // name
1881#line 167 "api_node.c.erb"
1882 assert(cast->name != 0);
1883 argv[0] = rb_id2sym(constants[cast->name - 1]);
1884
1885 // name_loc
1886#line 180 "api_node.c.erb"
1887 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
1888
1889 // operator_loc
1890#line 180 "api_node.c.erb"
1891 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1892
1893 // value
1894#line 155 "api_node.c.erb"
1895 argv[3] = rb_ary_pop(value_stack);
1896
1897 // operator
1898#line 167 "api_node.c.erb"
1899 assert(cast->operator != 0);
1900 argv[4] = rb_id2sym(constants[cast->operator - 1]);
1901
1902 // location
1903 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
1904
1905 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismClassVariableOperatorWriteNode));
1906 break;
1907 }
1908#line 144 "api_node.c.erb"
1909 case PM_CLASS_VARIABLE_OR_WRITE_NODE: {
1910 pm_class_variable_or_write_node_t *cast = (pm_class_variable_or_write_node_t *) node;
1911 VALUE argv[5];
1912
1913 // name
1914#line 167 "api_node.c.erb"
1915 assert(cast->name != 0);
1916 argv[0] = rb_id2sym(constants[cast->name - 1]);
1917
1918 // name_loc
1919#line 180 "api_node.c.erb"
1920 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
1921
1922 // operator_loc
1923#line 180 "api_node.c.erb"
1924 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1925
1926 // value
1927#line 155 "api_node.c.erb"
1928 argv[3] = rb_ary_pop(value_stack);
1929
1930 // location
1931 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
1932
1933 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismClassVariableOrWriteNode));
1934 break;
1935 }
1936#line 144 "api_node.c.erb"
1937 case PM_CLASS_VARIABLE_READ_NODE: {
1938 pm_class_variable_read_node_t *cast = (pm_class_variable_read_node_t *) node;
1939 VALUE argv[2];
1940
1941 // name
1942#line 167 "api_node.c.erb"
1943 assert(cast->name != 0);
1944 argv[0] = rb_id2sym(constants[cast->name - 1]);
1945
1946 // location
1947 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
1948
1949 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismClassVariableReadNode));
1950 break;
1951 }
1952#line 144 "api_node.c.erb"
1953 case PM_CLASS_VARIABLE_TARGET_NODE: {
1954 pm_class_variable_target_node_t *cast = (pm_class_variable_target_node_t *) node;
1955 VALUE argv[2];
1956
1957 // name
1958#line 167 "api_node.c.erb"
1959 assert(cast->name != 0);
1960 argv[0] = rb_id2sym(constants[cast->name - 1]);
1961
1962 // location
1963 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
1964
1965 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismClassVariableTargetNode));
1966 break;
1967 }
1968#line 144 "api_node.c.erb"
1969 case PM_CLASS_VARIABLE_WRITE_NODE: {
1970 pm_class_variable_write_node_t *cast = (pm_class_variable_write_node_t *) node;
1971 VALUE argv[5];
1972
1973 // name
1974#line 167 "api_node.c.erb"
1975 assert(cast->name != 0);
1976 argv[0] = rb_id2sym(constants[cast->name - 1]);
1977
1978 // name_loc
1979#line 180 "api_node.c.erb"
1980 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
1981
1982 // value
1983#line 155 "api_node.c.erb"
1984 argv[2] = rb_ary_pop(value_stack);
1985
1986 // operator_loc
1987#line 183 "api_node.c.erb"
1988 argv[3] = cast->operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1989
1990 // location
1991 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
1992
1993 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismClassVariableWriteNode));
1994 break;
1995 }
1996#line 144 "api_node.c.erb"
1997 case PM_CONSTANT_AND_WRITE_NODE: {
1998 pm_constant_and_write_node_t *cast = (pm_constant_and_write_node_t *) node;
1999 VALUE argv[5];
2000
2001 // name
2002#line 167 "api_node.c.erb"
2003 assert(cast->name != 0);
2004 argv[0] = rb_id2sym(constants[cast->name - 1]);
2005
2006 // name_loc
2007#line 180 "api_node.c.erb"
2008 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2009
2010 // operator_loc
2011#line 180 "api_node.c.erb"
2012 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2013
2014 // value
2015#line 155 "api_node.c.erb"
2016 argv[3] = rb_ary_pop(value_stack);
2017
2018 // location
2019 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
2020
2021 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismConstantAndWriteNode));
2022 break;
2023 }
2024#line 144 "api_node.c.erb"
2025 case PM_CONSTANT_OPERATOR_WRITE_NODE: {
2026 pm_constant_operator_write_node_t *cast = (pm_constant_operator_write_node_t *) node;
2027 VALUE argv[6];
2028
2029 // name
2030#line 167 "api_node.c.erb"
2031 assert(cast->name != 0);
2032 argv[0] = rb_id2sym(constants[cast->name - 1]);
2033
2034 // name_loc
2035#line 180 "api_node.c.erb"
2036 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2037
2038 // operator_loc
2039#line 180 "api_node.c.erb"
2040 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2041
2042 // value
2043#line 155 "api_node.c.erb"
2044 argv[3] = rb_ary_pop(value_stack);
2045
2046 // operator
2047#line 167 "api_node.c.erb"
2048 assert(cast->operator != 0);
2049 argv[4] = rb_id2sym(constants[cast->operator - 1]);
2050
2051 // location
2052 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
2053
2054 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismConstantOperatorWriteNode));
2055 break;
2056 }
2057#line 144 "api_node.c.erb"
2058 case PM_CONSTANT_OR_WRITE_NODE: {
2059 pm_constant_or_write_node_t *cast = (pm_constant_or_write_node_t *) node;
2060 VALUE argv[5];
2061
2062 // name
2063#line 167 "api_node.c.erb"
2064 assert(cast->name != 0);
2065 argv[0] = rb_id2sym(constants[cast->name - 1]);
2066
2067 // name_loc
2068#line 180 "api_node.c.erb"
2069 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2070
2071 // operator_loc
2072#line 180 "api_node.c.erb"
2073 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2074
2075 // value
2076#line 155 "api_node.c.erb"
2077 argv[3] = rb_ary_pop(value_stack);
2078
2079 // location
2080 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
2081
2082 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismConstantOrWriteNode));
2083 break;
2084 }
2085#line 144 "api_node.c.erb"
2086 case PM_CONSTANT_PATH_AND_WRITE_NODE: {
2087 pm_constant_path_and_write_node_t *cast = (pm_constant_path_and_write_node_t *) node;
2088 VALUE argv[4];
2089
2090 // target
2091#line 155 "api_node.c.erb"
2092 argv[0] = rb_ary_pop(value_stack);
2093
2094 // operator_loc
2095#line 180 "api_node.c.erb"
2096 argv[1] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2097
2098 // value
2099#line 155 "api_node.c.erb"
2100 argv[2] = rb_ary_pop(value_stack);
2101
2102 // location
2103 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
2104
2105 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismConstantPathAndWriteNode));
2106 break;
2107 }
2108#line 144 "api_node.c.erb"
2109 case PM_CONSTANT_PATH_NODE: {
2110 pm_constant_path_node_t *cast = (pm_constant_path_node_t *) node;
2111 VALUE argv[4];
2112
2113 // parent
2114#line 155 "api_node.c.erb"
2115 argv[0] = rb_ary_pop(value_stack);
2116
2117 // child
2118#line 155 "api_node.c.erb"
2119 argv[1] = rb_ary_pop(value_stack);
2120
2121 // delimiter_loc
2122#line 180 "api_node.c.erb"
2123 argv[2] = pm_location_new(parser, cast->delimiter_loc.start, cast->delimiter_loc.end, source);
2124
2125 // location
2126 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
2127
2128 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismConstantPathNode));
2129 break;
2130 }
2131#line 144 "api_node.c.erb"
2132 case PM_CONSTANT_PATH_OPERATOR_WRITE_NODE: {
2133 pm_constant_path_operator_write_node_t *cast = (pm_constant_path_operator_write_node_t *) node;
2134 VALUE argv[5];
2135
2136 // target
2137#line 155 "api_node.c.erb"
2138 argv[0] = rb_ary_pop(value_stack);
2139
2140 // operator_loc
2141#line 180 "api_node.c.erb"
2142 argv[1] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2143
2144 // value
2145#line 155 "api_node.c.erb"
2146 argv[2] = rb_ary_pop(value_stack);
2147
2148 // operator
2149#line 167 "api_node.c.erb"
2150 assert(cast->operator != 0);
2151 argv[3] = rb_id2sym(constants[cast->operator - 1]);
2152
2153 // location
2154 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
2155
2156 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismConstantPathOperatorWriteNode));
2157 break;
2158 }
2159#line 144 "api_node.c.erb"
2160 case PM_CONSTANT_PATH_OR_WRITE_NODE: {
2161 pm_constant_path_or_write_node_t *cast = (pm_constant_path_or_write_node_t *) node;
2162 VALUE argv[4];
2163
2164 // target
2165#line 155 "api_node.c.erb"
2166 argv[0] = rb_ary_pop(value_stack);
2167
2168 // operator_loc
2169#line 180 "api_node.c.erb"
2170 argv[1] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2171
2172 // value
2173#line 155 "api_node.c.erb"
2174 argv[2] = rb_ary_pop(value_stack);
2175
2176 // location
2177 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
2178
2179 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismConstantPathOrWriteNode));
2180 break;
2181 }
2182#line 144 "api_node.c.erb"
2183 case PM_CONSTANT_PATH_TARGET_NODE: {
2184 pm_constant_path_target_node_t *cast = (pm_constant_path_target_node_t *) node;
2185 VALUE argv[4];
2186
2187 // parent
2188#line 155 "api_node.c.erb"
2189 argv[0] = rb_ary_pop(value_stack);
2190
2191 // child
2192#line 155 "api_node.c.erb"
2193 argv[1] = rb_ary_pop(value_stack);
2194
2195 // delimiter_loc
2196#line 180 "api_node.c.erb"
2197 argv[2] = pm_location_new(parser, cast->delimiter_loc.start, cast->delimiter_loc.end, source);
2198
2199 // location
2200 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
2201
2202 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismConstantPathTargetNode));
2203 break;
2204 }
2205#line 144 "api_node.c.erb"
2206 case PM_CONSTANT_PATH_WRITE_NODE: {
2207 pm_constant_path_write_node_t *cast = (pm_constant_path_write_node_t *) node;
2208 VALUE argv[4];
2209
2210 // target
2211#line 155 "api_node.c.erb"
2212 argv[0] = rb_ary_pop(value_stack);
2213
2214 // operator_loc
2215#line 180 "api_node.c.erb"
2216 argv[1] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2217
2218 // value
2219#line 155 "api_node.c.erb"
2220 argv[2] = rb_ary_pop(value_stack);
2221
2222 // location
2223 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
2224
2225 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismConstantPathWriteNode));
2226 break;
2227 }
2228#line 144 "api_node.c.erb"
2229 case PM_CONSTANT_READ_NODE: {
2230 pm_constant_read_node_t *cast = (pm_constant_read_node_t *) node;
2231 VALUE argv[2];
2232
2233 // name
2234#line 167 "api_node.c.erb"
2235 assert(cast->name != 0);
2236 argv[0] = rb_id2sym(constants[cast->name - 1]);
2237
2238 // location
2239 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
2240
2241 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismConstantReadNode));
2242 break;
2243 }
2244#line 144 "api_node.c.erb"
2245 case PM_CONSTANT_TARGET_NODE: {
2246 pm_constant_target_node_t *cast = (pm_constant_target_node_t *) node;
2247 VALUE argv[2];
2248
2249 // name
2250#line 167 "api_node.c.erb"
2251 assert(cast->name != 0);
2252 argv[0] = rb_id2sym(constants[cast->name - 1]);
2253
2254 // location
2255 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
2256
2257 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismConstantTargetNode));
2258 break;
2259 }
2260#line 144 "api_node.c.erb"
2261 case PM_CONSTANT_WRITE_NODE: {
2262 pm_constant_write_node_t *cast = (pm_constant_write_node_t *) node;
2263 VALUE argv[5];
2264
2265 // name
2266#line 167 "api_node.c.erb"
2267 assert(cast->name != 0);
2268 argv[0] = rb_id2sym(constants[cast->name - 1]);
2269
2270 // name_loc
2271#line 180 "api_node.c.erb"
2272 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2273
2274 // value
2275#line 155 "api_node.c.erb"
2276 argv[2] = rb_ary_pop(value_stack);
2277
2278 // operator_loc
2279#line 180 "api_node.c.erb"
2280 argv[3] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2281
2282 // location
2283 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
2284
2285 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismConstantWriteNode));
2286 break;
2287 }
2288#line 144 "api_node.c.erb"
2289 case PM_DEF_NODE: {
2290 pm_def_node_t *cast = (pm_def_node_t *) node;
2291 VALUE argv[14];
2292
2293 // name
2294#line 167 "api_node.c.erb"
2295 assert(cast->name != 0);
2296 argv[0] = rb_id2sym(constants[cast->name - 1]);
2297
2298 // name_loc
2299#line 180 "api_node.c.erb"
2300 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2301
2302 // receiver
2303#line 155 "api_node.c.erb"
2304 argv[2] = rb_ary_pop(value_stack);
2305
2306 // parameters
2307#line 155 "api_node.c.erb"
2308 argv[3] = rb_ary_pop(value_stack);
2309
2310 // body
2311#line 155 "api_node.c.erb"
2312 argv[4] = rb_ary_pop(value_stack);
2313
2314 // locals
2315#line 173 "api_node.c.erb"
2316 argv[5] = rb_ary_new_capa(cast->locals.size);
2317 for (size_t index = 0; index < cast->locals.size; index++) {
2318 assert(cast->locals.ids[index] != 0);
2319 rb_ary_push(argv[5], rb_id2sym(constants[cast->locals.ids[index] - 1]));
2320 }
2321
2322 // locals_body_index
2323#line 189 "api_node.c.erb"
2324 argv[6] = ULONG2NUM(cast->locals_body_index);
2325
2326 // def_keyword_loc
2327#line 180 "api_node.c.erb"
2328 argv[7] = pm_location_new(parser, cast->def_keyword_loc.start, cast->def_keyword_loc.end, source);
2329
2330 // operator_loc
2331#line 183 "api_node.c.erb"
2332 argv[8] = cast->operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2333
2334 // lparen_loc
2335#line 183 "api_node.c.erb"
2336 argv[9] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source);
2337
2338 // rparen_loc
2339#line 183 "api_node.c.erb"
2340 argv[10] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source);
2341
2342 // equal_loc
2343#line 183 "api_node.c.erb"
2344 argv[11] = cast->equal_loc.start == NULL ? Qnil : pm_location_new(parser, cast->equal_loc.start, cast->equal_loc.end, source);
2345
2346 // end_keyword_loc
2347#line 183 "api_node.c.erb"
2348 argv[12] = cast->end_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
2349
2350 // location
2351 argv[13] = pm_location_new(parser, node->location.start, node->location.end, source);
2352
2353 rb_ary_push(value_stack, rb_class_new_instance(14, argv, rb_cPrismDefNode));
2354 break;
2355 }
2356#line 144 "api_node.c.erb"
2357 case PM_DEFINED_NODE: {
2358 pm_defined_node_t *cast = (pm_defined_node_t *) node;
2359 VALUE argv[5];
2360
2361 // lparen_loc
2362#line 183 "api_node.c.erb"
2363 argv[0] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source);
2364
2365 // value
2366#line 155 "api_node.c.erb"
2367 argv[1] = rb_ary_pop(value_stack);
2368
2369 // rparen_loc
2370#line 183 "api_node.c.erb"
2371 argv[2] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source);
2372
2373 // keyword_loc
2374#line 180 "api_node.c.erb"
2375 argv[3] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
2376
2377 // location
2378 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
2379
2380 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismDefinedNode));
2381 break;
2382 }
2383#line 144 "api_node.c.erb"
2384 case PM_ELSE_NODE: {
2385 pm_else_node_t *cast = (pm_else_node_t *) node;
2386 VALUE argv[4];
2387
2388 // else_keyword_loc
2389#line 180 "api_node.c.erb"
2390 argv[0] = pm_location_new(parser, cast->else_keyword_loc.start, cast->else_keyword_loc.end, source);
2391
2392 // statements
2393#line 155 "api_node.c.erb"
2394 argv[1] = rb_ary_pop(value_stack);
2395
2396 // end_keyword_loc
2397#line 183 "api_node.c.erb"
2398 argv[2] = cast->end_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
2399
2400 // location
2401 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
2402
2403 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismElseNode));
2404 break;
2405 }
2406#line 144 "api_node.c.erb"
2407 case PM_EMBEDDED_STATEMENTS_NODE: {
2408 pm_embedded_statements_node_t *cast = (pm_embedded_statements_node_t *) node;
2409 VALUE argv[4];
2410
2411 // opening_loc
2412#line 180 "api_node.c.erb"
2413 argv[0] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2414
2415 // statements
2416#line 155 "api_node.c.erb"
2417 argv[1] = rb_ary_pop(value_stack);
2418
2419 // closing_loc
2420#line 180 "api_node.c.erb"
2421 argv[2] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
2422
2423 // location
2424 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
2425
2426 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismEmbeddedStatementsNode));
2427 break;
2428 }
2429#line 144 "api_node.c.erb"
2430 case PM_EMBEDDED_VARIABLE_NODE: {
2431 pm_embedded_variable_node_t *cast = (pm_embedded_variable_node_t *) node;
2432 VALUE argv[3];
2433
2434 // operator_loc
2435#line 180 "api_node.c.erb"
2436 argv[0] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2437
2438 // variable
2439#line 155 "api_node.c.erb"
2440 argv[1] = rb_ary_pop(value_stack);
2441
2442 // location
2443 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
2444
2445 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismEmbeddedVariableNode));
2446 break;
2447 }
2448#line 144 "api_node.c.erb"
2449 case PM_ENSURE_NODE: {
2450 pm_ensure_node_t *cast = (pm_ensure_node_t *) node;
2451 VALUE argv[4];
2452
2453 // ensure_keyword_loc
2454#line 180 "api_node.c.erb"
2455 argv[0] = pm_location_new(parser, cast->ensure_keyword_loc.start, cast->ensure_keyword_loc.end, source);
2456
2457 // statements
2458#line 155 "api_node.c.erb"
2459 argv[1] = rb_ary_pop(value_stack);
2460
2461 // end_keyword_loc
2462#line 180 "api_node.c.erb"
2463 argv[2] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
2464
2465 // location
2466 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
2467
2468 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismEnsureNode));
2469 break;
2470 }
2471#line 144 "api_node.c.erb"
2472 case PM_FALSE_NODE: {
2473 VALUE argv[1];
2474
2475 // location
2476 argv[0] = pm_location_new(parser, node->location.start, node->location.end, source);
2477
2478 rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cPrismFalseNode));
2479 break;
2480 }
2481#line 144 "api_node.c.erb"
2482 case PM_FIND_PATTERN_NODE: {
2483 pm_find_pattern_node_t *cast = (pm_find_pattern_node_t *) node;
2484 VALUE argv[7];
2485
2486 // constant
2487#line 155 "api_node.c.erb"
2488 argv[0] = rb_ary_pop(value_stack);
2489
2490 // left
2491#line 155 "api_node.c.erb"
2492 argv[1] = rb_ary_pop(value_stack);
2493
2494 // requireds
2495#line 158 "api_node.c.erb"
2496 argv[2] = rb_ary_new_capa(cast->requireds.size);
2497 for (size_t index = 0; index < cast->requireds.size; index++) {
2498 rb_ary_push(argv[2], rb_ary_pop(value_stack));
2499 }
2500
2501 // right
2502#line 155 "api_node.c.erb"
2503 argv[3] = rb_ary_pop(value_stack);
2504
2505 // opening_loc
2506#line 183 "api_node.c.erb"
2507 argv[4] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2508
2509 // closing_loc
2510#line 183 "api_node.c.erb"
2511 argv[5] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
2512
2513 // location
2514 argv[6] = pm_location_new(parser, node->location.start, node->location.end, source);
2515
2516 rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismFindPatternNode));
2517 break;
2518 }
2519#line 144 "api_node.c.erb"
2520 case PM_FLIP_FLOP_NODE: {
2521 pm_flip_flop_node_t *cast = (pm_flip_flop_node_t *) node;
2522 VALUE argv[5];
2523
2524 // flags
2525#line 192 "api_node.c.erb"
2526 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
2527
2528 // left
2529#line 155 "api_node.c.erb"
2530 argv[1] = rb_ary_pop(value_stack);
2531
2532 // right
2533#line 155 "api_node.c.erb"
2534 argv[2] = rb_ary_pop(value_stack);
2535
2536 // operator_loc
2537#line 180 "api_node.c.erb"
2538 argv[3] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2539
2540 // location
2541 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
2542
2543 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismFlipFlopNode));
2544 break;
2545 }
2546#line 144 "api_node.c.erb"
2547 case PM_FLOAT_NODE: {
2548 VALUE argv[1];
2549
2550 // location
2551 argv[0] = pm_location_new(parser, node->location.start, node->location.end, source);
2552
2553 rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cPrismFloatNode));
2554 break;
2555 }
2556#line 144 "api_node.c.erb"
2557 case PM_FOR_NODE: {
2558 pm_for_node_t *cast = (pm_for_node_t *) node;
2559 VALUE argv[8];
2560
2561 // index
2562#line 155 "api_node.c.erb"
2563 argv[0] = rb_ary_pop(value_stack);
2564
2565 // collection
2566#line 155 "api_node.c.erb"
2567 argv[1] = rb_ary_pop(value_stack);
2568
2569 // statements
2570#line 155 "api_node.c.erb"
2571 argv[2] = rb_ary_pop(value_stack);
2572
2573 // for_keyword_loc
2574#line 180 "api_node.c.erb"
2575 argv[3] = pm_location_new(parser, cast->for_keyword_loc.start, cast->for_keyword_loc.end, source);
2576
2577 // in_keyword_loc
2578#line 180 "api_node.c.erb"
2579 argv[4] = pm_location_new(parser, cast->in_keyword_loc.start, cast->in_keyword_loc.end, source);
2580
2581 // do_keyword_loc
2582#line 183 "api_node.c.erb"
2583 argv[5] = cast->do_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->do_keyword_loc.start, cast->do_keyword_loc.end, source);
2584
2585 // end_keyword_loc
2586#line 180 "api_node.c.erb"
2587 argv[6] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
2588
2589 // location
2590 argv[7] = pm_location_new(parser, node->location.start, node->location.end, source);
2591
2592 rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismForNode));
2593 break;
2594 }
2595#line 144 "api_node.c.erb"
2596 case PM_FORWARDING_ARGUMENTS_NODE: {
2597 VALUE argv[1];
2598
2599 // location
2600 argv[0] = pm_location_new(parser, node->location.start, node->location.end, source);
2601
2602 rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cPrismForwardingArgumentsNode));
2603 break;
2604 }
2605#line 144 "api_node.c.erb"
2606 case PM_FORWARDING_PARAMETER_NODE: {
2607 VALUE argv[1];
2608
2609 // location
2610 argv[0] = pm_location_new(parser, node->location.start, node->location.end, source);
2611
2612 rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cPrismForwardingParameterNode));
2613 break;
2614 }
2615#line 144 "api_node.c.erb"
2616 case PM_FORWARDING_SUPER_NODE: {
2617 VALUE argv[2];
2618
2619 // block
2620#line 155 "api_node.c.erb"
2621 argv[0] = rb_ary_pop(value_stack);
2622
2623 // location
2624 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
2625
2626 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismForwardingSuperNode));
2627 break;
2628 }
2629#line 144 "api_node.c.erb"
2630 case PM_GLOBAL_VARIABLE_AND_WRITE_NODE: {
2631 pm_global_variable_and_write_node_t *cast = (pm_global_variable_and_write_node_t *) node;
2632 VALUE argv[5];
2633
2634 // name
2635#line 167 "api_node.c.erb"
2636 assert(cast->name != 0);
2637 argv[0] = rb_id2sym(constants[cast->name - 1]);
2638
2639 // name_loc
2640#line 180 "api_node.c.erb"
2641 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2642
2643 // operator_loc
2644#line 180 "api_node.c.erb"
2645 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2646
2647 // value
2648#line 155 "api_node.c.erb"
2649 argv[3] = rb_ary_pop(value_stack);
2650
2651 // location
2652 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
2653
2654 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismGlobalVariableAndWriteNode));
2655 break;
2656 }
2657#line 144 "api_node.c.erb"
2658 case PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: {
2659 pm_global_variable_operator_write_node_t *cast = (pm_global_variable_operator_write_node_t *) node;
2660 VALUE argv[6];
2661
2662 // name
2663#line 167 "api_node.c.erb"
2664 assert(cast->name != 0);
2665 argv[0] = rb_id2sym(constants[cast->name - 1]);
2666
2667 // name_loc
2668#line 180 "api_node.c.erb"
2669 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2670
2671 // operator_loc
2672#line 180 "api_node.c.erb"
2673 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2674
2675 // value
2676#line 155 "api_node.c.erb"
2677 argv[3] = rb_ary_pop(value_stack);
2678
2679 // operator
2680#line 167 "api_node.c.erb"
2681 assert(cast->operator != 0);
2682 argv[4] = rb_id2sym(constants[cast->operator - 1]);
2683
2684 // location
2685 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
2686
2687 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismGlobalVariableOperatorWriteNode));
2688 break;
2689 }
2690#line 144 "api_node.c.erb"
2691 case PM_GLOBAL_VARIABLE_OR_WRITE_NODE: {
2692 pm_global_variable_or_write_node_t *cast = (pm_global_variable_or_write_node_t *) node;
2693 VALUE argv[5];
2694
2695 // name
2696#line 167 "api_node.c.erb"
2697 assert(cast->name != 0);
2698 argv[0] = rb_id2sym(constants[cast->name - 1]);
2699
2700 // name_loc
2701#line 180 "api_node.c.erb"
2702 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2703
2704 // operator_loc
2705#line 180 "api_node.c.erb"
2706 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2707
2708 // value
2709#line 155 "api_node.c.erb"
2710 argv[3] = rb_ary_pop(value_stack);
2711
2712 // location
2713 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
2714
2715 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismGlobalVariableOrWriteNode));
2716 break;
2717 }
2718#line 144 "api_node.c.erb"
2719 case PM_GLOBAL_VARIABLE_READ_NODE: {
2720 pm_global_variable_read_node_t *cast = (pm_global_variable_read_node_t *) node;
2721 VALUE argv[2];
2722
2723 // name
2724#line 167 "api_node.c.erb"
2725 assert(cast->name != 0);
2726 argv[0] = rb_id2sym(constants[cast->name - 1]);
2727
2728 // location
2729 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
2730
2731 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismGlobalVariableReadNode));
2732 break;
2733 }
2734#line 144 "api_node.c.erb"
2735 case PM_GLOBAL_VARIABLE_TARGET_NODE: {
2736 pm_global_variable_target_node_t *cast = (pm_global_variable_target_node_t *) node;
2737 VALUE argv[2];
2738
2739 // name
2740#line 167 "api_node.c.erb"
2741 assert(cast->name != 0);
2742 argv[0] = rb_id2sym(constants[cast->name - 1]);
2743
2744 // location
2745 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
2746
2747 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismGlobalVariableTargetNode));
2748 break;
2749 }
2750#line 144 "api_node.c.erb"
2751 case PM_GLOBAL_VARIABLE_WRITE_NODE: {
2752 pm_global_variable_write_node_t *cast = (pm_global_variable_write_node_t *) node;
2753 VALUE argv[5];
2754
2755 // name
2756#line 167 "api_node.c.erb"
2757 assert(cast->name != 0);
2758 argv[0] = rb_id2sym(constants[cast->name - 1]);
2759
2760 // name_loc
2761#line 180 "api_node.c.erb"
2762 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2763
2764 // value
2765#line 155 "api_node.c.erb"
2766 argv[2] = rb_ary_pop(value_stack);
2767
2768 // operator_loc
2769#line 180 "api_node.c.erb"
2770 argv[3] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2771
2772 // location
2773 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
2774
2775 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismGlobalVariableWriteNode));
2776 break;
2777 }
2778#line 144 "api_node.c.erb"
2779 case PM_HASH_NODE: {
2780 pm_hash_node_t *cast = (pm_hash_node_t *) node;
2781 VALUE argv[4];
2782
2783 // opening_loc
2784#line 180 "api_node.c.erb"
2785 argv[0] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2786
2787 // elements
2788#line 158 "api_node.c.erb"
2789 argv[1] = rb_ary_new_capa(cast->elements.size);
2790 for (size_t index = 0; index < cast->elements.size; index++) {
2791 rb_ary_push(argv[1], rb_ary_pop(value_stack));
2792 }
2793
2794 // closing_loc
2795#line 180 "api_node.c.erb"
2796 argv[2] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
2797
2798 // location
2799 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
2800
2801 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismHashNode));
2802 break;
2803 }
2804#line 144 "api_node.c.erb"
2805 case PM_HASH_PATTERN_NODE: {
2806 pm_hash_pattern_node_t *cast = (pm_hash_pattern_node_t *) node;
2807 VALUE argv[6];
2808
2809 // constant
2810#line 155 "api_node.c.erb"
2811 argv[0] = rb_ary_pop(value_stack);
2812
2813 // elements
2814#line 158 "api_node.c.erb"
2815 argv[1] = rb_ary_new_capa(cast->elements.size);
2816 for (size_t index = 0; index < cast->elements.size; index++) {
2817 rb_ary_push(argv[1], rb_ary_pop(value_stack));
2818 }
2819
2820 // rest
2821#line 155 "api_node.c.erb"
2822 argv[2] = rb_ary_pop(value_stack);
2823
2824 // opening_loc
2825#line 183 "api_node.c.erb"
2826 argv[3] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2827
2828 // closing_loc
2829#line 183 "api_node.c.erb"
2830 argv[4] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
2831
2832 // location
2833 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
2834
2835 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismHashPatternNode));
2836 break;
2837 }
2838#line 144 "api_node.c.erb"
2839 case PM_IF_NODE: {
2840 pm_if_node_t *cast = (pm_if_node_t *) node;
2841 VALUE argv[7];
2842
2843 // if_keyword_loc
2844#line 183 "api_node.c.erb"
2845 argv[0] = cast->if_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->if_keyword_loc.start, cast->if_keyword_loc.end, source);
2846
2847 // predicate
2848#line 155 "api_node.c.erb"
2849 argv[1] = rb_ary_pop(value_stack);
2850
2851 // then_keyword_loc
2852#line 183 "api_node.c.erb"
2853 argv[2] = cast->then_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->then_keyword_loc.start, cast->then_keyword_loc.end, source);
2854
2855 // statements
2856#line 155 "api_node.c.erb"
2857 argv[3] = rb_ary_pop(value_stack);
2858
2859 // consequent
2860#line 155 "api_node.c.erb"
2861 argv[4] = rb_ary_pop(value_stack);
2862
2863 // end_keyword_loc
2864#line 183 "api_node.c.erb"
2865 argv[5] = cast->end_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
2866
2867 // location
2868 argv[6] = pm_location_new(parser, node->location.start, node->location.end, source);
2869
2870 rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismIfNode));
2871 break;
2872 }
2873#line 144 "api_node.c.erb"
2874 case PM_IMAGINARY_NODE: {
2875 VALUE argv[2];
2876
2877 // numeric
2878#line 155 "api_node.c.erb"
2879 argv[0] = rb_ary_pop(value_stack);
2880
2881 // location
2882 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
2883
2884 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismImaginaryNode));
2885 break;
2886 }
2887#line 144 "api_node.c.erb"
2888 case PM_IMPLICIT_NODE: {
2889 VALUE argv[2];
2890
2891 // value
2892#line 155 "api_node.c.erb"
2893 argv[0] = rb_ary_pop(value_stack);
2894
2895 // location
2896 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
2897
2898 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismImplicitNode));
2899 break;
2900 }
2901#line 144 "api_node.c.erb"
2902 case PM_IMPLICIT_REST_NODE: {
2903 VALUE argv[1];
2904
2905 // location
2906 argv[0] = pm_location_new(parser, node->location.start, node->location.end, source);
2907
2908 rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cPrismImplicitRestNode));
2909 break;
2910 }
2911#line 144 "api_node.c.erb"
2912 case PM_IN_NODE: {
2913 pm_in_node_t *cast = (pm_in_node_t *) node;
2914 VALUE argv[5];
2915
2916 // pattern
2917#line 155 "api_node.c.erb"
2918 argv[0] = rb_ary_pop(value_stack);
2919
2920 // statements
2921#line 155 "api_node.c.erb"
2922 argv[1] = rb_ary_pop(value_stack);
2923
2924 // in_loc
2925#line 180 "api_node.c.erb"
2926 argv[2] = pm_location_new(parser, cast->in_loc.start, cast->in_loc.end, source);
2927
2928 // then_loc
2929#line 183 "api_node.c.erb"
2930 argv[3] = cast->then_loc.start == NULL ? Qnil : pm_location_new(parser, cast->then_loc.start, cast->then_loc.end, source);
2931
2932 // location
2933 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
2934
2935 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismInNode));
2936 break;
2937 }
2938#line 144 "api_node.c.erb"
2939 case PM_INDEX_AND_WRITE_NODE: {
2940 pm_index_and_write_node_t *cast = (pm_index_and_write_node_t *) node;
2941 VALUE argv[10];
2942
2943 // flags
2944#line 192 "api_node.c.erb"
2945 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
2946
2947 // receiver
2948#line 155 "api_node.c.erb"
2949 argv[1] = rb_ary_pop(value_stack);
2950
2951 // call_operator_loc
2952#line 183 "api_node.c.erb"
2953 argv[2] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source);
2954
2955 // opening_loc
2956#line 180 "api_node.c.erb"
2957 argv[3] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2958
2959 // arguments
2960#line 155 "api_node.c.erb"
2961 argv[4] = rb_ary_pop(value_stack);
2962
2963 // closing_loc
2964#line 180 "api_node.c.erb"
2965 argv[5] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
2966
2967 // block
2968#line 155 "api_node.c.erb"
2969 argv[6] = rb_ary_pop(value_stack);
2970
2971 // operator_loc
2972#line 180 "api_node.c.erb"
2973 argv[7] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2974
2975 // value
2976#line 155 "api_node.c.erb"
2977 argv[8] = rb_ary_pop(value_stack);
2978
2979 // location
2980 argv[9] = pm_location_new(parser, node->location.start, node->location.end, source);
2981
2982 rb_ary_push(value_stack, rb_class_new_instance(10, argv, rb_cPrismIndexAndWriteNode));
2983 break;
2984 }
2985#line 144 "api_node.c.erb"
2986 case PM_INDEX_OPERATOR_WRITE_NODE: {
2987 pm_index_operator_write_node_t *cast = (pm_index_operator_write_node_t *) node;
2988 VALUE argv[11];
2989
2990 // flags
2991#line 192 "api_node.c.erb"
2992 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
2993
2994 // receiver
2995#line 155 "api_node.c.erb"
2996 argv[1] = rb_ary_pop(value_stack);
2997
2998 // call_operator_loc
2999#line 183 "api_node.c.erb"
3000 argv[2] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source);
3001
3002 // opening_loc
3003#line 180 "api_node.c.erb"
3004 argv[3] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
3005
3006 // arguments
3007#line 155 "api_node.c.erb"
3008 argv[4] = rb_ary_pop(value_stack);
3009
3010 // closing_loc
3011#line 180 "api_node.c.erb"
3012 argv[5] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3013
3014 // block
3015#line 155 "api_node.c.erb"
3016 argv[6] = rb_ary_pop(value_stack);
3017
3018 // operator
3019#line 167 "api_node.c.erb"
3020 assert(cast->operator != 0);
3021 argv[7] = rb_id2sym(constants[cast->operator - 1]);
3022
3023 // operator_loc
3024#line 180 "api_node.c.erb"
3025 argv[8] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3026
3027 // value
3028#line 155 "api_node.c.erb"
3029 argv[9] = rb_ary_pop(value_stack);
3030
3031 // location
3032 argv[10] = pm_location_new(parser, node->location.start, node->location.end, source);
3033
3034 rb_ary_push(value_stack, rb_class_new_instance(11, argv, rb_cPrismIndexOperatorWriteNode));
3035 break;
3036 }
3037#line 144 "api_node.c.erb"
3038 case PM_INDEX_OR_WRITE_NODE: {
3039 pm_index_or_write_node_t *cast = (pm_index_or_write_node_t *) node;
3040 VALUE argv[10];
3041
3042 // flags
3043#line 192 "api_node.c.erb"
3044 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
3045
3046 // receiver
3047#line 155 "api_node.c.erb"
3048 argv[1] = rb_ary_pop(value_stack);
3049
3050 // call_operator_loc
3051#line 183 "api_node.c.erb"
3052 argv[2] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source);
3053
3054 // opening_loc
3055#line 180 "api_node.c.erb"
3056 argv[3] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
3057
3058 // arguments
3059#line 155 "api_node.c.erb"
3060 argv[4] = rb_ary_pop(value_stack);
3061
3062 // closing_loc
3063#line 180 "api_node.c.erb"
3064 argv[5] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3065
3066 // block
3067#line 155 "api_node.c.erb"
3068 argv[6] = rb_ary_pop(value_stack);
3069
3070 // operator_loc
3071#line 180 "api_node.c.erb"
3072 argv[7] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3073
3074 // value
3075#line 155 "api_node.c.erb"
3076 argv[8] = rb_ary_pop(value_stack);
3077
3078 // location
3079 argv[9] = pm_location_new(parser, node->location.start, node->location.end, source);
3080
3081 rb_ary_push(value_stack, rb_class_new_instance(10, argv, rb_cPrismIndexOrWriteNode));
3082 break;
3083 }
3084#line 144 "api_node.c.erb"
3085 case PM_INDEX_TARGET_NODE: {
3086 pm_index_target_node_t *cast = (pm_index_target_node_t *) node;
3087 VALUE argv[7];
3088
3089 // flags
3090#line 192 "api_node.c.erb"
3091 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
3092
3093 // receiver
3094#line 155 "api_node.c.erb"
3095 argv[1] = rb_ary_pop(value_stack);
3096
3097 // opening_loc
3098#line 180 "api_node.c.erb"
3099 argv[2] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
3100
3101 // arguments
3102#line 155 "api_node.c.erb"
3103 argv[3] = rb_ary_pop(value_stack);
3104
3105 // closing_loc
3106#line 180 "api_node.c.erb"
3107 argv[4] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3108
3109 // block
3110#line 155 "api_node.c.erb"
3111 argv[5] = rb_ary_pop(value_stack);
3112
3113 // location
3114 argv[6] = pm_location_new(parser, node->location.start, node->location.end, source);
3115
3116 rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismIndexTargetNode));
3117 break;
3118 }
3119#line 144 "api_node.c.erb"
3120 case PM_INSTANCE_VARIABLE_AND_WRITE_NODE: {
3121 pm_instance_variable_and_write_node_t *cast = (pm_instance_variable_and_write_node_t *) node;
3122 VALUE argv[5];
3123
3124 // name
3125#line 167 "api_node.c.erb"
3126 assert(cast->name != 0);
3127 argv[0] = rb_id2sym(constants[cast->name - 1]);
3128
3129 // name_loc
3130#line 180 "api_node.c.erb"
3131 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
3132
3133 // operator_loc
3134#line 180 "api_node.c.erb"
3135 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3136
3137 // value
3138#line 155 "api_node.c.erb"
3139 argv[3] = rb_ary_pop(value_stack);
3140
3141 // location
3142 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
3143
3144 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismInstanceVariableAndWriteNode));
3145 break;
3146 }
3147#line 144 "api_node.c.erb"
3148 case PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: {
3149 pm_instance_variable_operator_write_node_t *cast = (pm_instance_variable_operator_write_node_t *) node;
3150 VALUE argv[6];
3151
3152 // name
3153#line 167 "api_node.c.erb"
3154 assert(cast->name != 0);
3155 argv[0] = rb_id2sym(constants[cast->name - 1]);
3156
3157 // name_loc
3158#line 180 "api_node.c.erb"
3159 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
3160
3161 // operator_loc
3162#line 180 "api_node.c.erb"
3163 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3164
3165 // value
3166#line 155 "api_node.c.erb"
3167 argv[3] = rb_ary_pop(value_stack);
3168
3169 // operator
3170#line 167 "api_node.c.erb"
3171 assert(cast->operator != 0);
3172 argv[4] = rb_id2sym(constants[cast->operator - 1]);
3173
3174 // location
3175 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
3176
3177 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismInstanceVariableOperatorWriteNode));
3178 break;
3179 }
3180#line 144 "api_node.c.erb"
3181 case PM_INSTANCE_VARIABLE_OR_WRITE_NODE: {
3182 pm_instance_variable_or_write_node_t *cast = (pm_instance_variable_or_write_node_t *) node;
3183 VALUE argv[5];
3184
3185 // name
3186#line 167 "api_node.c.erb"
3187 assert(cast->name != 0);
3188 argv[0] = rb_id2sym(constants[cast->name - 1]);
3189
3190 // name_loc
3191#line 180 "api_node.c.erb"
3192 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
3193
3194 // operator_loc
3195#line 180 "api_node.c.erb"
3196 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3197
3198 // value
3199#line 155 "api_node.c.erb"
3200 argv[3] = rb_ary_pop(value_stack);
3201
3202 // location
3203 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
3204
3205 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismInstanceVariableOrWriteNode));
3206 break;
3207 }
3208#line 144 "api_node.c.erb"
3209 case PM_INSTANCE_VARIABLE_READ_NODE: {
3210 pm_instance_variable_read_node_t *cast = (pm_instance_variable_read_node_t *) node;
3211 VALUE argv[2];
3212
3213 // name
3214#line 167 "api_node.c.erb"
3215 assert(cast->name != 0);
3216 argv[0] = rb_id2sym(constants[cast->name - 1]);
3217
3218 // location
3219 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
3220
3221 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismInstanceVariableReadNode));
3222 break;
3223 }
3224#line 144 "api_node.c.erb"
3225 case PM_INSTANCE_VARIABLE_TARGET_NODE: {
3226 pm_instance_variable_target_node_t *cast = (pm_instance_variable_target_node_t *) node;
3227 VALUE argv[2];
3228
3229 // name
3230#line 167 "api_node.c.erb"
3231 assert(cast->name != 0);
3232 argv[0] = rb_id2sym(constants[cast->name - 1]);
3233
3234 // location
3235 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
3236
3237 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismInstanceVariableTargetNode));
3238 break;
3239 }
3240#line 144 "api_node.c.erb"
3241 case PM_INSTANCE_VARIABLE_WRITE_NODE: {
3242 pm_instance_variable_write_node_t *cast = (pm_instance_variable_write_node_t *) node;
3243 VALUE argv[5];
3244
3245 // name
3246#line 167 "api_node.c.erb"
3247 assert(cast->name != 0);
3248 argv[0] = rb_id2sym(constants[cast->name - 1]);
3249
3250 // name_loc
3251#line 180 "api_node.c.erb"
3252 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
3253
3254 // value
3255#line 155 "api_node.c.erb"
3256 argv[2] = rb_ary_pop(value_stack);
3257
3258 // operator_loc
3259#line 180 "api_node.c.erb"
3260 argv[3] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3261
3262 // location
3263 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
3264
3265 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismInstanceVariableWriteNode));
3266 break;
3267 }
3268#line 144 "api_node.c.erb"
3269 case PM_INTEGER_NODE: {
3270 VALUE argv[2];
3271
3272 // flags
3273#line 192 "api_node.c.erb"
3274 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
3275
3276 // location
3277 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
3278
3279 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismIntegerNode));
3280 break;
3281 }
3282#line 144 "api_node.c.erb"
3283 case PM_INTERPOLATED_MATCH_LAST_LINE_NODE: {
3284 pm_interpolated_match_last_line_node_t *cast = (pm_interpolated_match_last_line_node_t *) node;
3285 VALUE argv[5];
3286
3287 // flags
3288#line 192 "api_node.c.erb"
3289 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
3290
3291 // opening_loc
3292#line 180 "api_node.c.erb"
3293 argv[1] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
3294
3295 // parts
3296#line 158 "api_node.c.erb"
3297 argv[2] = rb_ary_new_capa(cast->parts.size);
3298 for (size_t index = 0; index < cast->parts.size; index++) {
3299 rb_ary_push(argv[2], rb_ary_pop(value_stack));
3300 }
3301
3302 // closing_loc
3303#line 180 "api_node.c.erb"
3304 argv[3] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3305
3306 // location
3307 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
3308
3309 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismInterpolatedMatchLastLineNode));
3310 break;
3311 }
3312#line 144 "api_node.c.erb"
3313 case PM_INTERPOLATED_REGULAR_EXPRESSION_NODE: {
3314 pm_interpolated_regular_expression_node_t *cast = (pm_interpolated_regular_expression_node_t *) node;
3315 VALUE argv[5];
3316
3317 // flags
3318#line 192 "api_node.c.erb"
3319 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
3320
3321 // opening_loc
3322#line 180 "api_node.c.erb"
3323 argv[1] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
3324
3325 // parts
3326#line 158 "api_node.c.erb"
3327 argv[2] = rb_ary_new_capa(cast->parts.size);
3328 for (size_t index = 0; index < cast->parts.size; index++) {
3329 rb_ary_push(argv[2], rb_ary_pop(value_stack));
3330 }
3331
3332 // closing_loc
3333#line 180 "api_node.c.erb"
3334 argv[3] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3335
3336 // location
3337 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
3338
3339 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismInterpolatedRegularExpressionNode));
3340 break;
3341 }
3342#line 144 "api_node.c.erb"
3343 case PM_INTERPOLATED_STRING_NODE: {
3344 pm_interpolated_string_node_t *cast = (pm_interpolated_string_node_t *) node;
3345 VALUE argv[4];
3346
3347 // opening_loc
3348#line 183 "api_node.c.erb"
3349 argv[0] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
3350
3351 // parts
3352#line 158 "api_node.c.erb"
3353 argv[1] = rb_ary_new_capa(cast->parts.size);
3354 for (size_t index = 0; index < cast->parts.size; index++) {
3355 rb_ary_push(argv[1], rb_ary_pop(value_stack));
3356 }
3357
3358 // closing_loc
3359#line 183 "api_node.c.erb"
3360 argv[2] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3361
3362 // location
3363 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
3364
3365 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismInterpolatedStringNode));
3366 break;
3367 }
3368#line 144 "api_node.c.erb"
3369 case PM_INTERPOLATED_SYMBOL_NODE: {
3370 pm_interpolated_symbol_node_t *cast = (pm_interpolated_symbol_node_t *) node;
3371 VALUE argv[4];
3372
3373 // opening_loc
3374#line 183 "api_node.c.erb"
3375 argv[0] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
3376
3377 // parts
3378#line 158 "api_node.c.erb"
3379 argv[1] = rb_ary_new_capa(cast->parts.size);
3380 for (size_t index = 0; index < cast->parts.size; index++) {
3381 rb_ary_push(argv[1], rb_ary_pop(value_stack));
3382 }
3383
3384 // closing_loc
3385#line 183 "api_node.c.erb"
3386 argv[2] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3387
3388 // location
3389 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
3390
3391 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismInterpolatedSymbolNode));
3392 break;
3393 }
3394#line 144 "api_node.c.erb"
3395 case PM_INTERPOLATED_X_STRING_NODE: {
3396 pm_interpolated_x_string_node_t *cast = (pm_interpolated_x_string_node_t *) node;
3397 VALUE argv[4];
3398
3399 // opening_loc
3400#line 180 "api_node.c.erb"
3401 argv[0] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
3402
3403 // parts
3404#line 158 "api_node.c.erb"
3405 argv[1] = rb_ary_new_capa(cast->parts.size);
3406 for (size_t index = 0; index < cast->parts.size; index++) {
3407 rb_ary_push(argv[1], rb_ary_pop(value_stack));
3408 }
3409
3410 // closing_loc
3411#line 180 "api_node.c.erb"
3412 argv[2] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3413
3414 // location
3415 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
3416
3417 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismInterpolatedXStringNode));
3418 break;
3419 }
3420#line 144 "api_node.c.erb"
3421 case PM_KEYWORD_HASH_NODE: {
3422 pm_keyword_hash_node_t *cast = (pm_keyword_hash_node_t *) node;
3423 VALUE argv[3];
3424
3425 // flags
3426#line 192 "api_node.c.erb"
3427 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
3428
3429 // elements
3430#line 158 "api_node.c.erb"
3431 argv[1] = rb_ary_new_capa(cast->elements.size);
3432 for (size_t index = 0; index < cast->elements.size; index++) {
3433 rb_ary_push(argv[1], rb_ary_pop(value_stack));
3434 }
3435
3436 // location
3437 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
3438
3439 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismKeywordHashNode));
3440 break;
3441 }
3442#line 144 "api_node.c.erb"
3443 case PM_KEYWORD_REST_PARAMETER_NODE: {
3444 pm_keyword_rest_parameter_node_t *cast = (pm_keyword_rest_parameter_node_t *) node;
3445 VALUE argv[4];
3446
3447 // name
3448 argv[0] = cast->name == 0 ? Qnil : rb_id2sym(constants[cast->name - 1]);
3449
3450 // name_loc
3451#line 183 "api_node.c.erb"
3452 argv[1] = cast->name_loc.start == NULL ? Qnil : pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
3453
3454 // operator_loc
3455#line 180 "api_node.c.erb"
3456 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3457
3458 // location
3459 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
3460
3461 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismKeywordRestParameterNode));
3462 break;
3463 }
3464#line 144 "api_node.c.erb"
3465 case PM_LAMBDA_NODE: {
3466 pm_lambda_node_t *cast = (pm_lambda_node_t *) node;
3467 VALUE argv[8];
3468
3469 // locals
3470#line 173 "api_node.c.erb"
3471 argv[0] = rb_ary_new_capa(cast->locals.size);
3472 for (size_t index = 0; index < cast->locals.size; index++) {
3473 assert(cast->locals.ids[index] != 0);
3474 rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
3475 }
3476
3477 // locals_body_index
3478#line 189 "api_node.c.erb"
3479 argv[1] = ULONG2NUM(cast->locals_body_index);
3480
3481 // operator_loc
3482#line 180 "api_node.c.erb"
3483 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3484
3485 // opening_loc
3486#line 180 "api_node.c.erb"
3487 argv[3] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
3488
3489 // closing_loc
3490#line 180 "api_node.c.erb"
3491 argv[4] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3492
3493 // parameters
3494#line 155 "api_node.c.erb"
3495 argv[5] = rb_ary_pop(value_stack);
3496
3497 // body
3498#line 155 "api_node.c.erb"
3499 argv[6] = rb_ary_pop(value_stack);
3500
3501 // location
3502 argv[7] = pm_location_new(parser, node->location.start, node->location.end, source);
3503
3504 rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismLambdaNode));
3505 break;
3506 }
3507#line 144 "api_node.c.erb"
3508 case PM_LOCAL_VARIABLE_AND_WRITE_NODE: {
3509 pm_local_variable_and_write_node_t *cast = (pm_local_variable_and_write_node_t *) node;
3510 VALUE argv[6];
3511
3512 // name_loc
3513#line 180 "api_node.c.erb"
3514 argv[0] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
3515
3516 // operator_loc
3517#line 180 "api_node.c.erb"
3518 argv[1] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3519
3520 // value
3521#line 155 "api_node.c.erb"
3522 argv[2] = rb_ary_pop(value_stack);
3523
3524 // name
3525#line 167 "api_node.c.erb"
3526 assert(cast->name != 0);
3527 argv[3] = rb_id2sym(constants[cast->name - 1]);
3528
3529 // depth
3530#line 189 "api_node.c.erb"
3531 argv[4] = ULONG2NUM(cast->depth);
3532
3533 // location
3534 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
3535
3536 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismLocalVariableAndWriteNode));
3537 break;
3538 }
3539#line 144 "api_node.c.erb"
3540 case PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: {
3541 pm_local_variable_operator_write_node_t *cast = (pm_local_variable_operator_write_node_t *) node;
3542 VALUE argv[7];
3543
3544 // name_loc
3545#line 180 "api_node.c.erb"
3546 argv[0] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
3547
3548 // operator_loc
3549#line 180 "api_node.c.erb"
3550 argv[1] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3551
3552 // value
3553#line 155 "api_node.c.erb"
3554 argv[2] = rb_ary_pop(value_stack);
3555
3556 // name
3557#line 167 "api_node.c.erb"
3558 assert(cast->name != 0);
3559 argv[3] = rb_id2sym(constants[cast->name - 1]);
3560
3561 // operator
3562#line 167 "api_node.c.erb"
3563 assert(cast->operator != 0);
3564 argv[4] = rb_id2sym(constants[cast->operator - 1]);
3565
3566 // depth
3567#line 189 "api_node.c.erb"
3568 argv[5] = ULONG2NUM(cast->depth);
3569
3570 // location
3571 argv[6] = pm_location_new(parser, node->location.start, node->location.end, source);
3572
3573 rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismLocalVariableOperatorWriteNode));
3574 break;
3575 }
3576#line 144 "api_node.c.erb"
3577 case PM_LOCAL_VARIABLE_OR_WRITE_NODE: {
3578 pm_local_variable_or_write_node_t *cast = (pm_local_variable_or_write_node_t *) node;
3579 VALUE argv[6];
3580
3581 // name_loc
3582#line 180 "api_node.c.erb"
3583 argv[0] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
3584
3585 // operator_loc
3586#line 180 "api_node.c.erb"
3587 argv[1] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3588
3589 // value
3590#line 155 "api_node.c.erb"
3591 argv[2] = rb_ary_pop(value_stack);
3592
3593 // name
3594#line 167 "api_node.c.erb"
3595 assert(cast->name != 0);
3596 argv[3] = rb_id2sym(constants[cast->name - 1]);
3597
3598 // depth
3599#line 189 "api_node.c.erb"
3600 argv[4] = ULONG2NUM(cast->depth);
3601
3602 // location
3603 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
3604
3605 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismLocalVariableOrWriteNode));
3606 break;
3607 }
3608#line 144 "api_node.c.erb"
3609 case PM_LOCAL_VARIABLE_READ_NODE: {
3610 pm_local_variable_read_node_t *cast = (pm_local_variable_read_node_t *) node;
3611 VALUE argv[3];
3612
3613 // name
3614#line 167 "api_node.c.erb"
3615 assert(cast->name != 0);
3616 argv[0] = rb_id2sym(constants[cast->name - 1]);
3617
3618 // depth
3619#line 189 "api_node.c.erb"
3620 argv[1] = ULONG2NUM(cast->depth);
3621
3622 // location
3623 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
3624
3625 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismLocalVariableReadNode));
3626 break;
3627 }
3628#line 144 "api_node.c.erb"
3629 case PM_LOCAL_VARIABLE_TARGET_NODE: {
3630 pm_local_variable_target_node_t *cast = (pm_local_variable_target_node_t *) node;
3631 VALUE argv[3];
3632
3633 // name
3634#line 167 "api_node.c.erb"
3635 assert(cast->name != 0);
3636 argv[0] = rb_id2sym(constants[cast->name - 1]);
3637
3638 // depth
3639#line 189 "api_node.c.erb"
3640 argv[1] = ULONG2NUM(cast->depth);
3641
3642 // location
3643 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
3644
3645 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismLocalVariableTargetNode));
3646 break;
3647 }
3648#line 144 "api_node.c.erb"
3649 case PM_LOCAL_VARIABLE_WRITE_NODE: {
3650 pm_local_variable_write_node_t *cast = (pm_local_variable_write_node_t *) node;
3651 VALUE argv[6];
3652
3653 // name
3654#line 167 "api_node.c.erb"
3655 assert(cast->name != 0);
3656 argv[0] = rb_id2sym(constants[cast->name - 1]);
3657
3658 // depth
3659#line 189 "api_node.c.erb"
3660 argv[1] = ULONG2NUM(cast->depth);
3661
3662 // name_loc
3663#line 180 "api_node.c.erb"
3664 argv[2] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
3665
3666 // value
3667#line 155 "api_node.c.erb"
3668 argv[3] = rb_ary_pop(value_stack);
3669
3670 // operator_loc
3671#line 180 "api_node.c.erb"
3672 argv[4] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3673
3674 // location
3675 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
3676
3677 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismLocalVariableWriteNode));
3678 break;
3679 }
3680#line 144 "api_node.c.erb"
3681 case PM_MATCH_LAST_LINE_NODE: {
3682 pm_match_last_line_node_t *cast = (pm_match_last_line_node_t *) node;
3683 VALUE argv[6];
3684
3685 // flags
3686#line 192 "api_node.c.erb"
3687 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
3688
3689 // opening_loc
3690#line 180 "api_node.c.erb"
3691 argv[1] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
3692
3693 // content_loc
3694#line 180 "api_node.c.erb"
3695 argv[2] = pm_location_new(parser, cast->content_loc.start, cast->content_loc.end, source);
3696
3697 // closing_loc
3698#line 180 "api_node.c.erb"
3699 argv[3] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3700
3701 // unescaped
3702#line 164 "api_node.c.erb"
3703 argv[4] = pm_string_new(&cast->unescaped, encoding);
3704
3705 // location
3706 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
3707
3708 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismMatchLastLineNode));
3709 break;
3710 }
3711#line 144 "api_node.c.erb"
3712 case PM_MATCH_PREDICATE_NODE: {
3713 pm_match_predicate_node_t *cast = (pm_match_predicate_node_t *) node;
3714 VALUE argv[4];
3715
3716 // value
3717#line 155 "api_node.c.erb"
3718 argv[0] = rb_ary_pop(value_stack);
3719
3720 // pattern
3721#line 155 "api_node.c.erb"
3722 argv[1] = rb_ary_pop(value_stack);
3723
3724 // operator_loc
3725#line 180 "api_node.c.erb"
3726 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3727
3728 // location
3729 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
3730
3731 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismMatchPredicateNode));
3732 break;
3733 }
3734#line 144 "api_node.c.erb"
3735 case PM_MATCH_REQUIRED_NODE: {
3736 pm_match_required_node_t *cast = (pm_match_required_node_t *) node;
3737 VALUE argv[4];
3738
3739 // value
3740#line 155 "api_node.c.erb"
3741 argv[0] = rb_ary_pop(value_stack);
3742
3743 // pattern
3744#line 155 "api_node.c.erb"
3745 argv[1] = rb_ary_pop(value_stack);
3746
3747 // operator_loc
3748#line 180 "api_node.c.erb"
3749 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3750
3751 // location
3752 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
3753
3754 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismMatchRequiredNode));
3755 break;
3756 }
3757#line 144 "api_node.c.erb"
3758 case PM_MATCH_WRITE_NODE: {
3759 pm_match_write_node_t *cast = (pm_match_write_node_t *) node;
3760 VALUE argv[3];
3761
3762 // call
3763#line 155 "api_node.c.erb"
3764 argv[0] = rb_ary_pop(value_stack);
3765
3766 // targets
3767#line 158 "api_node.c.erb"
3768 argv[1] = rb_ary_new_capa(cast->targets.size);
3769 for (size_t index = 0; index < cast->targets.size; index++) {
3770 rb_ary_push(argv[1], rb_ary_pop(value_stack));
3771 }
3772
3773 // location
3774 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
3775
3776 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismMatchWriteNode));
3777 break;
3778 }
3779#line 144 "api_node.c.erb"
3780 case PM_MISSING_NODE: {
3781 VALUE argv[1];
3782
3783 // location
3784 argv[0] = pm_location_new(parser, node->location.start, node->location.end, source);
3785
3786 rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cPrismMissingNode));
3787 break;
3788 }
3789#line 144 "api_node.c.erb"
3790 case PM_MODULE_NODE: {
3791 pm_module_node_t *cast = (pm_module_node_t *) node;
3792 VALUE argv[7];
3793
3794 // locals
3795#line 173 "api_node.c.erb"
3796 argv[0] = rb_ary_new_capa(cast->locals.size);
3797 for (size_t index = 0; index < cast->locals.size; index++) {
3798 assert(cast->locals.ids[index] != 0);
3799 rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
3800 }
3801
3802 // module_keyword_loc
3803#line 180 "api_node.c.erb"
3804 argv[1] = pm_location_new(parser, cast->module_keyword_loc.start, cast->module_keyword_loc.end, source);
3805
3806 // constant_path
3807#line 155 "api_node.c.erb"
3808 argv[2] = rb_ary_pop(value_stack);
3809
3810 // body
3811#line 155 "api_node.c.erb"
3812 argv[3] = rb_ary_pop(value_stack);
3813
3814 // end_keyword_loc
3815#line 180 "api_node.c.erb"
3816 argv[4] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
3817
3818 // name
3819#line 167 "api_node.c.erb"
3820 assert(cast->name != 0);
3821 argv[5] = rb_id2sym(constants[cast->name - 1]);
3822
3823 // location
3824 argv[6] = pm_location_new(parser, node->location.start, node->location.end, source);
3825
3826 rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismModuleNode));
3827 break;
3828 }
3829#line 144 "api_node.c.erb"
3830 case PM_MULTI_TARGET_NODE: {
3831 pm_multi_target_node_t *cast = (pm_multi_target_node_t *) node;
3832 VALUE argv[6];
3833
3834 // lefts
3835#line 158 "api_node.c.erb"
3836 argv[0] = rb_ary_new_capa(cast->lefts.size);
3837 for (size_t index = 0; index < cast->lefts.size; index++) {
3838 rb_ary_push(argv[0], rb_ary_pop(value_stack));
3839 }
3840
3841 // rest
3842#line 155 "api_node.c.erb"
3843 argv[1] = rb_ary_pop(value_stack);
3844
3845 // rights
3846#line 158 "api_node.c.erb"
3847 argv[2] = rb_ary_new_capa(cast->rights.size);
3848 for (size_t index = 0; index < cast->rights.size; index++) {
3849 rb_ary_push(argv[2], rb_ary_pop(value_stack));
3850 }
3851
3852 // lparen_loc
3853#line 183 "api_node.c.erb"
3854 argv[3] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source);
3855
3856 // rparen_loc
3857#line 183 "api_node.c.erb"
3858 argv[4] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source);
3859
3860 // location
3861 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
3862
3863 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismMultiTargetNode));
3864 break;
3865 }
3866#line 144 "api_node.c.erb"
3867 case PM_MULTI_WRITE_NODE: {
3868 pm_multi_write_node_t *cast = (pm_multi_write_node_t *) node;
3869 VALUE argv[8];
3870
3871 // lefts
3872#line 158 "api_node.c.erb"
3873 argv[0] = rb_ary_new_capa(cast->lefts.size);
3874 for (size_t index = 0; index < cast->lefts.size; index++) {
3875 rb_ary_push(argv[0], rb_ary_pop(value_stack));
3876 }
3877
3878 // rest
3879#line 155 "api_node.c.erb"
3880 argv[1] = rb_ary_pop(value_stack);
3881
3882 // rights
3883#line 158 "api_node.c.erb"
3884 argv[2] = rb_ary_new_capa(cast->rights.size);
3885 for (size_t index = 0; index < cast->rights.size; index++) {
3886 rb_ary_push(argv[2], rb_ary_pop(value_stack));
3887 }
3888
3889 // lparen_loc
3890#line 183 "api_node.c.erb"
3891 argv[3] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source);
3892
3893 // rparen_loc
3894#line 183 "api_node.c.erb"
3895 argv[4] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source);
3896
3897 // operator_loc
3898#line 180 "api_node.c.erb"
3899 argv[5] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3900
3901 // value
3902#line 155 "api_node.c.erb"
3903 argv[6] = rb_ary_pop(value_stack);
3904
3905 // location
3906 argv[7] = pm_location_new(parser, node->location.start, node->location.end, source);
3907
3908 rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismMultiWriteNode));
3909 break;
3910 }
3911#line 144 "api_node.c.erb"
3912 case PM_NEXT_NODE: {
3913 pm_next_node_t *cast = (pm_next_node_t *) node;
3914 VALUE argv[3];
3915
3916 // arguments
3917#line 155 "api_node.c.erb"
3918 argv[0] = rb_ary_pop(value_stack);
3919
3920 // keyword_loc
3921#line 180 "api_node.c.erb"
3922 argv[1] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
3923
3924 // location
3925 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
3926
3927 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismNextNode));
3928 break;
3929 }
3930#line 144 "api_node.c.erb"
3931 case PM_NIL_NODE: {
3932 VALUE argv[1];
3933
3934 // location
3935 argv[0] = pm_location_new(parser, node->location.start, node->location.end, source);
3936
3937 rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cPrismNilNode));
3938 break;
3939 }
3940#line 144 "api_node.c.erb"
3941 case PM_NO_KEYWORDS_PARAMETER_NODE: {
3942 pm_no_keywords_parameter_node_t *cast = (pm_no_keywords_parameter_node_t *) node;
3943 VALUE argv[3];
3944
3945 // operator_loc
3946#line 180 "api_node.c.erb"
3947 argv[0] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3948
3949 // keyword_loc
3950#line 180 "api_node.c.erb"
3951 argv[1] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
3952
3953 // location
3954 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
3955
3956 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismNoKeywordsParameterNode));
3957 break;
3958 }
3959#line 144 "api_node.c.erb"
3960 case PM_NUMBERED_PARAMETERS_NODE: {
3961 pm_numbered_parameters_node_t *cast = (pm_numbered_parameters_node_t *) node;
3962 VALUE argv[2];
3963
3964 // maximum
3965#line 186 "api_node.c.erb"
3966 argv[0] = UINT2NUM(cast->maximum);
3967
3968 // location
3969 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
3970
3971 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismNumberedParametersNode));
3972 break;
3973 }
3974#line 144 "api_node.c.erb"
3975 case PM_NUMBERED_REFERENCE_READ_NODE: {
3976 pm_numbered_reference_read_node_t *cast = (pm_numbered_reference_read_node_t *) node;
3977 VALUE argv[2];
3978
3979 // number
3980#line 189 "api_node.c.erb"
3981 argv[0] = ULONG2NUM(cast->number);
3982
3983 // location
3984 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
3985
3986 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismNumberedReferenceReadNode));
3987 break;
3988 }
3989#line 144 "api_node.c.erb"
3990 case PM_OPTIONAL_KEYWORD_PARAMETER_NODE: {
3991 pm_optional_keyword_parameter_node_t *cast = (pm_optional_keyword_parameter_node_t *) node;
3992 VALUE argv[4];
3993
3994 // name
3995#line 167 "api_node.c.erb"
3996 assert(cast->name != 0);
3997 argv[0] = rb_id2sym(constants[cast->name - 1]);
3998
3999 // name_loc
4000#line 180 "api_node.c.erb"
4001 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
4002
4003 // value
4004#line 155 "api_node.c.erb"
4005 argv[2] = rb_ary_pop(value_stack);
4006
4007 // location
4008 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
4009
4010 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismOptionalKeywordParameterNode));
4011 break;
4012 }
4013#line 144 "api_node.c.erb"
4014 case PM_OPTIONAL_PARAMETER_NODE: {
4015 pm_optional_parameter_node_t *cast = (pm_optional_parameter_node_t *) node;
4016 VALUE argv[5];
4017
4018 // name
4019#line 167 "api_node.c.erb"
4020 assert(cast->name != 0);
4021 argv[0] = rb_id2sym(constants[cast->name - 1]);
4022
4023 // name_loc
4024#line 180 "api_node.c.erb"
4025 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
4026
4027 // operator_loc
4028#line 180 "api_node.c.erb"
4029 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
4030
4031 // value
4032#line 155 "api_node.c.erb"
4033 argv[3] = rb_ary_pop(value_stack);
4034
4035 // location
4036 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
4037
4038 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismOptionalParameterNode));
4039 break;
4040 }
4041#line 144 "api_node.c.erb"
4042 case PM_OR_NODE: {
4043 pm_or_node_t *cast = (pm_or_node_t *) node;
4044 VALUE argv[4];
4045
4046 // left
4047#line 155 "api_node.c.erb"
4048 argv[0] = rb_ary_pop(value_stack);
4049
4050 // right
4051#line 155 "api_node.c.erb"
4052 argv[1] = rb_ary_pop(value_stack);
4053
4054 // operator_loc
4055#line 180 "api_node.c.erb"
4056 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
4057
4058 // location
4059 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
4060
4061 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismOrNode));
4062 break;
4063 }
4064#line 144 "api_node.c.erb"
4065 case PM_PARAMETERS_NODE: {
4066 pm_parameters_node_t *cast = (pm_parameters_node_t *) node;
4067 VALUE argv[8];
4068
4069 // requireds
4070#line 158 "api_node.c.erb"
4071 argv[0] = rb_ary_new_capa(cast->requireds.size);
4072 for (size_t index = 0; index < cast->requireds.size; index++) {
4073 rb_ary_push(argv[0], rb_ary_pop(value_stack));
4074 }
4075
4076 // optionals
4077#line 158 "api_node.c.erb"
4078 argv[1] = rb_ary_new_capa(cast->optionals.size);
4079 for (size_t index = 0; index < cast->optionals.size; index++) {
4080 rb_ary_push(argv[1], rb_ary_pop(value_stack));
4081 }
4082
4083 // rest
4084#line 155 "api_node.c.erb"
4085 argv[2] = rb_ary_pop(value_stack);
4086
4087 // posts
4088#line 158 "api_node.c.erb"
4089 argv[3] = rb_ary_new_capa(cast->posts.size);
4090 for (size_t index = 0; index < cast->posts.size; index++) {
4091 rb_ary_push(argv[3], rb_ary_pop(value_stack));
4092 }
4093
4094 // keywords
4095#line 158 "api_node.c.erb"
4096 argv[4] = rb_ary_new_capa(cast->keywords.size);
4097 for (size_t index = 0; index < cast->keywords.size; index++) {
4098 rb_ary_push(argv[4], rb_ary_pop(value_stack));
4099 }
4100
4101 // keyword_rest
4102#line 155 "api_node.c.erb"
4103 argv[5] = rb_ary_pop(value_stack);
4104
4105 // block
4106#line 155 "api_node.c.erb"
4107 argv[6] = rb_ary_pop(value_stack);
4108
4109 // location
4110 argv[7] = pm_location_new(parser, node->location.start, node->location.end, source);
4111
4112 rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismParametersNode));
4113 break;
4114 }
4115#line 144 "api_node.c.erb"
4116 case PM_PARENTHESES_NODE: {
4117 pm_parentheses_node_t *cast = (pm_parentheses_node_t *) node;
4118 VALUE argv[4];
4119
4120 // body
4121#line 155 "api_node.c.erb"
4122 argv[0] = rb_ary_pop(value_stack);
4123
4124 // opening_loc
4125#line 180 "api_node.c.erb"
4126 argv[1] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
4127
4128 // closing_loc
4129#line 180 "api_node.c.erb"
4130 argv[2] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
4131
4132 // location
4133 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
4134
4135 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismParenthesesNode));
4136 break;
4137 }
4138#line 144 "api_node.c.erb"
4139 case PM_PINNED_EXPRESSION_NODE: {
4140 pm_pinned_expression_node_t *cast = (pm_pinned_expression_node_t *) node;
4141 VALUE argv[5];
4142
4143 // expression
4144#line 155 "api_node.c.erb"
4145 argv[0] = rb_ary_pop(value_stack);
4146
4147 // operator_loc
4148#line 180 "api_node.c.erb"
4149 argv[1] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
4150
4151 // lparen_loc
4152#line 180 "api_node.c.erb"
4153 argv[2] = pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source);
4154
4155 // rparen_loc
4156#line 180 "api_node.c.erb"
4157 argv[3] = pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source);
4158
4159 // location
4160 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
4161
4162 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismPinnedExpressionNode));
4163 break;
4164 }
4165#line 144 "api_node.c.erb"
4166 case PM_PINNED_VARIABLE_NODE: {
4167 pm_pinned_variable_node_t *cast = (pm_pinned_variable_node_t *) node;
4168 VALUE argv[3];
4169
4170 // variable
4171#line 155 "api_node.c.erb"
4172 argv[0] = rb_ary_pop(value_stack);
4173
4174 // operator_loc
4175#line 180 "api_node.c.erb"
4176 argv[1] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
4177
4178 // location
4179 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
4180
4181 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismPinnedVariableNode));
4182 break;
4183 }
4184#line 144 "api_node.c.erb"
4185 case PM_POST_EXECUTION_NODE: {
4186 pm_post_execution_node_t *cast = (pm_post_execution_node_t *) node;
4187 VALUE argv[5];
4188
4189 // statements
4190#line 155 "api_node.c.erb"
4191 argv[0] = rb_ary_pop(value_stack);
4192
4193 // keyword_loc
4194#line 180 "api_node.c.erb"
4195 argv[1] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
4196
4197 // opening_loc
4198#line 180 "api_node.c.erb"
4199 argv[2] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
4200
4201 // closing_loc
4202#line 180 "api_node.c.erb"
4203 argv[3] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
4204
4205 // location
4206 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
4207
4208 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismPostExecutionNode));
4209 break;
4210 }
4211#line 144 "api_node.c.erb"
4212 case PM_PRE_EXECUTION_NODE: {
4213 pm_pre_execution_node_t *cast = (pm_pre_execution_node_t *) node;
4214 VALUE argv[5];
4215
4216 // statements
4217#line 155 "api_node.c.erb"
4218 argv[0] = rb_ary_pop(value_stack);
4219
4220 // keyword_loc
4221#line 180 "api_node.c.erb"
4222 argv[1] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
4223
4224 // opening_loc
4225#line 180 "api_node.c.erb"
4226 argv[2] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
4227
4228 // closing_loc
4229#line 180 "api_node.c.erb"
4230 argv[3] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
4231
4232 // location
4233 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
4234
4235 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismPreExecutionNode));
4236 break;
4237 }
4238#line 144 "api_node.c.erb"
4239 case PM_PROGRAM_NODE: {
4240 pm_program_node_t *cast = (pm_program_node_t *) node;
4241 VALUE argv[3];
4242
4243 // locals
4244#line 173 "api_node.c.erb"
4245 argv[0] = rb_ary_new_capa(cast->locals.size);
4246 for (size_t index = 0; index < cast->locals.size; index++) {
4247 assert(cast->locals.ids[index] != 0);
4248 rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
4249 }
4250
4251 // statements
4252#line 155 "api_node.c.erb"
4253 argv[1] = rb_ary_pop(value_stack);
4254
4255 // location
4256 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
4257
4258 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismProgramNode));
4259 break;
4260 }
4261#line 144 "api_node.c.erb"
4262 case PM_RANGE_NODE: {
4263 pm_range_node_t *cast = (pm_range_node_t *) node;
4264 VALUE argv[5];
4265
4266 // flags
4267#line 192 "api_node.c.erb"
4268 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
4269
4270 // left
4271#line 155 "api_node.c.erb"
4272 argv[1] = rb_ary_pop(value_stack);
4273
4274 // right
4275#line 155 "api_node.c.erb"
4276 argv[2] = rb_ary_pop(value_stack);
4277
4278 // operator_loc
4279#line 180 "api_node.c.erb"
4280 argv[3] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
4281
4282 // location
4283 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
4284
4285 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismRangeNode));
4286 break;
4287 }
4288#line 144 "api_node.c.erb"
4289 case PM_RATIONAL_NODE: {
4290 VALUE argv[2];
4291
4292 // numeric
4293#line 155 "api_node.c.erb"
4294 argv[0] = rb_ary_pop(value_stack);
4295
4296 // location
4297 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
4298
4299 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismRationalNode));
4300 break;
4301 }
4302#line 144 "api_node.c.erb"
4303 case PM_REDO_NODE: {
4304 VALUE argv[1];
4305
4306 // location
4307 argv[0] = pm_location_new(parser, node->location.start, node->location.end, source);
4308
4309 rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cPrismRedoNode));
4310 break;
4311 }
4312#line 144 "api_node.c.erb"
4313 case PM_REGULAR_EXPRESSION_NODE: {
4314 pm_regular_expression_node_t *cast = (pm_regular_expression_node_t *) node;
4315 VALUE argv[6];
4316
4317 // flags
4318#line 192 "api_node.c.erb"
4319 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
4320
4321 // opening_loc
4322#line 180 "api_node.c.erb"
4323 argv[1] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
4324
4325 // content_loc
4326#line 180 "api_node.c.erb"
4327 argv[2] = pm_location_new(parser, cast->content_loc.start, cast->content_loc.end, source);
4328
4329 // closing_loc
4330#line 180 "api_node.c.erb"
4331 argv[3] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
4332
4333 // unescaped
4334#line 164 "api_node.c.erb"
4335 argv[4] = pm_string_new(&cast->unescaped, encoding);
4336
4337 // location
4338 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
4339
4340 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismRegularExpressionNode));
4341 break;
4342 }
4343#line 144 "api_node.c.erb"
4344 case PM_REQUIRED_KEYWORD_PARAMETER_NODE: {
4345 pm_required_keyword_parameter_node_t *cast = (pm_required_keyword_parameter_node_t *) node;
4346 VALUE argv[3];
4347
4348 // name
4349#line 167 "api_node.c.erb"
4350 assert(cast->name != 0);
4351 argv[0] = rb_id2sym(constants[cast->name - 1]);
4352
4353 // name_loc
4354#line 180 "api_node.c.erb"
4355 argv[1] = pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
4356
4357 // location
4358 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
4359
4360 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismRequiredKeywordParameterNode));
4361 break;
4362 }
4363#line 144 "api_node.c.erb"
4364 case PM_REQUIRED_PARAMETER_NODE: {
4365 pm_required_parameter_node_t *cast = (pm_required_parameter_node_t *) node;
4366 VALUE argv[2];
4367
4368 // name
4369#line 167 "api_node.c.erb"
4370 assert(cast->name != 0);
4371 argv[0] = rb_id2sym(constants[cast->name - 1]);
4372
4373 // location
4374 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
4375
4376 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismRequiredParameterNode));
4377 break;
4378 }
4379#line 144 "api_node.c.erb"
4380 case PM_RESCUE_MODIFIER_NODE: {
4381 pm_rescue_modifier_node_t *cast = (pm_rescue_modifier_node_t *) node;
4382 VALUE argv[4];
4383
4384 // expression
4385#line 155 "api_node.c.erb"
4386 argv[0] = rb_ary_pop(value_stack);
4387
4388 // keyword_loc
4389#line 180 "api_node.c.erb"
4390 argv[1] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
4391
4392 // rescue_expression
4393#line 155 "api_node.c.erb"
4394 argv[2] = rb_ary_pop(value_stack);
4395
4396 // location
4397 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
4398
4399 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismRescueModifierNode));
4400 break;
4401 }
4402#line 144 "api_node.c.erb"
4403 case PM_RESCUE_NODE: {
4404 pm_rescue_node_t *cast = (pm_rescue_node_t *) node;
4405 VALUE argv[7];
4406
4407 // keyword_loc
4408#line 180 "api_node.c.erb"
4409 argv[0] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
4410
4411 // exceptions
4412#line 158 "api_node.c.erb"
4413 argv[1] = rb_ary_new_capa(cast->exceptions.size);
4414 for (size_t index = 0; index < cast->exceptions.size; index++) {
4415 rb_ary_push(argv[1], rb_ary_pop(value_stack));
4416 }
4417
4418 // operator_loc
4419#line 183 "api_node.c.erb"
4420 argv[2] = cast->operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
4421
4422 // reference
4423#line 155 "api_node.c.erb"
4424 argv[3] = rb_ary_pop(value_stack);
4425
4426 // statements
4427#line 155 "api_node.c.erb"
4428 argv[4] = rb_ary_pop(value_stack);
4429
4430 // consequent
4431#line 155 "api_node.c.erb"
4432 argv[5] = rb_ary_pop(value_stack);
4433
4434 // location
4435 argv[6] = pm_location_new(parser, node->location.start, node->location.end, source);
4436
4437 rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismRescueNode));
4438 break;
4439 }
4440#line 144 "api_node.c.erb"
4441 case PM_REST_PARAMETER_NODE: {
4442 pm_rest_parameter_node_t *cast = (pm_rest_parameter_node_t *) node;
4443 VALUE argv[4];
4444
4445 // name
4446 argv[0] = cast->name == 0 ? Qnil : rb_id2sym(constants[cast->name - 1]);
4447
4448 // name_loc
4449#line 183 "api_node.c.erb"
4450 argv[1] = cast->name_loc.start == NULL ? Qnil : pm_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
4451
4452 // operator_loc
4453#line 180 "api_node.c.erb"
4454 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
4455
4456 // location
4457 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
4458
4459 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismRestParameterNode));
4460 break;
4461 }
4462#line 144 "api_node.c.erb"
4463 case PM_RETRY_NODE: {
4464 VALUE argv[1];
4465
4466 // location
4467 argv[0] = pm_location_new(parser, node->location.start, node->location.end, source);
4468
4469 rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cPrismRetryNode));
4470 break;
4471 }
4472#line 144 "api_node.c.erb"
4473 case PM_RETURN_NODE: {
4474 pm_return_node_t *cast = (pm_return_node_t *) node;
4475 VALUE argv[3];
4476
4477 // keyword_loc
4478#line 180 "api_node.c.erb"
4479 argv[0] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
4480
4481 // arguments
4482#line 155 "api_node.c.erb"
4483 argv[1] = rb_ary_pop(value_stack);
4484
4485 // location
4486 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
4487
4488 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismReturnNode));
4489 break;
4490 }
4491#line 144 "api_node.c.erb"
4492 case PM_SELF_NODE: {
4493 VALUE argv[1];
4494
4495 // location
4496 argv[0] = pm_location_new(parser, node->location.start, node->location.end, source);
4497
4498 rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cPrismSelfNode));
4499 break;
4500 }
4501#line 144 "api_node.c.erb"
4502 case PM_SINGLETON_CLASS_NODE: {
4503 pm_singleton_class_node_t *cast = (pm_singleton_class_node_t *) node;
4504 VALUE argv[7];
4505
4506 // locals
4507#line 173 "api_node.c.erb"
4508 argv[0] = rb_ary_new_capa(cast->locals.size);
4509 for (size_t index = 0; index < cast->locals.size; index++) {
4510 assert(cast->locals.ids[index] != 0);
4511 rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
4512 }
4513
4514 // class_keyword_loc
4515#line 180 "api_node.c.erb"
4516 argv[1] = pm_location_new(parser, cast->class_keyword_loc.start, cast->class_keyword_loc.end, source);
4517
4518 // operator_loc
4519#line 180 "api_node.c.erb"
4520 argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
4521
4522 // expression
4523#line 155 "api_node.c.erb"
4524 argv[3] = rb_ary_pop(value_stack);
4525
4526 // body
4527#line 155 "api_node.c.erb"
4528 argv[4] = rb_ary_pop(value_stack);
4529
4530 // end_keyword_loc
4531#line 180 "api_node.c.erb"
4532 argv[5] = pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
4533
4534 // location
4535 argv[6] = pm_location_new(parser, node->location.start, node->location.end, source);
4536
4537 rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismSingletonClassNode));
4538 break;
4539 }
4540#line 144 "api_node.c.erb"
4541 case PM_SOURCE_ENCODING_NODE: {
4542 VALUE argv[1];
4543
4544 // location
4545 argv[0] = pm_location_new(parser, node->location.start, node->location.end, source);
4546
4547 rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cPrismSourceEncodingNode));
4548 break;
4549 }
4550#line 144 "api_node.c.erb"
4551 case PM_SOURCE_FILE_NODE: {
4552 pm_source_file_node_t *cast = (pm_source_file_node_t *) node;
4553 VALUE argv[2];
4554
4555 // filepath
4556#line 164 "api_node.c.erb"
4557 argv[0] = pm_string_new(&cast->filepath, encoding);
4558
4559 // location
4560 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
4561
4562 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismSourceFileNode));
4563 break;
4564 }
4565#line 144 "api_node.c.erb"
4566 case PM_SOURCE_LINE_NODE: {
4567 VALUE argv[1];
4568
4569 // location
4570 argv[0] = pm_location_new(parser, node->location.start, node->location.end, source);
4571
4572 rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cPrismSourceLineNode));
4573 break;
4574 }
4575#line 144 "api_node.c.erb"
4576 case PM_SPLAT_NODE: {
4577 pm_splat_node_t *cast = (pm_splat_node_t *) node;
4578 VALUE argv[3];
4579
4580 // operator_loc
4581#line 180 "api_node.c.erb"
4582 argv[0] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
4583
4584 // expression
4585#line 155 "api_node.c.erb"
4586 argv[1] = rb_ary_pop(value_stack);
4587
4588 // location
4589 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
4590
4591 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismSplatNode));
4592 break;
4593 }
4594#line 144 "api_node.c.erb"
4595 case PM_STATEMENTS_NODE: {
4596 pm_statements_node_t *cast = (pm_statements_node_t *) node;
4597 VALUE argv[2];
4598
4599 // body
4600#line 158 "api_node.c.erb"
4601 argv[0] = rb_ary_new_capa(cast->body.size);
4602 for (size_t index = 0; index < cast->body.size; index++) {
4603 rb_ary_push(argv[0], rb_ary_pop(value_stack));
4604 }
4605
4606 // location
4607 argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
4608
4609 rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismStatementsNode));
4610 break;
4611 }
4612#line 144 "api_node.c.erb"
4613 case PM_STRING_NODE: {
4614 pm_string_node_t *cast = (pm_string_node_t *) node;
4615 VALUE argv[6];
4616
4617 // flags
4618#line 192 "api_node.c.erb"
4619 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
4620
4621 // opening_loc
4622#line 183 "api_node.c.erb"
4623 argv[1] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
4624
4625 // content_loc
4626#line 180 "api_node.c.erb"
4627 argv[2] = pm_location_new(parser, cast->content_loc.start, cast->content_loc.end, source);
4628
4629 // closing_loc
4630#line 183 "api_node.c.erb"
4631 argv[3] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
4632
4633 // unescaped
4634#line 164 "api_node.c.erb"
4635 argv[4] = pm_string_new(&cast->unescaped, encoding);
4636
4637 // location
4638 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
4639
4640 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismStringNode));
4641 break;
4642 }
4643#line 144 "api_node.c.erb"
4644 case PM_SUPER_NODE: {
4645 pm_super_node_t *cast = (pm_super_node_t *) node;
4646 VALUE argv[6];
4647
4648 // keyword_loc
4649#line 180 "api_node.c.erb"
4650 argv[0] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
4651
4652 // lparen_loc
4653#line 183 "api_node.c.erb"
4654 argv[1] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source);
4655
4656 // arguments
4657#line 155 "api_node.c.erb"
4658 argv[2] = rb_ary_pop(value_stack);
4659
4660 // rparen_loc
4661#line 183 "api_node.c.erb"
4662 argv[3] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source);
4663
4664 // block
4665#line 155 "api_node.c.erb"
4666 argv[4] = rb_ary_pop(value_stack);
4667
4668 // location
4669 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
4670
4671 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismSuperNode));
4672 break;
4673 }
4674#line 144 "api_node.c.erb"
4675 case PM_SYMBOL_NODE: {
4676 pm_symbol_node_t *cast = (pm_symbol_node_t *) node;
4677 VALUE argv[6];
4678
4679 // flags
4680#line 192 "api_node.c.erb"
4681 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
4682
4683 // opening_loc
4684#line 183 "api_node.c.erb"
4685 argv[1] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
4686
4687 // value_loc
4688#line 183 "api_node.c.erb"
4689 argv[2] = cast->value_loc.start == NULL ? Qnil : pm_location_new(parser, cast->value_loc.start, cast->value_loc.end, source);
4690
4691 // closing_loc
4692#line 183 "api_node.c.erb"
4693 argv[3] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
4694
4695 // unescaped
4696#line 164 "api_node.c.erb"
4697 argv[4] = pm_string_new(&cast->unescaped, encoding);
4698
4699 // location
4700 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
4701
4702 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismSymbolNode));
4703 break;
4704 }
4705#line 144 "api_node.c.erb"
4706 case PM_TRUE_NODE: {
4707 VALUE argv[1];
4708
4709 // location
4710 argv[0] = pm_location_new(parser, node->location.start, node->location.end, source);
4711
4712 rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cPrismTrueNode));
4713 break;
4714 }
4715#line 144 "api_node.c.erb"
4716 case PM_UNDEF_NODE: {
4717 pm_undef_node_t *cast = (pm_undef_node_t *) node;
4718 VALUE argv[3];
4719
4720 // names
4721#line 158 "api_node.c.erb"
4722 argv[0] = rb_ary_new_capa(cast->names.size);
4723 for (size_t index = 0; index < cast->names.size; index++) {
4724 rb_ary_push(argv[0], rb_ary_pop(value_stack));
4725 }
4726
4727 // keyword_loc
4728#line 180 "api_node.c.erb"
4729 argv[1] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
4730
4731 // location
4732 argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
4733
4734 rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismUndefNode));
4735 break;
4736 }
4737#line 144 "api_node.c.erb"
4738 case PM_UNLESS_NODE: {
4739 pm_unless_node_t *cast = (pm_unless_node_t *) node;
4740 VALUE argv[7];
4741
4742 // keyword_loc
4743#line 180 "api_node.c.erb"
4744 argv[0] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
4745
4746 // predicate
4747#line 155 "api_node.c.erb"
4748 argv[1] = rb_ary_pop(value_stack);
4749
4750 // then_keyword_loc
4751#line 183 "api_node.c.erb"
4752 argv[2] = cast->then_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->then_keyword_loc.start, cast->then_keyword_loc.end, source);
4753
4754 // statements
4755#line 155 "api_node.c.erb"
4756 argv[3] = rb_ary_pop(value_stack);
4757
4758 // consequent
4759#line 155 "api_node.c.erb"
4760 argv[4] = rb_ary_pop(value_stack);
4761
4762 // end_keyword_loc
4763#line 183 "api_node.c.erb"
4764 argv[5] = cast->end_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
4765
4766 // location
4767 argv[6] = pm_location_new(parser, node->location.start, node->location.end, source);
4768
4769 rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismUnlessNode));
4770 break;
4771 }
4772#line 144 "api_node.c.erb"
4773 case PM_UNTIL_NODE: {
4774 pm_until_node_t *cast = (pm_until_node_t *) node;
4775 VALUE argv[6];
4776
4777 // flags
4778#line 192 "api_node.c.erb"
4779 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
4780
4781 // keyword_loc
4782#line 180 "api_node.c.erb"
4783 argv[1] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
4784
4785 // closing_loc
4786#line 183 "api_node.c.erb"
4787 argv[2] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
4788
4789 // predicate
4790#line 155 "api_node.c.erb"
4791 argv[3] = rb_ary_pop(value_stack);
4792
4793 // statements
4794#line 155 "api_node.c.erb"
4795 argv[4] = rb_ary_pop(value_stack);
4796
4797 // location
4798 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
4799
4800 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismUntilNode));
4801 break;
4802 }
4803#line 144 "api_node.c.erb"
4804 case PM_WHEN_NODE: {
4805 pm_when_node_t *cast = (pm_when_node_t *) node;
4806 VALUE argv[4];
4807
4808 // keyword_loc
4809#line 180 "api_node.c.erb"
4810 argv[0] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
4811
4812 // conditions
4813#line 158 "api_node.c.erb"
4814 argv[1] = rb_ary_new_capa(cast->conditions.size);
4815 for (size_t index = 0; index < cast->conditions.size; index++) {
4816 rb_ary_push(argv[1], rb_ary_pop(value_stack));
4817 }
4818
4819 // statements
4820#line 155 "api_node.c.erb"
4821 argv[2] = rb_ary_pop(value_stack);
4822
4823 // location
4824 argv[3] = pm_location_new(parser, node->location.start, node->location.end, source);
4825
4826 rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cPrismWhenNode));
4827 break;
4828 }
4829#line 144 "api_node.c.erb"
4830 case PM_WHILE_NODE: {
4831 pm_while_node_t *cast = (pm_while_node_t *) node;
4832 VALUE argv[6];
4833
4834 // flags
4835#line 192 "api_node.c.erb"
4836 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
4837
4838 // keyword_loc
4839#line 180 "api_node.c.erb"
4840 argv[1] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
4841
4842 // closing_loc
4843#line 183 "api_node.c.erb"
4844 argv[2] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
4845
4846 // predicate
4847#line 155 "api_node.c.erb"
4848 argv[3] = rb_ary_pop(value_stack);
4849
4850 // statements
4851#line 155 "api_node.c.erb"
4852 argv[4] = rb_ary_pop(value_stack);
4853
4854 // location
4855 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
4856
4857 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismWhileNode));
4858 break;
4859 }
4860#line 144 "api_node.c.erb"
4861 case PM_X_STRING_NODE: {
4862 pm_x_string_node_t *cast = (pm_x_string_node_t *) node;
4863 VALUE argv[6];
4864
4865 // flags
4866#line 192 "api_node.c.erb"
4867 argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
4868
4869 // opening_loc
4870#line 180 "api_node.c.erb"
4871 argv[1] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
4872
4873 // content_loc
4874#line 180 "api_node.c.erb"
4875 argv[2] = pm_location_new(parser, cast->content_loc.start, cast->content_loc.end, source);
4876
4877 // closing_loc
4878#line 180 "api_node.c.erb"
4879 argv[3] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
4880
4881 // unescaped
4882#line 164 "api_node.c.erb"
4883 argv[4] = pm_string_new(&cast->unescaped, encoding);
4884
4885 // location
4886 argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
4887
4888 rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismXStringNode));
4889 break;
4890 }
4891#line 144 "api_node.c.erb"
4892 case PM_YIELD_NODE: {
4893 pm_yield_node_t *cast = (pm_yield_node_t *) node;
4894 VALUE argv[5];
4895
4896 // keyword_loc
4897#line 180 "api_node.c.erb"
4898 argv[0] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
4899
4900 // lparen_loc
4901#line 183 "api_node.c.erb"
4902 argv[1] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source);
4903
4904 // arguments
4905#line 155 "api_node.c.erb"
4906 argv[2] = rb_ary_pop(value_stack);
4907
4908 // rparen_loc
4909#line 183 "api_node.c.erb"
4910 argv[3] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source);
4911
4912 // location
4913 argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
4914
4915 rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismYieldNode));
4916 break;
4917 }
4918 default:
4919 rb_raise(rb_eRuntimeError, "unknown node type: %d", PM_NODE_TYPE(node));
4920 }
4921 }
4922 }
4923
4924 VALUE result = rb_ary_pop(value_stack);
4925 free(constants);
4926 return result;
4927}
4928
4929void
4930Init_prism_api_node(void) {
4931 rb_cPrismAliasGlobalVariableNode = rb_define_class_under(rb_cPrism, "AliasGlobalVariableNode", rb_cPrismNode);
4932 rb_cPrismAliasMethodNode = rb_define_class_under(rb_cPrism, "AliasMethodNode", rb_cPrismNode);
4933 rb_cPrismAlternationPatternNode = rb_define_class_under(rb_cPrism, "AlternationPatternNode", rb_cPrismNode);
4934 rb_cPrismAndNode = rb_define_class_under(rb_cPrism, "AndNode", rb_cPrismNode);
4935 rb_cPrismArgumentsNode = rb_define_class_under(rb_cPrism, "ArgumentsNode", rb_cPrismNode);
4936 rb_cPrismArrayNode = rb_define_class_under(rb_cPrism, "ArrayNode", rb_cPrismNode);
4937 rb_cPrismArrayPatternNode = rb_define_class_under(rb_cPrism, "ArrayPatternNode", rb_cPrismNode);
4938 rb_cPrismAssocNode = rb_define_class_under(rb_cPrism, "AssocNode", rb_cPrismNode);
4939 rb_cPrismAssocSplatNode = rb_define_class_under(rb_cPrism, "AssocSplatNode", rb_cPrismNode);
4940 rb_cPrismBackReferenceReadNode = rb_define_class_under(rb_cPrism, "BackReferenceReadNode", rb_cPrismNode);
4941 rb_cPrismBeginNode = rb_define_class_under(rb_cPrism, "BeginNode", rb_cPrismNode);
4942 rb_cPrismBlockArgumentNode = rb_define_class_under(rb_cPrism, "BlockArgumentNode", rb_cPrismNode);
4943 rb_cPrismBlockLocalVariableNode = rb_define_class_under(rb_cPrism, "BlockLocalVariableNode", rb_cPrismNode);
4944 rb_cPrismBlockNode = rb_define_class_under(rb_cPrism, "BlockNode", rb_cPrismNode);
4945 rb_cPrismBlockParameterNode = rb_define_class_under(rb_cPrism, "BlockParameterNode", rb_cPrismNode);
4946 rb_cPrismBlockParametersNode = rb_define_class_under(rb_cPrism, "BlockParametersNode", rb_cPrismNode);
4947 rb_cPrismBreakNode = rb_define_class_under(rb_cPrism, "BreakNode", rb_cPrismNode);
4948 rb_cPrismCallAndWriteNode = rb_define_class_under(rb_cPrism, "CallAndWriteNode", rb_cPrismNode);
4949 rb_cPrismCallNode = rb_define_class_under(rb_cPrism, "CallNode", rb_cPrismNode);
4950 rb_cPrismCallOperatorWriteNode = rb_define_class_under(rb_cPrism, "CallOperatorWriteNode", rb_cPrismNode);
4951 rb_cPrismCallOrWriteNode = rb_define_class_under(rb_cPrism, "CallOrWriteNode", rb_cPrismNode);
4952 rb_cPrismCallTargetNode = rb_define_class_under(rb_cPrism, "CallTargetNode", rb_cPrismNode);
4953 rb_cPrismCapturePatternNode = rb_define_class_under(rb_cPrism, "CapturePatternNode", rb_cPrismNode);
4954 rb_cPrismCaseMatchNode = rb_define_class_under(rb_cPrism, "CaseMatchNode", rb_cPrismNode);
4955 rb_cPrismCaseNode = rb_define_class_under(rb_cPrism, "CaseNode", rb_cPrismNode);
4956 rb_cPrismClassNode = rb_define_class_under(rb_cPrism, "ClassNode", rb_cPrismNode);
4957 rb_cPrismClassVariableAndWriteNode = rb_define_class_under(rb_cPrism, "ClassVariableAndWriteNode", rb_cPrismNode);
4958 rb_cPrismClassVariableOperatorWriteNode = rb_define_class_under(rb_cPrism, "ClassVariableOperatorWriteNode", rb_cPrismNode);
4959 rb_cPrismClassVariableOrWriteNode = rb_define_class_under(rb_cPrism, "ClassVariableOrWriteNode", rb_cPrismNode);
4960 rb_cPrismClassVariableReadNode = rb_define_class_under(rb_cPrism, "ClassVariableReadNode", rb_cPrismNode);
4961 rb_cPrismClassVariableTargetNode = rb_define_class_under(rb_cPrism, "ClassVariableTargetNode", rb_cPrismNode);
4962 rb_cPrismClassVariableWriteNode = rb_define_class_under(rb_cPrism, "ClassVariableWriteNode", rb_cPrismNode);
4963 rb_cPrismConstantAndWriteNode = rb_define_class_under(rb_cPrism, "ConstantAndWriteNode", rb_cPrismNode);
4964 rb_cPrismConstantOperatorWriteNode = rb_define_class_under(rb_cPrism, "ConstantOperatorWriteNode", rb_cPrismNode);
4965 rb_cPrismConstantOrWriteNode = rb_define_class_under(rb_cPrism, "ConstantOrWriteNode", rb_cPrismNode);
4966 rb_cPrismConstantPathAndWriteNode = rb_define_class_under(rb_cPrism, "ConstantPathAndWriteNode", rb_cPrismNode);
4967 rb_cPrismConstantPathNode = rb_define_class_under(rb_cPrism, "ConstantPathNode", rb_cPrismNode);
4968 rb_cPrismConstantPathOperatorWriteNode = rb_define_class_under(rb_cPrism, "ConstantPathOperatorWriteNode", rb_cPrismNode);
4969 rb_cPrismConstantPathOrWriteNode = rb_define_class_under(rb_cPrism, "ConstantPathOrWriteNode", rb_cPrismNode);
4970 rb_cPrismConstantPathTargetNode = rb_define_class_under(rb_cPrism, "ConstantPathTargetNode", rb_cPrismNode);
4971 rb_cPrismConstantPathWriteNode = rb_define_class_under(rb_cPrism, "ConstantPathWriteNode", rb_cPrismNode);
4972 rb_cPrismConstantReadNode = rb_define_class_under(rb_cPrism, "ConstantReadNode", rb_cPrismNode);
4973 rb_cPrismConstantTargetNode = rb_define_class_under(rb_cPrism, "ConstantTargetNode", rb_cPrismNode);
4974 rb_cPrismConstantWriteNode = rb_define_class_under(rb_cPrism, "ConstantWriteNode", rb_cPrismNode);
4975 rb_cPrismDefNode = rb_define_class_under(rb_cPrism, "DefNode", rb_cPrismNode);
4976 rb_cPrismDefinedNode = rb_define_class_under(rb_cPrism, "DefinedNode", rb_cPrismNode);
4977 rb_cPrismElseNode = rb_define_class_under(rb_cPrism, "ElseNode", rb_cPrismNode);
4978 rb_cPrismEmbeddedStatementsNode = rb_define_class_under(rb_cPrism, "EmbeddedStatementsNode", rb_cPrismNode);
4979 rb_cPrismEmbeddedVariableNode = rb_define_class_under(rb_cPrism, "EmbeddedVariableNode", rb_cPrismNode);
4980 rb_cPrismEnsureNode = rb_define_class_under(rb_cPrism, "EnsureNode", rb_cPrismNode);
4981 rb_cPrismFalseNode = rb_define_class_under(rb_cPrism, "FalseNode", rb_cPrismNode);
4982 rb_cPrismFindPatternNode = rb_define_class_under(rb_cPrism, "FindPatternNode", rb_cPrismNode);
4983 rb_cPrismFlipFlopNode = rb_define_class_under(rb_cPrism, "FlipFlopNode", rb_cPrismNode);
4984 rb_cPrismFloatNode = rb_define_class_under(rb_cPrism, "FloatNode", rb_cPrismNode);
4985 rb_cPrismForNode = rb_define_class_under(rb_cPrism, "ForNode", rb_cPrismNode);
4986 rb_cPrismForwardingArgumentsNode = rb_define_class_under(rb_cPrism, "ForwardingArgumentsNode", rb_cPrismNode);
4987 rb_cPrismForwardingParameterNode = rb_define_class_under(rb_cPrism, "ForwardingParameterNode", rb_cPrismNode);
4988 rb_cPrismForwardingSuperNode = rb_define_class_under(rb_cPrism, "ForwardingSuperNode", rb_cPrismNode);
4989 rb_cPrismGlobalVariableAndWriteNode = rb_define_class_under(rb_cPrism, "GlobalVariableAndWriteNode", rb_cPrismNode);
4990 rb_cPrismGlobalVariableOperatorWriteNode = rb_define_class_under(rb_cPrism, "GlobalVariableOperatorWriteNode", rb_cPrismNode);
4991 rb_cPrismGlobalVariableOrWriteNode = rb_define_class_under(rb_cPrism, "GlobalVariableOrWriteNode", rb_cPrismNode);
4992 rb_cPrismGlobalVariableReadNode = rb_define_class_under(rb_cPrism, "GlobalVariableReadNode", rb_cPrismNode);
4993 rb_cPrismGlobalVariableTargetNode = rb_define_class_under(rb_cPrism, "GlobalVariableTargetNode", rb_cPrismNode);
4994 rb_cPrismGlobalVariableWriteNode = rb_define_class_under(rb_cPrism, "GlobalVariableWriteNode", rb_cPrismNode);
4995 rb_cPrismHashNode = rb_define_class_under(rb_cPrism, "HashNode", rb_cPrismNode);
4996 rb_cPrismHashPatternNode = rb_define_class_under(rb_cPrism, "HashPatternNode", rb_cPrismNode);
4997 rb_cPrismIfNode = rb_define_class_under(rb_cPrism, "IfNode", rb_cPrismNode);
4998 rb_cPrismImaginaryNode = rb_define_class_under(rb_cPrism, "ImaginaryNode", rb_cPrismNode);
4999 rb_cPrismImplicitNode = rb_define_class_under(rb_cPrism, "ImplicitNode", rb_cPrismNode);
5000 rb_cPrismImplicitRestNode = rb_define_class_under(rb_cPrism, "ImplicitRestNode", rb_cPrismNode);
5001 rb_cPrismInNode = rb_define_class_under(rb_cPrism, "InNode", rb_cPrismNode);
5002 rb_cPrismIndexAndWriteNode = rb_define_class_under(rb_cPrism, "IndexAndWriteNode", rb_cPrismNode);
5003 rb_cPrismIndexOperatorWriteNode = rb_define_class_under(rb_cPrism, "IndexOperatorWriteNode", rb_cPrismNode);
5004 rb_cPrismIndexOrWriteNode = rb_define_class_under(rb_cPrism, "IndexOrWriteNode", rb_cPrismNode);
5005 rb_cPrismIndexTargetNode = rb_define_class_under(rb_cPrism, "IndexTargetNode", rb_cPrismNode);
5006 rb_cPrismInstanceVariableAndWriteNode = rb_define_class_under(rb_cPrism, "InstanceVariableAndWriteNode", rb_cPrismNode);
5007 rb_cPrismInstanceVariableOperatorWriteNode = rb_define_class_under(rb_cPrism, "InstanceVariableOperatorWriteNode", rb_cPrismNode);
5008 rb_cPrismInstanceVariableOrWriteNode = rb_define_class_under(rb_cPrism, "InstanceVariableOrWriteNode", rb_cPrismNode);
5009 rb_cPrismInstanceVariableReadNode = rb_define_class_under(rb_cPrism, "InstanceVariableReadNode", rb_cPrismNode);
5010 rb_cPrismInstanceVariableTargetNode = rb_define_class_under(rb_cPrism, "InstanceVariableTargetNode", rb_cPrismNode);
5011 rb_cPrismInstanceVariableWriteNode = rb_define_class_under(rb_cPrism, "InstanceVariableWriteNode", rb_cPrismNode);
5012 rb_cPrismIntegerNode = rb_define_class_under(rb_cPrism, "IntegerNode", rb_cPrismNode);
5013 rb_cPrismInterpolatedMatchLastLineNode = rb_define_class_under(rb_cPrism, "InterpolatedMatchLastLineNode", rb_cPrismNode);
5014 rb_cPrismInterpolatedRegularExpressionNode = rb_define_class_under(rb_cPrism, "InterpolatedRegularExpressionNode", rb_cPrismNode);
5015 rb_cPrismInterpolatedStringNode = rb_define_class_under(rb_cPrism, "InterpolatedStringNode", rb_cPrismNode);
5016 rb_cPrismInterpolatedSymbolNode = rb_define_class_under(rb_cPrism, "InterpolatedSymbolNode", rb_cPrismNode);
5017 rb_cPrismInterpolatedXStringNode = rb_define_class_under(rb_cPrism, "InterpolatedXStringNode", rb_cPrismNode);
5018 rb_cPrismKeywordHashNode = rb_define_class_under(rb_cPrism, "KeywordHashNode", rb_cPrismNode);
5019 rb_cPrismKeywordRestParameterNode = rb_define_class_under(rb_cPrism, "KeywordRestParameterNode", rb_cPrismNode);
5020 rb_cPrismLambdaNode = rb_define_class_under(rb_cPrism, "LambdaNode", rb_cPrismNode);
5021 rb_cPrismLocalVariableAndWriteNode = rb_define_class_under(rb_cPrism, "LocalVariableAndWriteNode", rb_cPrismNode);
5022 rb_cPrismLocalVariableOperatorWriteNode = rb_define_class_under(rb_cPrism, "LocalVariableOperatorWriteNode", rb_cPrismNode);
5023 rb_cPrismLocalVariableOrWriteNode = rb_define_class_under(rb_cPrism, "LocalVariableOrWriteNode", rb_cPrismNode);
5024 rb_cPrismLocalVariableReadNode = rb_define_class_under(rb_cPrism, "LocalVariableReadNode", rb_cPrismNode);
5025 rb_cPrismLocalVariableTargetNode = rb_define_class_under(rb_cPrism, "LocalVariableTargetNode", rb_cPrismNode);
5026 rb_cPrismLocalVariableWriteNode = rb_define_class_under(rb_cPrism, "LocalVariableWriteNode", rb_cPrismNode);
5027 rb_cPrismMatchLastLineNode = rb_define_class_under(rb_cPrism, "MatchLastLineNode", rb_cPrismNode);
5028 rb_cPrismMatchPredicateNode = rb_define_class_under(rb_cPrism, "MatchPredicateNode", rb_cPrismNode);
5029 rb_cPrismMatchRequiredNode = rb_define_class_under(rb_cPrism, "MatchRequiredNode", rb_cPrismNode);
5030 rb_cPrismMatchWriteNode = rb_define_class_under(rb_cPrism, "MatchWriteNode", rb_cPrismNode);
5031 rb_cPrismMissingNode = rb_define_class_under(rb_cPrism, "MissingNode", rb_cPrismNode);
5032 rb_cPrismModuleNode = rb_define_class_under(rb_cPrism, "ModuleNode", rb_cPrismNode);
5033 rb_cPrismMultiTargetNode = rb_define_class_under(rb_cPrism, "MultiTargetNode", rb_cPrismNode);
5034 rb_cPrismMultiWriteNode = rb_define_class_under(rb_cPrism, "MultiWriteNode", rb_cPrismNode);
5035 rb_cPrismNextNode = rb_define_class_under(rb_cPrism, "NextNode", rb_cPrismNode);
5036 rb_cPrismNilNode = rb_define_class_under(rb_cPrism, "NilNode", rb_cPrismNode);
5037 rb_cPrismNoKeywordsParameterNode = rb_define_class_under(rb_cPrism, "NoKeywordsParameterNode", rb_cPrismNode);
5038 rb_cPrismNumberedParametersNode = rb_define_class_under(rb_cPrism, "NumberedParametersNode", rb_cPrismNode);
5039 rb_cPrismNumberedReferenceReadNode = rb_define_class_under(rb_cPrism, "NumberedReferenceReadNode", rb_cPrismNode);
5040 rb_cPrismOptionalKeywordParameterNode = rb_define_class_under(rb_cPrism, "OptionalKeywordParameterNode", rb_cPrismNode);
5041 rb_cPrismOptionalParameterNode = rb_define_class_under(rb_cPrism, "OptionalParameterNode", rb_cPrismNode);
5042 rb_cPrismOrNode = rb_define_class_under(rb_cPrism, "OrNode", rb_cPrismNode);
5043 rb_cPrismParametersNode = rb_define_class_under(rb_cPrism, "ParametersNode", rb_cPrismNode);
5044 rb_cPrismParenthesesNode = rb_define_class_under(rb_cPrism, "ParenthesesNode", rb_cPrismNode);
5045 rb_cPrismPinnedExpressionNode = rb_define_class_under(rb_cPrism, "PinnedExpressionNode", rb_cPrismNode);
5046 rb_cPrismPinnedVariableNode = rb_define_class_under(rb_cPrism, "PinnedVariableNode", rb_cPrismNode);
5047 rb_cPrismPostExecutionNode = rb_define_class_under(rb_cPrism, "PostExecutionNode", rb_cPrismNode);
5048 rb_cPrismPreExecutionNode = rb_define_class_under(rb_cPrism, "PreExecutionNode", rb_cPrismNode);
5049 rb_cPrismProgramNode = rb_define_class_under(rb_cPrism, "ProgramNode", rb_cPrismNode);
5050 rb_cPrismRangeNode = rb_define_class_under(rb_cPrism, "RangeNode", rb_cPrismNode);
5051 rb_cPrismRationalNode = rb_define_class_under(rb_cPrism, "RationalNode", rb_cPrismNode);
5052 rb_cPrismRedoNode = rb_define_class_under(rb_cPrism, "RedoNode", rb_cPrismNode);
5053 rb_cPrismRegularExpressionNode = rb_define_class_under(rb_cPrism, "RegularExpressionNode", rb_cPrismNode);
5054 rb_cPrismRequiredKeywordParameterNode = rb_define_class_under(rb_cPrism, "RequiredKeywordParameterNode", rb_cPrismNode);
5055 rb_cPrismRequiredParameterNode = rb_define_class_under(rb_cPrism, "RequiredParameterNode", rb_cPrismNode);
5056 rb_cPrismRescueModifierNode = rb_define_class_under(rb_cPrism, "RescueModifierNode", rb_cPrismNode);
5057 rb_cPrismRescueNode = rb_define_class_under(rb_cPrism, "RescueNode", rb_cPrismNode);
5058 rb_cPrismRestParameterNode = rb_define_class_under(rb_cPrism, "RestParameterNode", rb_cPrismNode);
5059 rb_cPrismRetryNode = rb_define_class_under(rb_cPrism, "RetryNode", rb_cPrismNode);
5060 rb_cPrismReturnNode = rb_define_class_under(rb_cPrism, "ReturnNode", rb_cPrismNode);
5061 rb_cPrismSelfNode = rb_define_class_under(rb_cPrism, "SelfNode", rb_cPrismNode);
5062 rb_cPrismSingletonClassNode = rb_define_class_under(rb_cPrism, "SingletonClassNode", rb_cPrismNode);
5063 rb_cPrismSourceEncodingNode = rb_define_class_under(rb_cPrism, "SourceEncodingNode", rb_cPrismNode);
5064 rb_cPrismSourceFileNode = rb_define_class_under(rb_cPrism, "SourceFileNode", rb_cPrismNode);
5065 rb_cPrismSourceLineNode = rb_define_class_under(rb_cPrism, "SourceLineNode", rb_cPrismNode);
5066 rb_cPrismSplatNode = rb_define_class_under(rb_cPrism, "SplatNode", rb_cPrismNode);
5067 rb_cPrismStatementsNode = rb_define_class_under(rb_cPrism, "StatementsNode", rb_cPrismNode);
5068 rb_cPrismStringNode = rb_define_class_under(rb_cPrism, "StringNode", rb_cPrismNode);
5069 rb_cPrismSuperNode = rb_define_class_under(rb_cPrism, "SuperNode", rb_cPrismNode);
5070 rb_cPrismSymbolNode = rb_define_class_under(rb_cPrism, "SymbolNode", rb_cPrismNode);
5071 rb_cPrismTrueNode = rb_define_class_under(rb_cPrism, "TrueNode", rb_cPrismNode);
5072 rb_cPrismUndefNode = rb_define_class_under(rb_cPrism, "UndefNode", rb_cPrismNode);
5073 rb_cPrismUnlessNode = rb_define_class_under(rb_cPrism, "UnlessNode", rb_cPrismNode);
5074 rb_cPrismUntilNode = rb_define_class_under(rb_cPrism, "UntilNode", rb_cPrismNode);
5075 rb_cPrismWhenNode = rb_define_class_under(rb_cPrism, "WhenNode", rb_cPrismNode);
5076 rb_cPrismWhileNode = rb_define_class_under(rb_cPrism, "WhileNode", rb_cPrismNode);
5077 rb_cPrismXStringNode = rb_define_class_under(rb_cPrism, "XStringNode", rb_cPrismNode);
5078 rb_cPrismYieldNode = rb_define_class_under(rb_cPrism, "YieldNode", rb_cPrismNode);
5079}
PM_DEFINED_NODE
@ PM_DEFINED_NODE
DefinedNode.
Definition ast.h:707
PM_PRE_EXECUTION_NODE
@ PM_PRE_EXECUTION_NODE
PreExecutionNode.
Definition ast.h:923
PM_RETRY_NODE
@ PM_RETRY_NODE
RetryNode.
Definition ast.h:956
PM_REDO_NODE
@ PM_REDO_NODE
RedoNode.
Definition ast.h:935
PM_CONSTANT_PATH_WRITE_NODE
@ PM_CONSTANT_PATH_WRITE_NODE
ConstantPathWriteNode.
Definition ast.h:692
PM_INDEX_AND_WRITE_NODE
@ PM_INDEX_AND_WRITE_NODE
IndexAndWriteNode.
Definition ast.h:785
PM_SOURCE_LINE_NODE
@ PM_SOURCE_LINE_NODE
SourceLineNode.
Definition ast.h:974
PM_UNLESS_NODE
@ PM_UNLESS_NODE
UnlessNode.
Definition ast.h:998
PM_EMBEDDED_VARIABLE_NODE
@ PM_EMBEDDED_VARIABLE_NODE
EmbeddedVariableNode.
Definition ast.h:716
PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE
@ PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE
GlobalVariableOperatorWriteNode.
Definition ast.h:749
PM_CALL_NODE
@ PM_CALL_NODE
CallNode.
Definition ast.h:626
PM_NIL_NODE
@ PM_NIL_NODE
NilNode.
Definition ast.h:887
PM_GLOBAL_VARIABLE_READ_NODE
@ PM_GLOBAL_VARIABLE_READ_NODE
GlobalVariableReadNode.
Definition ast.h:755
PM_RATIONAL_NODE
@ PM_RATIONAL_NODE
RationalNode.
Definition ast.h:932
PM_YIELD_NODE
@ PM_YIELD_NODE
YieldNode.
Definition ast.h:1013
PM_LOCAL_VARIABLE_AND_WRITE_NODE
@ PM_LOCAL_VARIABLE_AND_WRITE_NODE
LocalVariableAndWriteNode.
Definition ast.h:842
PM_CONSTANT_AND_WRITE_NODE
@ PM_CONSTANT_AND_WRITE_NODE
ConstantAndWriteNode.
Definition ast.h:668
PM_CLASS_NODE
@ PM_CLASS_NODE
ClassNode.
Definition ast.h:647
PM_FIND_PATTERN_NODE
@ PM_FIND_PATTERN_NODE
FindPatternNode.
Definition ast.h:725
PM_CALL_OPERATOR_WRITE_NODE
@ PM_CALL_OPERATOR_WRITE_NODE
CallOperatorWriteNode.
Definition ast.h:629
PM_MATCH_WRITE_NODE
@ PM_MATCH_WRITE_NODE
MatchWriteNode.
Definition ast.h:869
PM_ARRAY_NODE
@ PM_ARRAY_NODE
ArrayNode.
Definition ast.h:587
PM_CONSTANT_PATH_TARGET_NODE
@ PM_CONSTANT_PATH_TARGET_NODE
ConstantPathTargetNode.
Definition ast.h:689
PM_PROGRAM_NODE
@ PM_PROGRAM_NODE
ProgramNode.
Definition ast.h:926
PM_OR_NODE
@ PM_OR_NODE
OrNode.
Definition ast.h:905
PM_MULTI_WRITE_NODE
@ PM_MULTI_WRITE_NODE
MultiWriteNode.
Definition ast.h:881
PM_IF_NODE
@ PM_IF_NODE
IfNode.
Definition ast.h:770
PM_IMPLICIT_NODE
@ PM_IMPLICIT_NODE
ImplicitNode.
Definition ast.h:776
PM_ARGUMENTS_NODE
@ PM_ARGUMENTS_NODE
ArgumentsNode.
Definition ast.h:584
PM_FORWARDING_SUPER_NODE
@ PM_FORWARDING_SUPER_NODE
ForwardingSuperNode.
Definition ast.h:743
PM_WHILE_NODE
@ PM_WHILE_NODE
WhileNode.
Definition ast.h:1007
PM_INTERPOLATED_STRING_NODE
@ PM_INTERPOLATED_STRING_NODE
InterpolatedStringNode.
Definition ast.h:824
PM_FALSE_NODE
@ PM_FALSE_NODE
FalseNode.
Definition ast.h:722
PM_FORWARDING_PARAMETER_NODE
@ PM_FORWARDING_PARAMETER_NODE
ForwardingParameterNode.
Definition ast.h:740
PM_BLOCK_LOCAL_VARIABLE_NODE
@ PM_BLOCK_LOCAL_VARIABLE_NODE
BlockLocalVariableNode.
Definition ast.h:608
PM_HASH_NODE
@ PM_HASH_NODE
HashNode.
Definition ast.h:764
PM_UNTIL_NODE
@ PM_UNTIL_NODE
UntilNode.
Definition ast.h:1001
PM_MATCH_PREDICATE_NODE
@ PM_MATCH_PREDICATE_NODE
MatchPredicateNode.
Definition ast.h:863
PM_X_STRING_NODE
@ PM_X_STRING_NODE
XStringNode.
Definition ast.h:1010
PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE
@ PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE
LocalVariableOperatorWriteNode.
Definition ast.h:845
PM_LOCAL_VARIABLE_OR_WRITE_NODE
@ PM_LOCAL_VARIABLE_OR_WRITE_NODE
LocalVariableOrWriteNode.
Definition ast.h:848
PM_INSTANCE_VARIABLE_AND_WRITE_NODE
@ PM_INSTANCE_VARIABLE_AND_WRITE_NODE
InstanceVariableAndWriteNode.
Definition ast.h:797
PM_GLOBAL_VARIABLE_TARGET_NODE
@ PM_GLOBAL_VARIABLE_TARGET_NODE
GlobalVariableTargetNode.
Definition ast.h:758
PM_AND_NODE
@ PM_AND_NODE
AndNode.
Definition ast.h:581
PM_CONSTANT_TARGET_NODE
@ PM_CONSTANT_TARGET_NODE
ConstantTargetNode.
Definition ast.h:698
PM_CONSTANT_PATH_AND_WRITE_NODE
@ PM_CONSTANT_PATH_AND_WRITE_NODE
ConstantPathAndWriteNode.
Definition ast.h:677
PM_IN_NODE
@ PM_IN_NODE
InNode.
Definition ast.h:782
PM_BLOCK_PARAMETER_NODE
@ PM_BLOCK_PARAMETER_NODE
BlockParameterNode.
Definition ast.h:614
PM_CAPTURE_PATTERN_NODE
@ PM_CAPTURE_PATTERN_NODE
CapturePatternNode.
Definition ast.h:638
PM_SOURCE_FILE_NODE
@ PM_SOURCE_FILE_NODE
SourceFileNode.
Definition ast.h:971
PM_NO_KEYWORDS_PARAMETER_NODE
@ PM_NO_KEYWORDS_PARAMETER_NODE
NoKeywordsParameterNode.
Definition ast.h:890
PM_CONSTANT_PATH_OPERATOR_WRITE_NODE
@ PM_CONSTANT_PATH_OPERATOR_WRITE_NODE
ConstantPathOperatorWriteNode.
Definition ast.h:683
PM_MULTI_TARGET_NODE
@ PM_MULTI_TARGET_NODE
MultiTargetNode.
Definition ast.h:878
PM_SPLAT_NODE
@ PM_SPLAT_NODE
SplatNode.
Definition ast.h:977
PM_LAMBDA_NODE
@ PM_LAMBDA_NODE
LambdaNode.
Definition ast.h:839
PM_CLASS_VARIABLE_READ_NODE
@ PM_CLASS_VARIABLE_READ_NODE
ClassVariableReadNode.
Definition ast.h:659
PM_REQUIRED_KEYWORD_PARAMETER_NODE
@ PM_REQUIRED_KEYWORD_PARAMETER_NODE
RequiredKeywordParameterNode.
Definition ast.h:941
PM_CALL_TARGET_NODE
@ PM_CALL_TARGET_NODE
CallTargetNode.
Definition ast.h:635
PM_ELSE_NODE
@ PM_ELSE_NODE
ElseNode.
Definition ast.h:710
PM_INTERPOLATED_MATCH_LAST_LINE_NODE
@ PM_INTERPOLATED_MATCH_LAST_LINE_NODE
InterpolatedMatchLastLineNode.
Definition ast.h:818
PM_WHEN_NODE
@ PM_WHEN_NODE
WhenNode.
Definition ast.h:1004
PM_NUMBERED_PARAMETERS_NODE
@ PM_NUMBERED_PARAMETERS_NODE
NumberedParametersNode.
Definition ast.h:893
PM_SYMBOL_NODE
@ PM_SYMBOL_NODE
SymbolNode.
Definition ast.h:989
PM_RESCUE_MODIFIER_NODE
@ PM_RESCUE_MODIFIER_NODE
RescueModifierNode.
Definition ast.h:947
PM_ALIAS_METHOD_NODE
@ PM_ALIAS_METHOD_NODE
AliasMethodNode.
Definition ast.h:575
PM_MATCH_REQUIRED_NODE
@ PM_MATCH_REQUIRED_NODE
MatchRequiredNode.
Definition ast.h:866
PM_FORWARDING_ARGUMENTS_NODE
@ PM_FORWARDING_ARGUMENTS_NODE
ForwardingArgumentsNode.
Definition ast.h:737
PM_BACK_REFERENCE_READ_NODE
@ PM_BACK_REFERENCE_READ_NODE
BackReferenceReadNode.
Definition ast.h:599
PM_BLOCK_ARGUMENT_NODE
@ PM_BLOCK_ARGUMENT_NODE
BlockArgumentNode.
Definition ast.h:605
PM_MISSING_NODE
@ PM_MISSING_NODE
MissingNode.
Definition ast.h:872
PM_SELF_NODE
@ PM_SELF_NODE
SelfNode.
Definition ast.h:962
PM_IMPLICIT_REST_NODE
@ PM_IMPLICIT_REST_NODE
ImplicitRestNode.
Definition ast.h:779
PM_TRUE_NODE
@ PM_TRUE_NODE
TrueNode.
Definition ast.h:992
PM_ASSOC_SPLAT_NODE
@ PM_ASSOC_SPLAT_NODE
AssocSplatNode.
Definition ast.h:596
PM_CLASS_VARIABLE_AND_WRITE_NODE
@ PM_CLASS_VARIABLE_AND_WRITE_NODE
ClassVariableAndWriteNode.
Definition ast.h:650
PM_RANGE_NODE
@ PM_RANGE_NODE
RangeNode.
Definition ast.h:929
PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE
@ PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE
InstanceVariableOperatorWriteNode.
Definition ast.h:800
PM_LOCAL_VARIABLE_READ_NODE
@ PM_LOCAL_VARIABLE_READ_NODE
LocalVariableReadNode.
Definition ast.h:851
PM_NEXT_NODE
@ PM_NEXT_NODE
NextNode.
Definition ast.h:884
PM_INSTANCE_VARIABLE_OR_WRITE_NODE
@ PM_INSTANCE_VARIABLE_OR_WRITE_NODE
InstanceVariableOrWriteNode.
Definition ast.h:803
PM_REGULAR_EXPRESSION_NODE
@ PM_REGULAR_EXPRESSION_NODE
RegularExpressionNode.
Definition ast.h:938
PM_CLASS_VARIABLE_OR_WRITE_NODE
@ PM_CLASS_VARIABLE_OR_WRITE_NODE
ClassVariableOrWriteNode.
Definition ast.h:656
PM_BLOCK_PARAMETERS_NODE
@ PM_BLOCK_PARAMETERS_NODE
BlockParametersNode.
Definition ast.h:617
PM_CONSTANT_WRITE_NODE
@ PM_CONSTANT_WRITE_NODE
ConstantWriteNode.
Definition ast.h:701
PM_HASH_PATTERN_NODE
@ PM_HASH_PATTERN_NODE
HashPatternNode.
Definition ast.h:767
PM_INDEX_OPERATOR_WRITE_NODE
@ PM_INDEX_OPERATOR_WRITE_NODE
IndexOperatorWriteNode.
Definition ast.h:788
PM_UNDEF_NODE
@ PM_UNDEF_NODE
UndefNode.
Definition ast.h:995
PM_ALTERNATION_PATTERN_NODE
@ PM_ALTERNATION_PATTERN_NODE
AlternationPatternNode.
Definition ast.h:578
PM_ENSURE_NODE
@ PM_ENSURE_NODE
EnsureNode.
Definition ast.h:719
PM_LOCAL_VARIABLE_WRITE_NODE
@ PM_LOCAL_VARIABLE_WRITE_NODE
LocalVariableWriteNode.
Definition ast.h:857
PM_SINGLETON_CLASS_NODE
@ PM_SINGLETON_CLASS_NODE
SingletonClassNode.
Definition ast.h:965
PM_KEYWORD_HASH_NODE
@ PM_KEYWORD_HASH_NODE
KeywordHashNode.
Definition ast.h:833
PM_PARENTHESES_NODE
@ PM_PARENTHESES_NODE
ParenthesesNode.
Definition ast.h:911
PM_FOR_NODE
@ PM_FOR_NODE
ForNode.
Definition ast.h:734
PM_CLASS_VARIABLE_WRITE_NODE
@ PM_CLASS_VARIABLE_WRITE_NODE
ClassVariableWriteNode.
Definition ast.h:665
PM_POST_EXECUTION_NODE
@ PM_POST_EXECUTION_NODE
PostExecutionNode.
Definition ast.h:920
PM_CONSTANT_OPERATOR_WRITE_NODE
@ PM_CONSTANT_OPERATOR_WRITE_NODE
ConstantOperatorWriteNode.
Definition ast.h:671
PM_RETURN_NODE
@ PM_RETURN_NODE
ReturnNode.
Definition ast.h:959
PM_MODULE_NODE
@ PM_MODULE_NODE
ModuleNode.
Definition ast.h:875
PM_ARRAY_PATTERN_NODE
@ PM_ARRAY_PATTERN_NODE
ArrayPatternNode.
Definition ast.h:590
PM_SUPER_NODE
@ PM_SUPER_NODE
SuperNode.
Definition ast.h:986
PM_MATCH_LAST_LINE_NODE
@ PM_MATCH_LAST_LINE_NODE
MatchLastLineNode.
Definition ast.h:860
PM_CONSTANT_PATH_NODE
@ PM_CONSTANT_PATH_NODE
ConstantPathNode.
Definition ast.h:680
PM_INTERPOLATED_SYMBOL_NODE
@ PM_INTERPOLATED_SYMBOL_NODE
InterpolatedSymbolNode.
Definition ast.h:827
PM_CALL_AND_WRITE_NODE
@ PM_CALL_AND_WRITE_NODE
CallAndWriteNode.
Definition ast.h:623
PM_OPTIONAL_KEYWORD_PARAMETER_NODE
@ PM_OPTIONAL_KEYWORD_PARAMETER_NODE
OptionalKeywordParameterNode.
Definition ast.h:899
PM_CLASS_VARIABLE_TARGET_NODE
@ PM_CLASS_VARIABLE_TARGET_NODE
ClassVariableTargetNode.
Definition ast.h:662
PM_CASE_MATCH_NODE
@ PM_CASE_MATCH_NODE
CaseMatchNode.
Definition ast.h:641
PM_BREAK_NODE
@ PM_BREAK_NODE
BreakNode.
Definition ast.h:620
PM_CALL_OR_WRITE_NODE
@ PM_CALL_OR_WRITE_NODE
CallOrWriteNode.
Definition ast.h:632
PM_IMAGINARY_NODE
@ PM_IMAGINARY_NODE
ImaginaryNode.
Definition ast.h:773
PM_DEF_NODE
@ PM_DEF_NODE
DefNode.
Definition ast.h:704
PM_CONSTANT_READ_NODE
@ PM_CONSTANT_READ_NODE
ConstantReadNode.
Definition ast.h:695
PM_GLOBAL_VARIABLE_WRITE_NODE
@ PM_GLOBAL_VARIABLE_WRITE_NODE
GlobalVariableWriteNode.
Definition ast.h:761
PM_SOURCE_ENCODING_NODE
@ PM_SOURCE_ENCODING_NODE
SourceEncodingNode.
Definition ast.h:968
PM_BEGIN_NODE
@ PM_BEGIN_NODE
BeginNode.
Definition ast.h:602
PM_INTERPOLATED_X_STRING_NODE
@ PM_INTERPOLATED_X_STRING_NODE
InterpolatedXStringNode.
Definition ast.h:830
PM_INSTANCE_VARIABLE_READ_NODE
@ PM_INSTANCE_VARIABLE_READ_NODE
InstanceVariableReadNode.
Definition ast.h:806
PM_FLIP_FLOP_NODE
@ PM_FLIP_FLOP_NODE
FlipFlopNode.
Definition ast.h:728
PM_PINNED_VARIABLE_NODE
@ PM_PINNED_VARIABLE_NODE
PinnedVariableNode.
Definition ast.h:917
PM_REQUIRED_PARAMETER_NODE
@ PM_REQUIRED_PARAMETER_NODE
RequiredParameterNode.
Definition ast.h:944
PM_INSTANCE_VARIABLE_WRITE_NODE
@ PM_INSTANCE_VARIABLE_WRITE_NODE
InstanceVariableWriteNode.
Definition ast.h:812
PM_INSTANCE_VARIABLE_TARGET_NODE
@ PM_INSTANCE_VARIABLE_TARGET_NODE
InstanceVariableTargetNode.
Definition ast.h:809
PM_GLOBAL_VARIABLE_AND_WRITE_NODE
@ PM_GLOBAL_VARIABLE_AND_WRITE_NODE
GlobalVariableAndWriteNode.
Definition ast.h:746
PM_CASE_NODE
@ PM_CASE_NODE
CaseNode.
Definition ast.h:644
PM_RESCUE_NODE
@ PM_RESCUE_NODE
RescueNode.
Definition ast.h:950
PM_FLOAT_NODE
@ PM_FLOAT_NODE
FloatNode.
Definition ast.h:731
PM_ASSOC_NODE
@ PM_ASSOC_NODE
AssocNode.
Definition ast.h:593
PM_INTEGER_NODE
@ PM_INTEGER_NODE
IntegerNode.
Definition ast.h:815
PM_LOCAL_VARIABLE_TARGET_NODE
@ PM_LOCAL_VARIABLE_TARGET_NODE
LocalVariableTargetNode.
Definition ast.h:854
PM_STRING_NODE
@ PM_STRING_NODE
StringNode.
Definition ast.h:983
PM_INDEX_OR_WRITE_NODE
@ PM_INDEX_OR_WRITE_NODE
IndexOrWriteNode.
Definition ast.h:791
PM_ALIAS_GLOBAL_VARIABLE_NODE
@ PM_ALIAS_GLOBAL_VARIABLE_NODE
AliasGlobalVariableNode.
Definition ast.h:572
PM_PARAMETERS_NODE
@ PM_PARAMETERS_NODE
ParametersNode.
Definition ast.h:908
PM_NUMBERED_REFERENCE_READ_NODE
@ PM_NUMBERED_REFERENCE_READ_NODE
NumberedReferenceReadNode.
Definition ast.h:896
PM_CONSTANT_PATH_OR_WRITE_NODE
@ PM_CONSTANT_PATH_OR_WRITE_NODE
ConstantPathOrWriteNode.
Definition ast.h:686
PM_GLOBAL_VARIABLE_OR_WRITE_NODE
@ PM_GLOBAL_VARIABLE_OR_WRITE_NODE
GlobalVariableOrWriteNode.
Definition ast.h:752
PM_CONSTANT_OR_WRITE_NODE
@ PM_CONSTANT_OR_WRITE_NODE
ConstantOrWriteNode.
Definition ast.h:674
PM_STATEMENTS_NODE
@ PM_STATEMENTS_NODE
StatementsNode.
Definition ast.h:980
PM_OPTIONAL_PARAMETER_NODE
@ PM_OPTIONAL_PARAMETER_NODE
OptionalParameterNode.
Definition ast.h:902
PM_PINNED_EXPRESSION_NODE
@ PM_PINNED_EXPRESSION_NODE
PinnedExpressionNode.
Definition ast.h:914
PM_BLOCK_NODE
@ PM_BLOCK_NODE
BlockNode.
Definition ast.h:611
PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE
@ PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE
ClassVariableOperatorWriteNode.
Definition ast.h:653
PM_REST_PARAMETER_NODE
@ PM_REST_PARAMETER_NODE
RestParameterNode.
Definition ast.h:953
PM_EMBEDDED_STATEMENTS_NODE
@ PM_EMBEDDED_STATEMENTS_NODE
EmbeddedStatementsNode.
Definition ast.h:713
PM_INTERPOLATED_REGULAR_EXPRESSION_NODE
@ PM_INTERPOLATED_REGULAR_EXPRESSION_NODE
InterpolatedRegularExpressionNode.
Definition ast.h:821
PM_INDEX_TARGET_NODE
@ PM_INDEX_TARGET_NODE
IndexTargetNode.
Definition ast.h:794
PM_KEYWORD_REST_PARAMETER_NODE
@ PM_KEYWORD_REST_PARAMETER_NODE
KeywordRestParameterNode.
Definition ast.h:836
PM_NODE_TYPE
#define PM_NODE_TYPE(node)
Cast the type to an enum to allow the compiler to provide exhaustiveness checking.
Definition ast.h:1045
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:1002
INT2FIX
#define INT2FIX
Old name of RB_INT2FIX.
Definition long.h:48
ID2SYM
#define ID2SYM
Old name of RB_ID2SYM.
Definition symbol.h:44
ULONG2NUM
#define ULONG2NUM
Old name of RB_ULONG2NUM.
Definition long.h:60
LONG2FIX
#define LONG2FIX
Old name of RB_INT2FIX.
Definition long.h:49
LONG2NUM
#define LONG2NUM
Old name of RB_LONG2NUM.
Definition long.h:50
Qnil
#define Qnil
Old name of RUBY_Qnil.
Definition special_consts.h:60
UINT2NUM
#define UINT2NUM
Old name of RB_UINT2NUM.
Definition int.h:46
rb_eRuntimeError
VALUE rb_eRuntimeError
RuntimeError exception.
Definition error.c:1342
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:2099
rb_intern_const
static ID rb_intern_const(const char *str)
This is a "tiny optimisation" over rb_intern().
Definition symbol.h:276
ruby::backward::cxxanyargs::type
VALUE type(ANYARGS)
ANYARGS-ed function type.
Definition cxxanyargs.hpp:56
pm_token_type_to_str
PRISM_EXPORTED_FUNCTION const char * pm_token_type_to_str(pm_token_type_t token_type)
Returns a string representation of the given token type.
Definition token_type.c:16
OnigEncodingTypeST
Definition onigmo.h:160
pm_alias_global_variable_node
AliasGlobalVariableNode.
Definition ast.h:1088
pm_alias_global_variable_node::old_name
struct pm_node * old_name
AliasGlobalVariableNode::old_name.
Definition ast.h:1096
pm_alias_global_variable_node::new_name
struct pm_node * new_name
AliasGlobalVariableNode::new_name.
Definition ast.h:1093
pm_alias_global_variable_node::keyword_loc
pm_location_t keyword_loc
AliasGlobalVariableNode::keyword_loc.
Definition ast.h:1099
pm_alias_method_node
AliasMethodNode.
Definition ast.h:1109
pm_alias_method_node::old_name
struct pm_node * old_name
AliasMethodNode::old_name.
Definition ast.h:1117
pm_alias_method_node::new_name
struct pm_node * new_name
AliasMethodNode::new_name.
Definition ast.h:1114
pm_alias_method_node::keyword_loc
pm_location_t keyword_loc
AliasMethodNode::keyword_loc.
Definition ast.h:1120
pm_alternation_pattern_node
AlternationPatternNode.
Definition ast.h:1130
pm_alternation_pattern_node::operator_loc
pm_location_t operator_loc
AlternationPatternNode::operator_loc.
Definition ast.h:1141
pm_alternation_pattern_node::left
struct pm_node * left
AlternationPatternNode::left.
Definition ast.h:1135
pm_alternation_pattern_node::right
struct pm_node * right
AlternationPatternNode::right.
Definition ast.h:1138
pm_and_node
AndNode.
Definition ast.h:1151
pm_and_node::left
struct pm_node * left
AndNode::left.
Definition ast.h:1156
pm_and_node::right
struct pm_node * right
AndNode::right.
Definition ast.h:1159
pm_and_node::operator_loc
pm_location_t operator_loc
AndNode::operator_loc.
Definition ast.h:1162
pm_arguments_node
ArgumentsNode.
Definition ast.h:1174
pm_arguments_node::arguments
struct pm_node_list arguments
ArgumentsNode::arguments.
Definition ast.h:1179
pm_array_node
ArrayNode.
Definition ast.h:1191
pm_array_node::closing_loc
pm_location_t closing_loc
ArrayNode::closing_loc.
Definition ast.h:1202
pm_array_node::elements
struct pm_node_list elements
ArrayNode::elements.
Definition ast.h:1196
pm_array_node::opening_loc
pm_location_t opening_loc
ArrayNode::opening_loc.
Definition ast.h:1199
pm_array_pattern_node
ArrayPatternNode.
Definition ast.h:1212
pm_array_pattern_node::requireds
struct pm_node_list requireds
ArrayPatternNode::requireds.
Definition ast.h:1220
pm_array_pattern_node::rest
struct pm_node * rest
ArrayPatternNode::rest.
Definition ast.h:1223
pm_array_pattern_node::constant
struct pm_node * constant
ArrayPatternNode::constant.
Definition ast.h:1217
pm_array_pattern_node::opening_loc
pm_location_t opening_loc
ArrayPatternNode::opening_loc.
Definition ast.h:1229
pm_array_pattern_node::closing_loc
pm_location_t closing_loc
ArrayPatternNode::closing_loc.
Definition ast.h:1232
pm_array_pattern_node::posts
struct pm_node_list posts
ArrayPatternNode::posts.
Definition ast.h:1226
pm_assoc_node
AssocNode.
Definition ast.h:1242
pm_assoc_node::value
struct pm_node * value
AssocNode::value.
Definition ast.h:1250
pm_assoc_node::key
struct pm_node * key
AssocNode::key.
Definition ast.h:1247
pm_assoc_node::operator_loc
pm_location_t operator_loc
AssocNode::operator_loc.
Definition ast.h:1253
pm_assoc_splat_node
AssocSplatNode.
Definition ast.h:1263
pm_assoc_splat_node::value
struct pm_node * value
AssocSplatNode::value.
Definition ast.h:1268
pm_assoc_splat_node::operator_loc
pm_location_t operator_loc
AssocSplatNode::operator_loc.
Definition ast.h:1271
pm_back_reference_read_node
BackReferenceReadNode.
Definition ast.h:1281
pm_back_reference_read_node::name
pm_constant_id_t name
BackReferenceReadNode::name.
Definition ast.h:1286
pm_begin_node
BeginNode.
Definition ast.h:1296
pm_begin_node::ensure_clause
struct pm_ensure_node * ensure_clause
BeginNode::ensure_clause.
Definition ast.h:1313
pm_begin_node::rescue_clause
struct pm_rescue_node * rescue_clause
BeginNode::rescue_clause.
Definition ast.h:1307
pm_begin_node::statements
struct pm_statements_node * statements
BeginNode::statements.
Definition ast.h:1304
pm_begin_node::end_keyword_loc
pm_location_t end_keyword_loc
BeginNode::end_keyword_loc.
Definition ast.h:1316
pm_begin_node::begin_keyword_loc
pm_location_t begin_keyword_loc
BeginNode::begin_keyword_loc.
Definition ast.h:1301
pm_begin_node::else_clause
struct pm_else_node * else_clause
BeginNode::else_clause.
Definition ast.h:1310
pm_block_argument_node
BlockArgumentNode.
Definition ast.h:1326
pm_block_argument_node::expression
struct pm_node * expression
BlockArgumentNode::expression.
Definition ast.h:1331
pm_block_argument_node::operator_loc
pm_location_t operator_loc
BlockArgumentNode::operator_loc.
Definition ast.h:1334
pm_block_local_variable_node
BlockLocalVariableNode.
Definition ast.h:1344
pm_block_local_variable_node::name
pm_constant_id_t name
BlockLocalVariableNode::name.
Definition ast.h:1349
pm_block_node
BlockNode.
Definition ast.h:1359
pm_block_node::closing_loc
pm_location_t closing_loc
BlockNode::closing_loc.
Definition ast.h:1379
pm_block_node::parameters
struct pm_node * parameters
BlockNode::parameters.
Definition ast.h:1370
pm_block_node::opening_loc
pm_location_t opening_loc
BlockNode::opening_loc.
Definition ast.h:1376
pm_block_node::body
struct pm_node * body
BlockNode::body.
Definition ast.h:1373
pm_block_node::locals_body_index
uint32_t locals_body_index
BlockNode::locals_body_index.
Definition ast.h:1367
pm_block_node::locals
pm_constant_id_list_t locals
BlockNode::locals.
Definition ast.h:1364
pm_block_parameter_node
BlockParameterNode.
Definition ast.h:1389
pm_block_parameter_node::operator_loc
pm_location_t operator_loc
BlockParameterNode::operator_loc.
Definition ast.h:1400
pm_block_parameter_node::name_loc
pm_location_t name_loc
BlockParameterNode::name_loc.
Definition ast.h:1397
pm_block_parameter_node::name
pm_constant_id_t name
BlockParameterNode::name.
Definition ast.h:1394
pm_block_parameters_node
BlockParametersNode.
Definition ast.h:1410
pm_block_parameters_node::parameters
struct pm_parameters_node * parameters
BlockParametersNode::parameters.
Definition ast.h:1415
pm_block_parameters_node::locals
struct pm_node_list locals
BlockParametersNode::locals.
Definition ast.h:1418
pm_block_parameters_node::closing_loc
pm_location_t closing_loc
BlockParametersNode::closing_loc.
Definition ast.h:1424
pm_block_parameters_node::opening_loc
pm_location_t opening_loc
BlockParametersNode::opening_loc.
Definition ast.h:1421
pm_break_node
BreakNode.
Definition ast.h:1434
pm_break_node::arguments
struct pm_arguments_node * arguments
BreakNode::arguments.
Definition ast.h:1439
pm_break_node::keyword_loc
pm_location_t keyword_loc
BreakNode::keyword_loc.
Definition ast.h:1442
pm_call_and_write_node
CallAndWriteNode.
Definition ast.h:1456
pm_call_and_write_node::operator_loc
pm_location_t operator_loc
CallAndWriteNode::operator_loc.
Definition ast.h:1476
pm_call_and_write_node::value
struct pm_node * value
CallAndWriteNode::value.
Definition ast.h:1479
pm_call_and_write_node::call_operator_loc
pm_location_t call_operator_loc
CallAndWriteNode::call_operator_loc.
Definition ast.h:1464
pm_call_and_write_node::message_loc
pm_location_t message_loc
CallAndWriteNode::message_loc.
Definition ast.h:1467
pm_call_and_write_node::read_name
pm_constant_id_t read_name
CallAndWriteNode::read_name.
Definition ast.h:1470
pm_call_and_write_node::write_name
pm_constant_id_t write_name
CallAndWriteNode::write_name.
Definition ast.h:1473
pm_call_and_write_node::receiver
struct pm_node * receiver
CallAndWriteNode::receiver.
Definition ast.h:1461
pm_call_node
CallNode.
Definition ast.h:1493
pm_call_node::opening_loc
pm_location_t opening_loc
CallNode::opening_loc.
Definition ast.h:1510
pm_call_node::closing_loc
pm_location_t closing_loc
CallNode::closing_loc.
Definition ast.h:1516
pm_call_node::receiver
struct pm_node * receiver
CallNode::receiver.
Definition ast.h:1498
pm_call_node::name
pm_constant_id_t name
CallNode::name.
Definition ast.h:1504
pm_call_node::call_operator_loc
pm_location_t call_operator_loc
CallNode::call_operator_loc.
Definition ast.h:1501
pm_call_node::message_loc
pm_location_t message_loc
CallNode::message_loc.
Definition ast.h:1507
pm_call_node::arguments
struct pm_arguments_node * arguments
CallNode::arguments.
Definition ast.h:1513
pm_call_node::block
struct pm_node * block
CallNode::block.
Definition ast.h:1519
pm_call_operator_write_node
CallOperatorWriteNode.
Definition ast.h:1533
pm_call_operator_write_node::read_name
pm_constant_id_t read_name
CallOperatorWriteNode::read_name.
Definition ast.h:1547
pm_call_operator_write_node::receiver
struct pm_node * receiver
CallOperatorWriteNode::receiver.
Definition ast.h:1538
pm_call_operator_write_node::write_name
pm_constant_id_t write_name
CallOperatorWriteNode::write_name.
Definition ast.h:1550
pm_call_operator_write_node::message_loc
pm_location_t message_loc
CallOperatorWriteNode::message_loc.
Definition ast.h:1544
pm_call_operator_write_node::operator
pm_constant_id_t operator
CallOperatorWriteNode::operator.
Definition ast.h:1553
pm_call_operator_write_node::operator_loc
pm_location_t operator_loc
CallOperatorWriteNode::operator_loc.
Definition ast.h:1556
pm_call_operator_write_node::value
struct pm_node * value
CallOperatorWriteNode::value.
Definition ast.h:1559
pm_call_operator_write_node::call_operator_loc
pm_location_t call_operator_loc
CallOperatorWriteNode::call_operator_loc.
Definition ast.h:1541
pm_call_or_write_node
CallOrWriteNode.
Definition ast.h:1573
pm_call_or_write_node::operator_loc
pm_location_t operator_loc
CallOrWriteNode::operator_loc.
Definition ast.h:1593
pm_call_or_write_node::call_operator_loc
pm_location_t call_operator_loc
CallOrWriteNode::call_operator_loc.
Definition ast.h:1581
pm_call_or_write_node::receiver
struct pm_node * receiver
CallOrWriteNode::receiver.
Definition ast.h:1578
pm_call_or_write_node::value
struct pm_node * value
CallOrWriteNode::value.
Definition ast.h:1596
pm_call_or_write_node::write_name
pm_constant_id_t write_name
CallOrWriteNode::write_name.
Definition ast.h:1590
pm_call_or_write_node::read_name
pm_constant_id_t read_name
CallOrWriteNode::read_name.
Definition ast.h:1587
pm_call_or_write_node::message_loc
pm_location_t message_loc
CallOrWriteNode::message_loc.
Definition ast.h:1584
pm_call_target_node
CallTargetNode.
Definition ast.h:1610
pm_call_target_node::name
pm_constant_id_t name
CallTargetNode::name.
Definition ast.h:1621
pm_call_target_node::receiver
struct pm_node * receiver
CallTargetNode::receiver.
Definition ast.h:1615
pm_call_target_node::call_operator_loc
pm_location_t call_operator_loc
CallTargetNode::call_operator_loc.
Definition ast.h:1618
pm_call_target_node::message_loc
pm_location_t message_loc
CallTargetNode::message_loc.
Definition ast.h:1624
pm_capture_pattern_node
CapturePatternNode.
Definition ast.h:1634
pm_capture_pattern_node::target
struct pm_node * target
CapturePatternNode::target.
Definition ast.h:1642
pm_capture_pattern_node::operator_loc
pm_location_t operator_loc
CapturePatternNode::operator_loc.
Definition ast.h:1645
pm_capture_pattern_node::value
struct pm_node * value
CapturePatternNode::value.
Definition ast.h:1639
pm_case_match_node
CaseMatchNode.
Definition ast.h:1655
pm_case_match_node::end_keyword_loc
pm_location_t end_keyword_loc
CaseMatchNode::end_keyword_loc.
Definition ast.h:1672
pm_case_match_node::conditions
struct pm_node_list conditions
CaseMatchNode::conditions.
Definition ast.h:1663
pm_case_match_node::consequent
struct pm_else_node * consequent
CaseMatchNode::consequent.
Definition ast.h:1666
pm_case_match_node::case_keyword_loc
pm_location_t case_keyword_loc
CaseMatchNode::case_keyword_loc.
Definition ast.h:1669
pm_case_match_node::predicate
struct pm_node * predicate
CaseMatchNode::predicate.
Definition ast.h:1660
pm_case_node
CaseNode.
Definition ast.h:1682
pm_case_node::predicate
struct pm_node * predicate
CaseNode::predicate.
Definition ast.h:1687
pm_case_node::consequent
struct pm_else_node * consequent
CaseNode::consequent.
Definition ast.h:1693
pm_case_node::conditions
struct pm_node_list conditions
CaseNode::conditions.
Definition ast.h:1690
pm_case_node::case_keyword_loc
pm_location_t case_keyword_loc
CaseNode::case_keyword_loc.
Definition ast.h:1696
pm_case_node::end_keyword_loc
pm_location_t end_keyword_loc
CaseNode::end_keyword_loc.
Definition ast.h:1699
pm_class_node
ClassNode.
Definition ast.h:1709
pm_class_node::class_keyword_loc
pm_location_t class_keyword_loc
ClassNode::class_keyword_loc.
Definition ast.h:1717
pm_class_node::end_keyword_loc
pm_location_t end_keyword_loc
ClassNode::end_keyword_loc.
Definition ast.h:1732
pm_class_node::constant_path
struct pm_node * constant_path
ClassNode::constant_path.
Definition ast.h:1720
pm_class_node::locals
pm_constant_id_list_t locals
ClassNode::locals.
Definition ast.h:1714
pm_class_node::inheritance_operator_loc
pm_location_t inheritance_operator_loc
ClassNode::inheritance_operator_loc.
Definition ast.h:1723
pm_class_node::name
pm_constant_id_t name
ClassNode::name.
Definition ast.h:1735
pm_class_node::body
struct pm_node * body
ClassNode::body.
Definition ast.h:1729
pm_class_node::superclass
struct pm_node * superclass
ClassNode::superclass.
Definition ast.h:1726
pm_class_variable_and_write_node
ClassVariableAndWriteNode.
Definition ast.h:1745
pm_class_variable_and_write_node::value
struct pm_node * value
ClassVariableAndWriteNode::value.
Definition ast.h:1759
pm_class_variable_and_write_node::name
pm_constant_id_t name
ClassVariableAndWriteNode::name.
Definition ast.h:1750
pm_class_variable_and_write_node::operator_loc
pm_location_t operator_loc
ClassVariableAndWriteNode::operator_loc.
Definition ast.h:1756
pm_class_variable_and_write_node::name_loc
pm_location_t name_loc
ClassVariableAndWriteNode::name_loc.
Definition ast.h:1753
pm_class_variable_operator_write_node
ClassVariableOperatorWriteNode.
Definition ast.h:1769
pm_class_variable_operator_write_node::operator_loc
pm_location_t operator_loc
ClassVariableOperatorWriteNode::operator_loc.
Definition ast.h:1780
pm_class_variable_operator_write_node::name
pm_constant_id_t name
ClassVariableOperatorWriteNode::name.
Definition ast.h:1774
pm_class_variable_operator_write_node::operator
pm_constant_id_t operator
ClassVariableOperatorWriteNode::operator.
Definition ast.h:1786
pm_class_variable_operator_write_node::name_loc
pm_location_t name_loc
ClassVariableOperatorWriteNode::name_loc.
Definition ast.h:1777
pm_class_variable_operator_write_node::value
struct pm_node * value
ClassVariableOperatorWriteNode::value.
Definition ast.h:1783
pm_class_variable_or_write_node
ClassVariableOrWriteNode.
Definition ast.h:1796
pm_class_variable_or_write_node::name_loc
pm_location_t name_loc
ClassVariableOrWriteNode::name_loc.
Definition ast.h:1804
pm_class_variable_or_write_node::operator_loc
pm_location_t operator_loc
ClassVariableOrWriteNode::operator_loc.
Definition ast.h:1807
pm_class_variable_or_write_node::name
pm_constant_id_t name
ClassVariableOrWriteNode::name.
Definition ast.h:1801
pm_class_variable_or_write_node::value
struct pm_node * value
ClassVariableOrWriteNode::value.
Definition ast.h:1810
pm_class_variable_read_node
ClassVariableReadNode.
Definition ast.h:1820
pm_class_variable_read_node::name
pm_constant_id_t name
ClassVariableReadNode::name.
Definition ast.h:1825
pm_class_variable_target_node
ClassVariableTargetNode.
Definition ast.h:1835
pm_class_variable_target_node::name
pm_constant_id_t name
ClassVariableTargetNode::name.
Definition ast.h:1840
pm_class_variable_write_node
ClassVariableWriteNode.
Definition ast.h:1850
pm_class_variable_write_node::name_loc
pm_location_t name_loc
ClassVariableWriteNode::name_loc.
Definition ast.h:1858
pm_class_variable_write_node::value
struct pm_node * value
ClassVariableWriteNode::value.
Definition ast.h:1861
pm_class_variable_write_node::operator_loc
pm_location_t operator_loc
ClassVariableWriteNode::operator_loc.
Definition ast.h:1864
pm_class_variable_write_node::name
pm_constant_id_t name
ClassVariableWriteNode::name.
Definition ast.h:1855
pm_constant_and_write_node
ConstantAndWriteNode.
Definition ast.h:1874
pm_constant_and_write_node::operator_loc
pm_location_t operator_loc
ConstantAndWriteNode::operator_loc.
Definition ast.h:1885
pm_constant_and_write_node::name_loc
pm_location_t name_loc
ConstantAndWriteNode::name_loc.
Definition ast.h:1882
pm_constant_and_write_node::name
pm_constant_id_t name
ConstantAndWriteNode::name.
Definition ast.h:1879
pm_constant_and_write_node::value
struct pm_node * value
ConstantAndWriteNode::value.
Definition ast.h:1888
pm_constant_id_list_t::size
size_t size
The number of constant ids in the list.
Definition pm_constant_pool.h:31
pm_constant_id_list_t::ids
pm_constant_id_t * ids
The constant ids in the list.
Definition pm_constant_pool.h:37
pm_constant_operator_write_node
ConstantOperatorWriteNode.
Definition ast.h:1898
pm_constant_operator_write_node::name
pm_constant_id_t name
ConstantOperatorWriteNode::name.
Definition ast.h:1903
pm_constant_operator_write_node::name_loc
pm_location_t name_loc
ConstantOperatorWriteNode::name_loc.
Definition ast.h:1906
pm_constant_operator_write_node::operator
pm_constant_id_t operator
ConstantOperatorWriteNode::operator.
Definition ast.h:1915
pm_constant_operator_write_node::value
struct pm_node * value
ConstantOperatorWriteNode::value.
Definition ast.h:1912
pm_constant_operator_write_node::operator_loc
pm_location_t operator_loc
ConstantOperatorWriteNode::operator_loc.
Definition ast.h:1909
pm_constant_or_write_node
ConstantOrWriteNode.
Definition ast.h:1925
pm_constant_or_write_node::operator_loc
pm_location_t operator_loc
ConstantOrWriteNode::operator_loc.
Definition ast.h:1936
pm_constant_or_write_node::name_loc
pm_location_t name_loc
ConstantOrWriteNode::name_loc.
Definition ast.h:1933
pm_constant_or_write_node::name
pm_constant_id_t name
ConstantOrWriteNode::name.
Definition ast.h:1930
pm_constant_or_write_node::value
struct pm_node * value
ConstantOrWriteNode::value.
Definition ast.h:1939
pm_constant_path_and_write_node
ConstantPathAndWriteNode.
Definition ast.h:1949
pm_constant_path_and_write_node::target
struct pm_constant_path_node * target
ConstantPathAndWriteNode::target.
Definition ast.h:1954
pm_constant_path_and_write_node::operator_loc
pm_location_t operator_loc
ConstantPathAndWriteNode::operator_loc.
Definition ast.h:1957
pm_constant_path_and_write_node::value
struct pm_node * value
ConstantPathAndWriteNode::value.
Definition ast.h:1960
pm_constant_path_node
ConstantPathNode.
Definition ast.h:1970
pm_constant_path_node::delimiter_loc
pm_location_t delimiter_loc
ConstantPathNode::delimiter_loc.
Definition ast.h:1981
pm_constant_path_node::child
struct pm_node * child
ConstantPathNode::child.
Definition ast.h:1978
pm_constant_path_node::parent
struct pm_node * parent
ConstantPathNode::parent.
Definition ast.h:1975
pm_constant_path_operator_write_node
ConstantPathOperatorWriteNode.
Definition ast.h:1991
pm_constant_path_operator_write_node::operator
pm_constant_id_t operator
ConstantPathOperatorWriteNode::operator.
Definition ast.h:2005
pm_constant_path_operator_write_node::target
struct pm_constant_path_node * target
ConstantPathOperatorWriteNode::target.
Definition ast.h:1996
pm_constant_path_operator_write_node::value
struct pm_node * value
ConstantPathOperatorWriteNode::value.
Definition ast.h:2002
pm_constant_path_operator_write_node::operator_loc
pm_location_t operator_loc
ConstantPathOperatorWriteNode::operator_loc.
Definition ast.h:1999
pm_constant_path_or_write_node
ConstantPathOrWriteNode.
Definition ast.h:2015
pm_constant_path_or_write_node::operator_loc
pm_location_t operator_loc
ConstantPathOrWriteNode::operator_loc.
Definition ast.h:2023
pm_constant_path_or_write_node::value
struct pm_node * value
ConstantPathOrWriteNode::value.
Definition ast.h:2026
pm_constant_path_or_write_node::target
struct pm_constant_path_node * target
ConstantPathOrWriteNode::target.
Definition ast.h:2020
pm_constant_path_target_node
ConstantPathTargetNode.
Definition ast.h:2036
pm_constant_path_target_node::parent
struct pm_node * parent
ConstantPathTargetNode::parent.
Definition ast.h:2041
pm_constant_path_target_node::delimiter_loc
pm_location_t delimiter_loc
ConstantPathTargetNode::delimiter_loc.
Definition ast.h:2047
pm_constant_path_target_node::child
struct pm_node * child
ConstantPathTargetNode::child.
Definition ast.h:2044
pm_constant_path_write_node
ConstantPathWriteNode.
Definition ast.h:2057
pm_constant_path_write_node::target
struct pm_constant_path_node * target
ConstantPathWriteNode::target.
Definition ast.h:2062
pm_constant_path_write_node::operator_loc
pm_location_t operator_loc
ConstantPathWriteNode::operator_loc.
Definition ast.h:2065
pm_constant_path_write_node::value
struct pm_node * value
ConstantPathWriteNode::value.
Definition ast.h:2068
pm_constant_pool_t::size
uint32_t size
The number of buckets in the hash map.
Definition pm_constant_pool.h:126
pm_constant_pool_t::constants
pm_constant_t * constants
The constants that are stored in the buckets.
Definition pm_constant_pool.h:123
pm_constant_read_node
ConstantReadNode.
Definition ast.h:2078
pm_constant_read_node::name
pm_constant_id_t name
ConstantReadNode::name.
Definition ast.h:2083
pm_constant_t
A constant in the pool which effectively stores a string.
Definition pm_constant_pool.h:109
pm_constant_t::length
size_t length
The length of the string.
Definition pm_constant_pool.h:114
pm_constant_t::start
const uint8_t * start
A pointer to the start of the string.
Definition pm_constant_pool.h:111
pm_constant_target_node
ConstantTargetNode.
Definition ast.h:2093
pm_constant_target_node::name
pm_constant_id_t name
ConstantTargetNode::name.
Definition ast.h:2098
pm_constant_write_node
ConstantWriteNode.
Definition ast.h:2108
pm_constant_write_node::value
struct pm_node * value
ConstantWriteNode::value.
Definition ast.h:2119
pm_constant_write_node::name
pm_constant_id_t name
ConstantWriteNode::name.
Definition ast.h:2113
pm_constant_write_node::name_loc
pm_location_t name_loc
ConstantWriteNode::name_loc.
Definition ast.h:2116
pm_constant_write_node::operator_loc
pm_location_t operator_loc
ConstantWriteNode::operator_loc.
Definition ast.h:2122
pm_def_node
DefNode.
Definition ast.h:2132
pm_def_node::parameters
struct pm_parameters_node * parameters
DefNode::parameters.
Definition ast.h:2146
pm_def_node::locals_body_index
uint32_t locals_body_index
DefNode::locals_body_index.
Definition ast.h:2155
pm_def_node::end_keyword_loc
pm_location_t end_keyword_loc
DefNode::end_keyword_loc.
Definition ast.h:2173
pm_def_node::name
pm_constant_id_t name
DefNode::name.
Definition ast.h:2137
pm_def_node::name_loc
pm_location_t name_loc
DefNode::name_loc.
Definition ast.h:2140
pm_def_node::rparen_loc
pm_location_t rparen_loc
DefNode::rparen_loc.
Definition ast.h:2167
pm_def_node::body
struct pm_node * body
DefNode::body.
Definition ast.h:2149
pm_def_node::equal_loc
pm_location_t equal_loc
DefNode::equal_loc.
Definition ast.h:2170
pm_def_node::def_keyword_loc
pm_location_t def_keyword_loc
DefNode::def_keyword_loc.
Definition ast.h:2158
pm_def_node::receiver
struct pm_node * receiver
DefNode::receiver.
Definition ast.h:2143
pm_def_node::lparen_loc
pm_location_t lparen_loc
DefNode::lparen_loc.
Definition ast.h:2164
pm_def_node::operator_loc
pm_location_t operator_loc
DefNode::operator_loc.
Definition ast.h:2161
pm_def_node::locals
pm_constant_id_list_t locals
DefNode::locals.
Definition ast.h:2152
pm_defined_node
DefinedNode.
Definition ast.h:2183
pm_defined_node::lparen_loc
pm_location_t lparen_loc
DefinedNode::lparen_loc.
Definition ast.h:2188
pm_defined_node::rparen_loc
pm_location_t rparen_loc
DefinedNode::rparen_loc.
Definition ast.h:2194
pm_defined_node::keyword_loc
pm_location_t keyword_loc
DefinedNode::keyword_loc.
Definition ast.h:2197
pm_defined_node::value
struct pm_node * value
DefinedNode::value.
Definition ast.h:2191
pm_else_node
ElseNode.
Definition ast.h:2207
pm_else_node::statements
struct pm_statements_node * statements
ElseNode::statements.
Definition ast.h:2215
pm_else_node::else_keyword_loc
pm_location_t else_keyword_loc
ElseNode::else_keyword_loc.
Definition ast.h:2212
pm_else_node::end_keyword_loc
pm_location_t end_keyword_loc
ElseNode::end_keyword_loc.
Definition ast.h:2218
pm_embedded_statements_node
EmbeddedStatementsNode.
Definition ast.h:2228
pm_embedded_statements_node::closing_loc
pm_location_t closing_loc
EmbeddedStatementsNode::closing_loc.
Definition ast.h:2239
pm_embedded_statements_node::statements
struct pm_statements_node * statements
EmbeddedStatementsNode::statements.
Definition ast.h:2236
pm_embedded_statements_node::opening_loc
pm_location_t opening_loc
EmbeddedStatementsNode::opening_loc.
Definition ast.h:2233
pm_embedded_variable_node
EmbeddedVariableNode.
Definition ast.h:2249
pm_embedded_variable_node::variable
struct pm_node * variable
EmbeddedVariableNode::variable.
Definition ast.h:2257
pm_embedded_variable_node::operator_loc
pm_location_t operator_loc
EmbeddedVariableNode::operator_loc.
Definition ast.h:2254
pm_ensure_node
EnsureNode.
Definition ast.h:2267
pm_ensure_node::statements
struct pm_statements_node * statements
EnsureNode::statements.
Definition ast.h:2275
pm_ensure_node::ensure_keyword_loc
pm_location_t ensure_keyword_loc
EnsureNode::ensure_keyword_loc.
Definition ast.h:2272
pm_ensure_node::end_keyword_loc
pm_location_t end_keyword_loc
EnsureNode::end_keyword_loc.
Definition ast.h:2278
pm_find_pattern_node
FindPatternNode.
Definition ast.h:2300
pm_find_pattern_node::left
struct pm_node * left
FindPatternNode::left.
Definition ast.h:2308
pm_find_pattern_node::constant
struct pm_node * constant
FindPatternNode::constant.
Definition ast.h:2305
pm_find_pattern_node::right
struct pm_node * right
FindPatternNode::right.
Definition ast.h:2314
pm_find_pattern_node::opening_loc
pm_location_t opening_loc
FindPatternNode::opening_loc.
Definition ast.h:2317
pm_find_pattern_node::requireds
struct pm_node_list requireds
FindPatternNode::requireds.
Definition ast.h:2311
pm_find_pattern_node::closing_loc
pm_location_t closing_loc
FindPatternNode::closing_loc.
Definition ast.h:2320
pm_flip_flop_node
FlipFlopNode.
Definition ast.h:2332
pm_flip_flop_node::operator_loc
pm_location_t operator_loc
FlipFlopNode::operator_loc.
Definition ast.h:2343
pm_flip_flop_node::left
struct pm_node * left
FlipFlopNode::left.
Definition ast.h:2337
pm_flip_flop_node::right
struct pm_node * right
FlipFlopNode::right.
Definition ast.h:2340
pm_for_node
ForNode.
Definition ast.h:2365
pm_for_node::statements
struct pm_statements_node * statements
ForNode::statements.
Definition ast.h:2376
pm_for_node::index
struct pm_node * index
ForNode::index.
Definition ast.h:2370
pm_for_node::collection
struct pm_node * collection
ForNode::collection.
Definition ast.h:2373
pm_for_node::end_keyword_loc
pm_location_t end_keyword_loc
ForNode::end_keyword_loc.
Definition ast.h:2388
pm_for_node::for_keyword_loc
pm_location_t for_keyword_loc
ForNode::for_keyword_loc.
Definition ast.h:2379
pm_for_node::do_keyword_loc
pm_location_t do_keyword_loc
ForNode::do_keyword_loc.
Definition ast.h:2385
pm_for_node::in_keyword_loc
pm_location_t in_keyword_loc
ForNode::in_keyword_loc.
Definition ast.h:2382
pm_forwarding_super_node
ForwardingSuperNode.
Definition ast.h:2422
pm_forwarding_super_node::block
struct pm_block_node * block
ForwardingSuperNode::block.
Definition ast.h:2427
pm_global_variable_and_write_node
GlobalVariableAndWriteNode.
Definition ast.h:2437
pm_global_variable_and_write_node::operator_loc
pm_location_t operator_loc
GlobalVariableAndWriteNode::operator_loc.
Definition ast.h:2448
pm_global_variable_and_write_node::name_loc
pm_location_t name_loc
GlobalVariableAndWriteNode::name_loc.
Definition ast.h:2445
pm_global_variable_and_write_node::value
struct pm_node * value
GlobalVariableAndWriteNode::value.
Definition ast.h:2451
pm_global_variable_and_write_node::name
pm_constant_id_t name
GlobalVariableAndWriteNode::name.
Definition ast.h:2442
pm_global_variable_operator_write_node
GlobalVariableOperatorWriteNode.
Definition ast.h:2461
pm_global_variable_operator_write_node::name
pm_constant_id_t name
GlobalVariableOperatorWriteNode::name.
Definition ast.h:2466
pm_global_variable_operator_write_node::operator
pm_constant_id_t operator
GlobalVariableOperatorWriteNode::operator.
Definition ast.h:2478
pm_global_variable_operator_write_node::operator_loc
pm_location_t operator_loc
GlobalVariableOperatorWriteNode::operator_loc.
Definition ast.h:2472
pm_global_variable_operator_write_node::value
struct pm_node * value
GlobalVariableOperatorWriteNode::value.
Definition ast.h:2475
pm_global_variable_operator_write_node::name_loc
pm_location_t name_loc
GlobalVariableOperatorWriteNode::name_loc.
Definition ast.h:2469
pm_global_variable_or_write_node
GlobalVariableOrWriteNode.
Definition ast.h:2488
pm_global_variable_or_write_node::name
pm_constant_id_t name
GlobalVariableOrWriteNode::name.
Definition ast.h:2493
pm_global_variable_or_write_node::name_loc
pm_location_t name_loc
GlobalVariableOrWriteNode::name_loc.
Definition ast.h:2496
pm_global_variable_or_write_node::operator_loc
pm_location_t operator_loc
GlobalVariableOrWriteNode::operator_loc.
Definition ast.h:2499
pm_global_variable_or_write_node::value
struct pm_node * value
GlobalVariableOrWriteNode::value.
Definition ast.h:2502
pm_global_variable_read_node
GlobalVariableReadNode.
Definition ast.h:2512
pm_global_variable_read_node::name
pm_constant_id_t name
GlobalVariableReadNode::name.
Definition ast.h:2517
pm_global_variable_target_node
GlobalVariableTargetNode.
Definition ast.h:2527
pm_global_variable_target_node::name
pm_constant_id_t name
GlobalVariableTargetNode::name.
Definition ast.h:2532
pm_global_variable_write_node
GlobalVariableWriteNode.
Definition ast.h:2542
pm_global_variable_write_node::value
struct pm_node * value
GlobalVariableWriteNode::value.
Definition ast.h:2553
pm_global_variable_write_node::name_loc
pm_location_t name_loc
GlobalVariableWriteNode::name_loc.
Definition ast.h:2550
pm_global_variable_write_node::operator_loc
pm_location_t operator_loc
GlobalVariableWriteNode::operator_loc.
Definition ast.h:2556
pm_global_variable_write_node::name
pm_constant_id_t name
GlobalVariableWriteNode::name.
Definition ast.h:2547
pm_hash_node
HashNode.
Definition ast.h:2566
pm_hash_node::elements
struct pm_node_list elements
HashNode::elements.
Definition ast.h:2574
pm_hash_node::closing_loc
pm_location_t closing_loc
HashNode::closing_loc.
Definition ast.h:2577
pm_hash_node::opening_loc
pm_location_t opening_loc
HashNode::opening_loc.
Definition ast.h:2571
pm_hash_pattern_node
HashPatternNode.
Definition ast.h:2587
pm_hash_pattern_node::elements
struct pm_node_list elements
HashPatternNode::elements.
Definition ast.h:2595
pm_hash_pattern_node::opening_loc
pm_location_t opening_loc
HashPatternNode::opening_loc.
Definition ast.h:2601
pm_hash_pattern_node::rest
struct pm_node * rest
HashPatternNode::rest.
Definition ast.h:2598
pm_hash_pattern_node::closing_loc
pm_location_t closing_loc
HashPatternNode::closing_loc.
Definition ast.h:2604
pm_hash_pattern_node::constant
struct pm_node * constant
HashPatternNode::constant.
Definition ast.h:2592
pm_if_node
IfNode.
Definition ast.h:2614
pm_if_node::consequent
struct pm_node * consequent
IfNode::consequent.
Definition ast.h:2631
pm_if_node::predicate
struct pm_node * predicate
IfNode::predicate.
Definition ast.h:2622
pm_if_node::end_keyword_loc
pm_location_t end_keyword_loc
IfNode::end_keyword_loc.
Definition ast.h:2634
pm_if_node::if_keyword_loc
pm_location_t if_keyword_loc
IfNode::if_keyword_loc.
Definition ast.h:2619
pm_if_node::statements
struct pm_statements_node * statements
IfNode::statements.
Definition ast.h:2628
pm_if_node::then_keyword_loc
pm_location_t then_keyword_loc
IfNode::then_keyword_loc.
Definition ast.h:2625
pm_imaginary_node
ImaginaryNode.
Definition ast.h:2644
pm_imaginary_node::numeric
struct pm_node * numeric
ImaginaryNode::numeric.
Definition ast.h:2649
pm_implicit_node
ImplicitNode.
Definition ast.h:2659
pm_implicit_node::value
struct pm_node * value
ImplicitNode::value.
Definition ast.h:2664
pm_in_node
InNode.
Definition ast.h:2686
pm_in_node::statements
struct pm_statements_node * statements
InNode::statements.
Definition ast.h:2694
pm_in_node::pattern
struct pm_node * pattern
InNode::pattern.
Definition ast.h:2691
pm_in_node::then_loc
pm_location_t then_loc
InNode::then_loc.
Definition ast.h:2700
pm_in_node::in_loc
pm_location_t in_loc
InNode::in_loc.
Definition ast.h:2697
pm_index_and_write_node
IndexAndWriteNode.
Definition ast.h:2714
pm_index_and_write_node::arguments
struct pm_arguments_node * arguments
IndexAndWriteNode::arguments.
Definition ast.h:2728
pm_index_and_write_node::receiver
struct pm_node * receiver
IndexAndWriteNode::receiver.
Definition ast.h:2719
pm_index_and_write_node::value
struct pm_node * value
IndexAndWriteNode::value.
Definition ast.h:2740
pm_index_and_write_node::operator_loc
pm_location_t operator_loc
IndexAndWriteNode::operator_loc.
Definition ast.h:2737
pm_index_and_write_node::block
struct pm_node * block
IndexAndWriteNode::block.
Definition ast.h:2734
pm_index_and_write_node::closing_loc
pm_location_t closing_loc
IndexAndWriteNode::closing_loc.
Definition ast.h:2731
pm_index_and_write_node::opening_loc
pm_location_t opening_loc
IndexAndWriteNode::opening_loc.
Definition ast.h:2725
pm_index_and_write_node::call_operator_loc
pm_location_t call_operator_loc
IndexAndWriteNode::call_operator_loc.
Definition ast.h:2722
pm_index_operator_write_node
IndexOperatorWriteNode.
Definition ast.h:2754
pm_index_operator_write_node::operator
pm_constant_id_t operator
IndexOperatorWriteNode::operator.
Definition ast.h:2777
pm_index_operator_write_node::value
struct pm_node * value
IndexOperatorWriteNode::value.
Definition ast.h:2783
pm_index_operator_write_node::opening_loc
pm_location_t opening_loc
IndexOperatorWriteNode::opening_loc.
Definition ast.h:2765
pm_index_operator_write_node::block
struct pm_node * block
IndexOperatorWriteNode::block.
Definition ast.h:2774
pm_index_operator_write_node::call_operator_loc
pm_location_t call_operator_loc
IndexOperatorWriteNode::call_operator_loc.
Definition ast.h:2762
pm_index_operator_write_node::operator_loc
pm_location_t operator_loc
IndexOperatorWriteNode::operator_loc.
Definition ast.h:2780
pm_index_operator_write_node::closing_loc
pm_location_t closing_loc
IndexOperatorWriteNode::closing_loc.
Definition ast.h:2771
pm_index_operator_write_node::arguments
struct pm_arguments_node * arguments
IndexOperatorWriteNode::arguments.
Definition ast.h:2768
pm_index_operator_write_node::receiver
struct pm_node * receiver
IndexOperatorWriteNode::receiver.
Definition ast.h:2759
pm_index_or_write_node
IndexOrWriteNode.
Definition ast.h:2797
pm_index_or_write_node::closing_loc
pm_location_t closing_loc
IndexOrWriteNode::closing_loc.
Definition ast.h:2814
pm_index_or_write_node::call_operator_loc
pm_location_t call_operator_loc
IndexOrWriteNode::call_operator_loc.
Definition ast.h:2805
pm_index_or_write_node::operator_loc
pm_location_t operator_loc
IndexOrWriteNode::operator_loc.
Definition ast.h:2820
pm_index_or_write_node::receiver
struct pm_node * receiver
IndexOrWriteNode::receiver.
Definition ast.h:2802
pm_index_or_write_node::opening_loc
pm_location_t opening_loc
IndexOrWriteNode::opening_loc.
Definition ast.h:2808
pm_index_or_write_node::value
struct pm_node * value
IndexOrWriteNode::value.
Definition ast.h:2823
pm_index_or_write_node::arguments
struct pm_arguments_node * arguments
IndexOrWriteNode::arguments.
Definition ast.h:2811
pm_index_or_write_node::block
struct pm_node * block
IndexOrWriteNode::block.
Definition ast.h:2817
pm_index_target_node
IndexTargetNode.
Definition ast.h:2837
pm_index_target_node::block
struct pm_node * block
IndexTargetNode::block.
Definition ast.h:2854
pm_index_target_node::receiver
struct pm_node * receiver
IndexTargetNode::receiver.
Definition ast.h:2842
pm_index_target_node::closing_loc
pm_location_t closing_loc
IndexTargetNode::closing_loc.
Definition ast.h:2851
pm_index_target_node::arguments
struct pm_arguments_node * arguments
IndexTargetNode::arguments.
Definition ast.h:2848
pm_index_target_node::opening_loc
pm_location_t opening_loc
IndexTargetNode::opening_loc.
Definition ast.h:2845
pm_instance_variable_and_write_node
InstanceVariableAndWriteNode.
Definition ast.h:2864
pm_instance_variable_and_write_node::operator_loc
pm_location_t operator_loc
InstanceVariableAndWriteNode::operator_loc.
Definition ast.h:2875
pm_instance_variable_and_write_node::name_loc
pm_location_t name_loc
InstanceVariableAndWriteNode::name_loc.
Definition ast.h:2872
pm_instance_variable_and_write_node::value
struct pm_node * value
InstanceVariableAndWriteNode::value.
Definition ast.h:2878
pm_instance_variable_and_write_node::name
pm_constant_id_t name
InstanceVariableAndWriteNode::name.
Definition ast.h:2869
pm_instance_variable_operator_write_node
InstanceVariableOperatorWriteNode.
Definition ast.h:2888
pm_instance_variable_operator_write_node::value
struct pm_node * value
InstanceVariableOperatorWriteNode::value.
Definition ast.h:2902
pm_instance_variable_operator_write_node::operator_loc
pm_location_t operator_loc
InstanceVariableOperatorWriteNode::operator_loc.
Definition ast.h:2899
pm_instance_variable_operator_write_node::name
pm_constant_id_t name
InstanceVariableOperatorWriteNode::name.
Definition ast.h:2893
pm_instance_variable_operator_write_node::name_loc
pm_location_t name_loc
InstanceVariableOperatorWriteNode::name_loc.
Definition ast.h:2896
pm_instance_variable_operator_write_node::operator
pm_constant_id_t operator
InstanceVariableOperatorWriteNode::operator.
Definition ast.h:2905
pm_instance_variable_or_write_node
InstanceVariableOrWriteNode.
Definition ast.h:2915
pm_instance_variable_or_write_node::operator_loc
pm_location_t operator_loc
InstanceVariableOrWriteNode::operator_loc.
Definition ast.h:2926
pm_instance_variable_or_write_node::value
struct pm_node * value
InstanceVariableOrWriteNode::value.
Definition ast.h:2929
pm_instance_variable_or_write_node::name_loc
pm_location_t name_loc
InstanceVariableOrWriteNode::name_loc.
Definition ast.h:2923
pm_instance_variable_or_write_node::name
pm_constant_id_t name
InstanceVariableOrWriteNode::name.
Definition ast.h:2920
pm_instance_variable_read_node
InstanceVariableReadNode.
Definition ast.h:2939
pm_instance_variable_read_node::name
pm_constant_id_t name
InstanceVariableReadNode::name.
Definition ast.h:2944
pm_instance_variable_target_node
InstanceVariableTargetNode.
Definition ast.h:2954
pm_instance_variable_target_node::name
pm_constant_id_t name
InstanceVariableTargetNode::name.
Definition ast.h:2959
pm_instance_variable_write_node
InstanceVariableWriteNode.
Definition ast.h:2969
pm_instance_variable_write_node::operator_loc
pm_location_t operator_loc
InstanceVariableWriteNode::operator_loc.
Definition ast.h:2983
pm_instance_variable_write_node::name
pm_constant_id_t name
InstanceVariableWriteNode::name.
Definition ast.h:2974
pm_instance_variable_write_node::value
struct pm_node * value
InstanceVariableWriteNode::value.
Definition ast.h:2980
pm_instance_variable_write_node::name_loc
pm_location_t name_loc
InstanceVariableWriteNode::name_loc.
Definition ast.h:2977
pm_interpolated_match_last_line_node
InterpolatedMatchLastLineNode.
Definition ast.h:3022
pm_interpolated_match_last_line_node::closing_loc
pm_location_t closing_loc
InterpolatedMatchLastLineNode::closing_loc.
Definition ast.h:3033
pm_interpolated_match_last_line_node::parts
struct pm_node_list parts
InterpolatedMatchLastLineNode::parts.
Definition ast.h:3030
pm_interpolated_match_last_line_node::opening_loc
pm_location_t opening_loc
InterpolatedMatchLastLineNode::opening_loc.
Definition ast.h:3027
pm_interpolated_regular_expression_node
InterpolatedRegularExpressionNode.
Definition ast.h:3055
pm_interpolated_regular_expression_node::opening_loc
pm_location_t opening_loc
InterpolatedRegularExpressionNode::opening_loc.
Definition ast.h:3060
pm_interpolated_regular_expression_node::parts
struct pm_node_list parts
InterpolatedRegularExpressionNode::parts.
Definition ast.h:3063
pm_interpolated_regular_expression_node::closing_loc
pm_location_t closing_loc
InterpolatedRegularExpressionNode::closing_loc.
Definition ast.h:3066
pm_interpolated_string_node
InterpolatedStringNode.
Definition ast.h:3076
pm_interpolated_string_node::closing_loc
pm_location_t closing_loc
InterpolatedStringNode::closing_loc.
Definition ast.h:3087
pm_interpolated_string_node::opening_loc
pm_location_t opening_loc
InterpolatedStringNode::opening_loc.
Definition ast.h:3081
pm_interpolated_string_node::parts
struct pm_node_list parts
InterpolatedStringNode::parts.
Definition ast.h:3084
pm_interpolated_symbol_node
InterpolatedSymbolNode.
Definition ast.h:3097
pm_interpolated_symbol_node::parts
struct pm_node_list parts
InterpolatedSymbolNode::parts.
Definition ast.h:3105
pm_interpolated_symbol_node::closing_loc
pm_location_t closing_loc
InterpolatedSymbolNode::closing_loc.
Definition ast.h:3108
pm_interpolated_symbol_node::opening_loc
pm_location_t opening_loc
InterpolatedSymbolNode::opening_loc.
Definition ast.h:3102
pm_interpolated_x_string_node
InterpolatedXStringNode.
Definition ast.h:3118
pm_interpolated_x_string_node::opening_loc
pm_location_t opening_loc
InterpolatedXStringNode::opening_loc.
Definition ast.h:3123
pm_interpolated_x_string_node::closing_loc
pm_location_t closing_loc
InterpolatedXStringNode::closing_loc.
Definition ast.h:3129
pm_interpolated_x_string_node::parts
struct pm_node_list parts
InterpolatedXStringNode::parts.
Definition ast.h:3126
pm_keyword_hash_node
KeywordHashNode.
Definition ast.h:3141
pm_keyword_hash_node::elements
struct pm_node_list elements
KeywordHashNode::elements.
Definition ast.h:3146
pm_keyword_rest_parameter_node
KeywordRestParameterNode.
Definition ast.h:3156
pm_keyword_rest_parameter_node::name
pm_constant_id_t name
KeywordRestParameterNode::name.
Definition ast.h:3161
pm_keyword_rest_parameter_node::operator_loc
pm_location_t operator_loc
KeywordRestParameterNode::operator_loc.
Definition ast.h:3167
pm_keyword_rest_parameter_node::name_loc
pm_location_t name_loc
KeywordRestParameterNode::name_loc.
Definition ast.h:3164
pm_lambda_node
LambdaNode.
Definition ast.h:3177
pm_lambda_node::closing_loc
pm_location_t closing_loc
LambdaNode::closing_loc.
Definition ast.h:3194
pm_lambda_node::body
struct pm_node * body
LambdaNode::body.
Definition ast.h:3200
pm_lambda_node::locals_body_index
uint32_t locals_body_index
LambdaNode::locals_body_index.
Definition ast.h:3185
pm_lambda_node::opening_loc
pm_location_t opening_loc
LambdaNode::opening_loc.
Definition ast.h:3191
pm_lambda_node::parameters
struct pm_node * parameters
LambdaNode::parameters.
Definition ast.h:3197
pm_lambda_node::operator_loc
pm_location_t operator_loc
LambdaNode::operator_loc.
Definition ast.h:3188
pm_lambda_node::locals
pm_constant_id_list_t locals
LambdaNode::locals.
Definition ast.h:3182
pm_local_variable_and_write_node
LocalVariableAndWriteNode.
Definition ast.h:3210
pm_local_variable_and_write_node::name
pm_constant_id_t name
LocalVariableAndWriteNode::name.
Definition ast.h:3224
pm_local_variable_and_write_node::depth
uint32_t depth
LocalVariableAndWriteNode::depth.
Definition ast.h:3227
pm_local_variable_and_write_node::operator_loc
pm_location_t operator_loc
LocalVariableAndWriteNode::operator_loc.
Definition ast.h:3218
pm_local_variable_and_write_node::value
struct pm_node * value
LocalVariableAndWriteNode::value.
Definition ast.h:3221
pm_local_variable_and_write_node::name_loc
pm_location_t name_loc
LocalVariableAndWriteNode::name_loc.
Definition ast.h:3215
pm_local_variable_operator_write_node
LocalVariableOperatorWriteNode.
Definition ast.h:3237
pm_local_variable_operator_write_node::depth
uint32_t depth
LocalVariableOperatorWriteNode::depth.
Definition ast.h:3257
pm_local_variable_operator_write_node::value
struct pm_node * value
LocalVariableOperatorWriteNode::value.
Definition ast.h:3248
pm_local_variable_operator_write_node::operator
pm_constant_id_t operator
LocalVariableOperatorWriteNode::operator.
Definition ast.h:3254
pm_local_variable_operator_write_node::name_loc
pm_location_t name_loc
LocalVariableOperatorWriteNode::name_loc.
Definition ast.h:3242
pm_local_variable_operator_write_node::operator_loc
pm_location_t operator_loc
LocalVariableOperatorWriteNode::operator_loc.
Definition ast.h:3245
pm_local_variable_operator_write_node::name
pm_constant_id_t name
LocalVariableOperatorWriteNode::name.
Definition ast.h:3251
pm_local_variable_or_write_node
LocalVariableOrWriteNode.
Definition ast.h:3267
pm_local_variable_or_write_node::depth
uint32_t depth
LocalVariableOrWriteNode::depth.
Definition ast.h:3284
pm_local_variable_or_write_node::operator_loc
pm_location_t operator_loc
LocalVariableOrWriteNode::operator_loc.
Definition ast.h:3275
pm_local_variable_or_write_node::value
struct pm_node * value
LocalVariableOrWriteNode::value.
Definition ast.h:3278
pm_local_variable_or_write_node::name
pm_constant_id_t name
LocalVariableOrWriteNode::name.
Definition ast.h:3281
pm_local_variable_or_write_node::name_loc
pm_location_t name_loc
LocalVariableOrWriteNode::name_loc.
Definition ast.h:3272
pm_local_variable_read_node
LocalVariableReadNode.
Definition ast.h:3294
pm_local_variable_read_node::depth
uint32_t depth
LocalVariableReadNode::depth.
Definition ast.h:3302
pm_local_variable_read_node::name
pm_constant_id_t name
LocalVariableReadNode::name.
Definition ast.h:3299
pm_local_variable_target_node
LocalVariableTargetNode.
Definition ast.h:3312
pm_local_variable_target_node::depth
uint32_t depth
LocalVariableTargetNode::depth.
Definition ast.h:3320
pm_local_variable_target_node::name
pm_constant_id_t name
LocalVariableTargetNode::name.
Definition ast.h:3317
pm_local_variable_write_node
LocalVariableWriteNode.
Definition ast.h:3330
pm_local_variable_write_node::operator_loc
pm_location_t operator_loc
LocalVariableWriteNode::operator_loc.
Definition ast.h:3347
pm_local_variable_write_node::name_loc
pm_location_t name_loc
LocalVariableWriteNode::name_loc.
Definition ast.h:3341
pm_local_variable_write_node::value
struct pm_node * value
LocalVariableWriteNode::value.
Definition ast.h:3344
pm_local_variable_write_node::depth
uint32_t depth
LocalVariableWriteNode::depth.
Definition ast.h:3338
pm_local_variable_write_node::name
pm_constant_id_t name
LocalVariableWriteNode::name.
Definition ast.h:3335
pm_location_t::start
const uint8_t * start
A pointer to the start location of the range in the source.
Definition ast.h:545
pm_location_t::end
const uint8_t * end
A pointer to the end location of the range in the source.
Definition ast.h:548
pm_match_last_line_node
MatchLastLineNode.
Definition ast.h:3369
pm_match_last_line_node::content_loc
pm_location_t content_loc
MatchLastLineNode::content_loc.
Definition ast.h:3377
pm_match_last_line_node::opening_loc
pm_location_t opening_loc
MatchLastLineNode::opening_loc.
Definition ast.h:3374
pm_match_last_line_node::closing_loc
pm_location_t closing_loc
MatchLastLineNode::closing_loc.
Definition ast.h:3380
pm_match_last_line_node::unescaped
pm_string_t unescaped
MatchLastLineNode::unescaped.
Definition ast.h:3383
pm_match_predicate_node
MatchPredicateNode.
Definition ast.h:3393
pm_match_predicate_node::operator_loc
pm_location_t operator_loc
MatchPredicateNode::operator_loc.
Definition ast.h:3404
pm_match_predicate_node::pattern
struct pm_node * pattern
MatchPredicateNode::pattern.
Definition ast.h:3401
pm_match_predicate_node::value
struct pm_node * value
MatchPredicateNode::value.
Definition ast.h:3398
pm_match_required_node
MatchRequiredNode.
Definition ast.h:3414
pm_match_required_node::operator_loc
pm_location_t operator_loc
MatchRequiredNode::operator_loc.
Definition ast.h:3425
pm_match_required_node::value
struct pm_node * value
MatchRequiredNode::value.
Definition ast.h:3419
pm_match_required_node::pattern
struct pm_node * pattern
MatchRequiredNode::pattern.
Definition ast.h:3422
pm_match_write_node
MatchWriteNode.
Definition ast.h:3435
pm_match_write_node::targets
struct pm_node_list targets
MatchWriteNode::targets.
Definition ast.h:3443
pm_match_write_node::call
struct pm_call_node * call
MatchWriteNode::call.
Definition ast.h:3440
pm_module_node
ModuleNode.
Definition ast.h:3465
pm_module_node::end_keyword_loc
pm_location_t end_keyword_loc
ModuleNode::end_keyword_loc.
Definition ast.h:3482
pm_module_node::constant_path
struct pm_node * constant_path
ModuleNode::constant_path.
Definition ast.h:3476
pm_module_node::body
struct pm_node * body
ModuleNode::body.
Definition ast.h:3479
pm_module_node::locals
pm_constant_id_list_t locals
ModuleNode::locals.
Definition ast.h:3470
pm_module_node::module_keyword_loc
pm_location_t module_keyword_loc
ModuleNode::module_keyword_loc.
Definition ast.h:3473
pm_module_node::name
pm_constant_id_t name
ModuleNode::name.
Definition ast.h:3485
pm_multi_target_node
MultiTargetNode.
Definition ast.h:3495
pm_multi_target_node::lparen_loc
pm_location_t lparen_loc
MultiTargetNode::lparen_loc.
Definition ast.h:3509
pm_multi_target_node::lefts
struct pm_node_list lefts
MultiTargetNode::lefts.
Definition ast.h:3500
pm_multi_target_node::rest
struct pm_node * rest
MultiTargetNode::rest.
Definition ast.h:3503
pm_multi_target_node::rparen_loc
pm_location_t rparen_loc
MultiTargetNode::rparen_loc.
Definition ast.h:3512
pm_multi_target_node::rights
struct pm_node_list rights
MultiTargetNode::rights.
Definition ast.h:3506
pm_multi_write_node
MultiWriteNode.
Definition ast.h:3522
pm_multi_write_node::rparen_loc
pm_location_t rparen_loc
MultiWriteNode::rparen_loc.
Definition ast.h:3539
pm_multi_write_node::value
struct pm_node * value
MultiWriteNode::value.
Definition ast.h:3545
pm_multi_write_node::rest
struct pm_node * rest
MultiWriteNode::rest.
Definition ast.h:3530
pm_multi_write_node::rights
struct pm_node_list rights
MultiWriteNode::rights.
Definition ast.h:3533
pm_multi_write_node::operator_loc
pm_location_t operator_loc
MultiWriteNode::operator_loc.
Definition ast.h:3542
pm_multi_write_node::lparen_loc
pm_location_t lparen_loc
MultiWriteNode::lparen_loc.
Definition ast.h:3536
pm_multi_write_node::lefts
struct pm_node_list lefts
MultiWriteNode::lefts.
Definition ast.h:3527
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
NextNode.
Definition ast.h:3555
pm_next_node::arguments
struct pm_arguments_node * arguments
NextNode::arguments.
Definition ast.h:3560
pm_next_node::keyword_loc
pm_location_t keyword_loc
NextNode::keyword_loc.
Definition ast.h:3563
pm_no_keywords_parameter_node
NoKeywordsParameterNode.
Definition ast.h:3585
pm_no_keywords_parameter_node::keyword_loc
pm_location_t keyword_loc
NoKeywordsParameterNode::keyword_loc.
Definition ast.h:3593
pm_no_keywords_parameter_node::operator_loc
pm_location_t operator_loc
NoKeywordsParameterNode::operator_loc.
Definition ast.h:3590
pm_node_list::size
size_t size
The number of nodes in the list.
Definition ast.h:558
pm_node_list::nodes
struct pm_node ** nodes
The nodes in the list.
Definition ast.h:564
pm_node_stack_node
Definition api_node.c:205
pm_node
This is the base structure that represents a node in the syntax tree.
Definition ast.h:1061
pm_node::flags
pm_node_flags_t flags
This represents any flags on the node.
Definition ast.h:1072
pm_node::location
pm_location_t location
This is the location of the node in the source.
Definition ast.h:1078
pm_numbered_parameters_node
NumberedParametersNode.
Definition ast.h:3603
pm_numbered_parameters_node::maximum
uint8_t maximum
NumberedParametersNode::maximum.
Definition ast.h:3608
pm_numbered_reference_read_node
NumberedReferenceReadNode.
Definition ast.h:3618
pm_numbered_reference_read_node::number
uint32_t number
NumberedReferenceReadNode::number.
Definition ast.h:3623
pm_optional_keyword_parameter_node
OptionalKeywordParameterNode.
Definition ast.h:3633
pm_optional_keyword_parameter_node::name
pm_constant_id_t name
OptionalKeywordParameterNode::name.
Definition ast.h:3638
pm_optional_keyword_parameter_node::value
struct pm_node * value
OptionalKeywordParameterNode::value.
Definition ast.h:3644
pm_optional_keyword_parameter_node::name_loc
pm_location_t name_loc
OptionalKeywordParameterNode::name_loc.
Definition ast.h:3641
pm_optional_parameter_node
OptionalParameterNode.
Definition ast.h:3654
pm_optional_parameter_node::name_loc
pm_location_t name_loc
OptionalParameterNode::name_loc.
Definition ast.h:3662
pm_optional_parameter_node::value
struct pm_node * value
OptionalParameterNode::value.
Definition ast.h:3668
pm_optional_parameter_node::name
pm_constant_id_t name
OptionalParameterNode::name.
Definition ast.h:3659
pm_optional_parameter_node::operator_loc
pm_location_t operator_loc
OptionalParameterNode::operator_loc.
Definition ast.h:3665
pm_or_node
OrNode.
Definition ast.h:3678
pm_or_node::left
struct pm_node * left
OrNode::left.
Definition ast.h:3683
pm_or_node::right
struct pm_node * right
OrNode::right.
Definition ast.h:3686
pm_or_node::operator_loc
pm_location_t operator_loc
OrNode::operator_loc.
Definition ast.h:3689
pm_parameters_node
ParametersNode.
Definition ast.h:3699
pm_parameters_node::rest
struct pm_node * rest
ParametersNode::rest.
Definition ast.h:3710
pm_parameters_node::requireds
struct pm_node_list requireds
ParametersNode::requireds.
Definition ast.h:3704
pm_parameters_node::block
struct pm_block_parameter_node * block
ParametersNode::block.
Definition ast.h:3722
pm_parameters_node::optionals
struct pm_node_list optionals
ParametersNode::optionals.
Definition ast.h:3707
pm_parameters_node::posts
struct pm_node_list posts
ParametersNode::posts.
Definition ast.h:3713
pm_parameters_node::keyword_rest
struct pm_node * keyword_rest
ParametersNode::keyword_rest.
Definition ast.h:3719
pm_parameters_node::keywords
struct pm_node_list keywords
ParametersNode::keywords.
Definition ast.h:3716
pm_parentheses_node
ParenthesesNode.
Definition ast.h:3732
pm_parentheses_node::body
struct pm_node * body
ParenthesesNode::body.
Definition ast.h:3737
pm_parentheses_node::closing_loc
pm_location_t closing_loc
ParenthesesNode::closing_loc.
Definition ast.h:3743
pm_parentheses_node::opening_loc
pm_location_t opening_loc
ParenthesesNode::opening_loc.
Definition ast.h:3740
pm_parser
This struct represents the overall parser.
Definition parser.h:489
pm_parser::end
const uint8_t * end
The pointer to the end of the source.
Definition parser.h:536
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:615
pm_parser::start
const uint8_t * start
The pointer to the start of the source.
Definition parser.h:533
pm_parser::start_line
int32_t start_line
The line number at the start of the parse.
Definition parser.h:638
pm_parser::newline_list
pm_newline_list_t newline_list
This is the list of newline offsets in the source file.
Definition parser.h:618
pm_pinned_expression_node
PinnedExpressionNode.
Definition ast.h:3753
pm_pinned_expression_node::rparen_loc
pm_location_t rparen_loc
PinnedExpressionNode::rparen_loc.
Definition ast.h:3767
pm_pinned_expression_node::expression
struct pm_node * expression
PinnedExpressionNode::expression.
Definition ast.h:3758
pm_pinned_expression_node::lparen_loc
pm_location_t lparen_loc
PinnedExpressionNode::lparen_loc.
Definition ast.h:3764
pm_pinned_expression_node::operator_loc
pm_location_t operator_loc
PinnedExpressionNode::operator_loc.
Definition ast.h:3761
pm_pinned_variable_node
PinnedVariableNode.
Definition ast.h:3777
pm_pinned_variable_node::variable
struct pm_node * variable
PinnedVariableNode::variable.
Definition ast.h:3782
pm_pinned_variable_node::operator_loc
pm_location_t operator_loc
PinnedVariableNode::operator_loc.
Definition ast.h:3785
pm_post_execution_node
PostExecutionNode.
Definition ast.h:3795
pm_post_execution_node::closing_loc
pm_location_t closing_loc
PostExecutionNode::closing_loc.
Definition ast.h:3809
pm_post_execution_node::statements
struct pm_statements_node * statements
PostExecutionNode::statements.
Definition ast.h:3800
pm_post_execution_node::opening_loc
pm_location_t opening_loc
PostExecutionNode::opening_loc.
Definition ast.h:3806
pm_post_execution_node::keyword_loc
pm_location_t keyword_loc
PostExecutionNode::keyword_loc.
Definition ast.h:3803
pm_pre_execution_node
PreExecutionNode.
Definition ast.h:3819
pm_pre_execution_node::statements
struct pm_statements_node * statements
PreExecutionNode::statements.
Definition ast.h:3824
pm_pre_execution_node::closing_loc
pm_location_t closing_loc
PreExecutionNode::closing_loc.
Definition ast.h:3833
pm_pre_execution_node::opening_loc
pm_location_t opening_loc
PreExecutionNode::opening_loc.
Definition ast.h:3830
pm_pre_execution_node::keyword_loc
pm_location_t keyword_loc
PreExecutionNode::keyword_loc.
Definition ast.h:3827
pm_program_node
ProgramNode.
Definition ast.h:3843
pm_program_node::statements
struct pm_statements_node * statements
ProgramNode::statements.
Definition ast.h:3851
pm_program_node::locals
pm_constant_id_list_t locals
ProgramNode::locals.
Definition ast.h:3848
pm_range_node
RangeNode.
Definition ast.h:3863
pm_range_node::right
struct pm_node * right
RangeNode::right.
Definition ast.h:3871
pm_range_node::operator_loc
pm_location_t operator_loc
RangeNode::operator_loc.
Definition ast.h:3874
pm_range_node::left
struct pm_node * left
RangeNode::left.
Definition ast.h:3868
pm_rational_node
RationalNode.
Definition ast.h:3884
pm_rational_node::numeric
struct pm_node * numeric
RationalNode::numeric.
Definition ast.h:3889
pm_regular_expression_node
RegularExpressionNode.
Definition ast.h:3923
pm_regular_expression_node::closing_loc
pm_location_t closing_loc
RegularExpressionNode::closing_loc.
Definition ast.h:3934
pm_regular_expression_node::unescaped
pm_string_t unescaped
RegularExpressionNode::unescaped.
Definition ast.h:3937
pm_regular_expression_node::opening_loc
pm_location_t opening_loc
RegularExpressionNode::opening_loc.
Definition ast.h:3928
pm_regular_expression_node::content_loc
pm_location_t content_loc
RegularExpressionNode::content_loc.
Definition ast.h:3931
pm_required_keyword_parameter_node
RequiredKeywordParameterNode.
Definition ast.h:3947
pm_required_keyword_parameter_node::name_loc
pm_location_t name_loc
RequiredKeywordParameterNode::name_loc.
Definition ast.h:3955
pm_required_keyword_parameter_node::name
pm_constant_id_t name
RequiredKeywordParameterNode::name.
Definition ast.h:3952
pm_required_parameter_node
RequiredParameterNode.
Definition ast.h:3965
pm_required_parameter_node::name
pm_constant_id_t name
RequiredParameterNode::name.
Definition ast.h:3970
pm_rescue_modifier_node
RescueModifierNode.
Definition ast.h:3980
pm_rescue_modifier_node::rescue_expression
struct pm_node * rescue_expression
RescueModifierNode::rescue_expression.
Definition ast.h:3991
pm_rescue_modifier_node::keyword_loc
pm_location_t keyword_loc
RescueModifierNode::keyword_loc.
Definition ast.h:3988
pm_rescue_modifier_node::expression
struct pm_node * expression
RescueModifierNode::expression.
Definition ast.h:3985
pm_rescue_node
RescueNode.
Definition ast.h:4001
pm_rescue_node::keyword_loc
pm_location_t keyword_loc
RescueNode::keyword_loc.
Definition ast.h:4006
pm_rescue_node::consequent
struct pm_rescue_node * consequent
RescueNode::consequent.
Definition ast.h:4021
pm_rescue_node::operator_loc
pm_location_t operator_loc
RescueNode::operator_loc.
Definition ast.h:4012
pm_rescue_node::reference
struct pm_node * reference
RescueNode::reference.
Definition ast.h:4015
pm_rescue_node::exceptions
struct pm_node_list exceptions
RescueNode::exceptions.
Definition ast.h:4009
pm_rescue_node::statements
struct pm_statements_node * statements
RescueNode::statements.
Definition ast.h:4018
pm_rest_parameter_node
RestParameterNode.
Definition ast.h:4031
pm_rest_parameter_node::name
pm_constant_id_t name
RestParameterNode::name.
Definition ast.h:4036
pm_rest_parameter_node::name_loc
pm_location_t name_loc
RestParameterNode::name_loc.
Definition ast.h:4039
pm_rest_parameter_node::operator_loc
pm_location_t operator_loc
RestParameterNode::operator_loc.
Definition ast.h:4042
pm_return_node
ReturnNode.
Definition ast.h:4064
pm_return_node::keyword_loc
pm_location_t keyword_loc
ReturnNode::keyword_loc.
Definition ast.h:4069
pm_return_node::arguments
struct pm_arguments_node * arguments
ReturnNode::arguments.
Definition ast.h:4072
pm_singleton_class_node
SingletonClassNode.
Definition ast.h:4094
pm_singleton_class_node::locals
pm_constant_id_list_t locals
SingletonClassNode::locals.
Definition ast.h:4099
pm_singleton_class_node::operator_loc
pm_location_t operator_loc
SingletonClassNode::operator_loc.
Definition ast.h:4105
pm_singleton_class_node::expression
struct pm_node * expression
SingletonClassNode::expression.
Definition ast.h:4108
pm_singleton_class_node::end_keyword_loc
pm_location_t end_keyword_loc
SingletonClassNode::end_keyword_loc.
Definition ast.h:4114
pm_singleton_class_node::class_keyword_loc
pm_location_t class_keyword_loc
SingletonClassNode::class_keyword_loc.
Definition ast.h:4102
pm_singleton_class_node::body
struct pm_node * body
SingletonClassNode::body.
Definition ast.h:4111
pm_source_file_node
SourceFileNode.
Definition ast.h:4136
pm_source_file_node::filepath
pm_string_t filepath
SourceFileNode::filepath.
Definition ast.h:4141
pm_splat_node
SplatNode.
Definition ast.h:4163
pm_splat_node::expression
struct pm_node * expression
SplatNode::expression.
Definition ast.h:4171
pm_splat_node::operator_loc
pm_location_t operator_loc
SplatNode::operator_loc.
Definition ast.h:4168
pm_statements_node
StatementsNode.
Definition ast.h:4181
pm_statements_node::body
struct pm_node_list body
StatementsNode::body.
Definition ast.h:4186
pm_string_node
StringNode.
Definition ast.h:4200
pm_string_node::unescaped
pm_string_t unescaped
StringNode::unescaped.
Definition ast.h:4214
pm_string_node::content_loc
pm_location_t content_loc
StringNode::content_loc.
Definition ast.h:4208
pm_string_node::closing_loc
pm_location_t closing_loc
StringNode::closing_loc.
Definition ast.h:4211
pm_string_node::opening_loc
pm_location_t opening_loc
StringNode::opening_loc.
Definition ast.h:4205
pm_string_t
A generic string type that can have various ownership semantics.
Definition pm_string.h:30
pm_super_node
SuperNode.
Definition ast.h:4224
pm_super_node::arguments
struct pm_arguments_node * arguments
SuperNode::arguments.
Definition ast.h:4235
pm_super_node::lparen_loc
pm_location_t lparen_loc
SuperNode::lparen_loc.
Definition ast.h:4232
pm_super_node::keyword_loc
pm_location_t keyword_loc
SuperNode::keyword_loc.
Definition ast.h:4229
pm_super_node::rparen_loc
pm_location_t rparen_loc
SuperNode::rparen_loc.
Definition ast.h:4238
pm_super_node::block
struct pm_node * block
SuperNode::block.
Definition ast.h:4241
pm_symbol_node
SymbolNode.
Definition ast.h:4255
pm_symbol_node::opening_loc
pm_location_t opening_loc
SymbolNode::opening_loc.
Definition ast.h:4260
pm_symbol_node::value_loc
pm_location_t value_loc
SymbolNode::value_loc.
Definition ast.h:4263
pm_symbol_node::closing_loc
pm_location_t closing_loc
SymbolNode::closing_loc.
Definition ast.h:4266
pm_symbol_node::unescaped
pm_string_t unescaped
SymbolNode::unescaped.
Definition ast.h:4269
pm_token_t
This struct represents a token in the Ruby source.
Definition ast.h:528
pm_undef_node
UndefNode.
Definition ast.h:4291
pm_undef_node::keyword_loc
pm_location_t keyword_loc
UndefNode::keyword_loc.
Definition ast.h:4299
pm_undef_node::names
struct pm_node_list names
UndefNode::names.
Definition ast.h:4296
pm_unless_node
UnlessNode.
Definition ast.h:4309
pm_unless_node::consequent
struct pm_else_node * consequent
UnlessNode::consequent.
Definition ast.h:4326
pm_unless_node::keyword_loc
pm_location_t keyword_loc
UnlessNode::keyword_loc.
Definition ast.h:4314
pm_unless_node::then_keyword_loc
pm_location_t then_keyword_loc
UnlessNode::then_keyword_loc.
Definition ast.h:4320
pm_unless_node::end_keyword_loc
pm_location_t end_keyword_loc
UnlessNode::end_keyword_loc.
Definition ast.h:4329
pm_unless_node::statements
struct pm_statements_node * statements
UnlessNode::statements.
Definition ast.h:4323
pm_unless_node::predicate
struct pm_node * predicate
UnlessNode::predicate.
Definition ast.h:4317
pm_until_node
UntilNode.
Definition ast.h:4341
pm_until_node::statements
struct pm_statements_node * statements
UntilNode::statements.
Definition ast.h:4355
pm_until_node::closing_loc
pm_location_t closing_loc
UntilNode::closing_loc.
Definition ast.h:4349
pm_until_node::predicate
struct pm_node * predicate
UntilNode::predicate.
Definition ast.h:4352
pm_until_node::keyword_loc
pm_location_t keyword_loc
UntilNode::keyword_loc.
Definition ast.h:4346
pm_when_node
WhenNode.
Definition ast.h:4365
pm_when_node::statements
struct pm_statements_node * statements
WhenNode::statements.
Definition ast.h:4376
pm_when_node::keyword_loc
pm_location_t keyword_loc
WhenNode::keyword_loc.
Definition ast.h:4370
pm_when_node::conditions
struct pm_node_list conditions
WhenNode::conditions.
Definition ast.h:4373
pm_while_node
WhileNode.
Definition ast.h:4388
pm_while_node::closing_loc
pm_location_t closing_loc
WhileNode::closing_loc.
Definition ast.h:4396
pm_while_node::keyword_loc
pm_location_t keyword_loc
WhileNode::keyword_loc.
Definition ast.h:4393
pm_while_node::statements
struct pm_statements_node * statements
WhileNode::statements.
Definition ast.h:4402
pm_while_node::predicate
struct pm_node * predicate
WhileNode::predicate.
Definition ast.h:4399
pm_x_string_node
XStringNode.
Definition ast.h:4415
pm_x_string_node::closing_loc
pm_location_t closing_loc
XStringNode::closing_loc.
Definition ast.h:4426
pm_x_string_node::opening_loc
pm_location_t opening_loc
XStringNode::opening_loc.
Definition ast.h:4420
pm_x_string_node::content_loc
pm_location_t content_loc
XStringNode::content_loc.
Definition ast.h:4423
pm_x_string_node::unescaped
pm_string_t unescaped
XStringNode::unescaped.
Definition ast.h:4429
pm_yield_node
YieldNode.
Definition ast.h:4439
pm_yield_node::keyword_loc
pm_location_t keyword_loc
YieldNode::keyword_loc.
Definition ast.h:4444
pm_yield_node::lparen_loc
pm_location_t lparen_loc
YieldNode::lparen_loc.
Definition ast.h:4447
pm_yield_node::rparen_loc
pm_location_t rparen_loc
YieldNode::rparen_loc.
Definition ast.h:4453
pm_yield_node::arguments
struct pm_arguments_node * arguments
YieldNode::arguments.
Definition ast.h:4450
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