prism 0.13.0

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