yarp 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. checksums.yaml +7 -0
  2. data/CODE_OF_CONDUCT.md +76 -0
  3. data/CONTRIBUTING.md +51 -0
  4. data/LICENSE.md +7 -0
  5. data/Makefile.in +79 -0
  6. data/README.md +86 -0
  7. data/config.h.in +25 -0
  8. data/config.yml +2147 -0
  9. data/configure +4487 -0
  10. data/docs/build_system.md +85 -0
  11. data/docs/building.md +26 -0
  12. data/docs/configuration.md +56 -0
  13. data/docs/design.md +53 -0
  14. data/docs/encoding.md +116 -0
  15. data/docs/extension.md +20 -0
  16. data/docs/fuzzing.md +93 -0
  17. data/docs/heredocs.md +36 -0
  18. data/docs/mapping.md +117 -0
  19. data/docs/ripper.md +36 -0
  20. data/docs/serialization.md +130 -0
  21. data/docs/testing.md +55 -0
  22. data/ext/yarp/api_node.c +3680 -0
  23. data/ext/yarp/api_pack.c +256 -0
  24. data/ext/yarp/extconf.rb +131 -0
  25. data/ext/yarp/extension.c +547 -0
  26. data/ext/yarp/extension.h +18 -0
  27. data/include/yarp/ast.h +1412 -0
  28. data/include/yarp/defines.h +54 -0
  29. data/include/yarp/diagnostic.h +24 -0
  30. data/include/yarp/enc/yp_encoding.h +94 -0
  31. data/include/yarp/node.h +36 -0
  32. data/include/yarp/pack.h +141 -0
  33. data/include/yarp/parser.h +389 -0
  34. data/include/yarp/regexp.h +19 -0
  35. data/include/yarp/unescape.h +42 -0
  36. data/include/yarp/util/yp_buffer.h +39 -0
  37. data/include/yarp/util/yp_char.h +75 -0
  38. data/include/yarp/util/yp_constant_pool.h +64 -0
  39. data/include/yarp/util/yp_list.h +67 -0
  40. data/include/yarp/util/yp_memchr.h +14 -0
  41. data/include/yarp/util/yp_newline_list.h +54 -0
  42. data/include/yarp/util/yp_state_stack.h +24 -0
  43. data/include/yarp/util/yp_string.h +57 -0
  44. data/include/yarp/util/yp_string_list.h +28 -0
  45. data/include/yarp/util/yp_strpbrk.h +29 -0
  46. data/include/yarp/version.h +5 -0
  47. data/include/yarp.h +69 -0
  48. data/lib/yarp/lex_compat.rb +759 -0
  49. data/lib/yarp/node.rb +7428 -0
  50. data/lib/yarp/pack.rb +185 -0
  51. data/lib/yarp/ripper_compat.rb +174 -0
  52. data/lib/yarp/serialize.rb +389 -0
  53. data/lib/yarp.rb +330 -0
  54. data/src/diagnostic.c +25 -0
  55. data/src/enc/yp_big5.c +79 -0
  56. data/src/enc/yp_euc_jp.c +85 -0
  57. data/src/enc/yp_gbk.c +88 -0
  58. data/src/enc/yp_shift_jis.c +83 -0
  59. data/src/enc/yp_tables.c +509 -0
  60. data/src/enc/yp_unicode.c +2320 -0
  61. data/src/enc/yp_windows_31j.c +83 -0
  62. data/src/node.c +2011 -0
  63. data/src/pack.c +493 -0
  64. data/src/prettyprint.c +1782 -0
  65. data/src/regexp.c +580 -0
  66. data/src/serialize.c +1576 -0
  67. data/src/token_type.c +347 -0
  68. data/src/unescape.c +576 -0
  69. data/src/util/yp_buffer.c +78 -0
  70. data/src/util/yp_char.c +229 -0
  71. data/src/util/yp_constant_pool.c +147 -0
  72. data/src/util/yp_list.c +50 -0
  73. data/src/util/yp_memchr.c +31 -0
  74. data/src/util/yp_newline_list.c +119 -0
  75. data/src/util/yp_state_stack.c +25 -0
  76. data/src/util/yp_string.c +207 -0
  77. data/src/util/yp_string_list.c +32 -0
  78. data/src/util/yp_strncasecmp.c +20 -0
  79. data/src/util/yp_strpbrk.c +66 -0
  80. data/src/yarp.c +13211 -0
  81. data/yarp.gemspec +100 -0
  82. metadata +125 -0
@@ -0,0 +1,3680 @@
1
+ /******************************************************************************/
2
+ /* This file is generated by the bin/template script and should not be */
3
+ /* modified manually. See */
4
+ /* templates/ext/yarp/api_node.c.erb */
5
+ /* if you are looking to modify the */
6
+ /* template */
7
+ /******************************************************************************/
8
+ #line 2 "api_node.c.erb"
9
+ #include "yarp/extension.h"
10
+
11
+ extern VALUE rb_cYARP;
12
+ extern VALUE rb_cYARPNode;
13
+ extern VALUE rb_cYARPSource;
14
+ extern VALUE rb_cYARPToken;
15
+ extern VALUE rb_cYARPLocation;
16
+
17
+ static VALUE rb_cYARPAliasNode;
18
+ static VALUE rb_cYARPAlternationPatternNode;
19
+ static VALUE rb_cYARPAndNode;
20
+ static VALUE rb_cYARPArgumentsNode;
21
+ static VALUE rb_cYARPArrayNode;
22
+ static VALUE rb_cYARPArrayPatternNode;
23
+ static VALUE rb_cYARPAssocNode;
24
+ static VALUE rb_cYARPAssocSplatNode;
25
+ static VALUE rb_cYARPBackReferenceReadNode;
26
+ static VALUE rb_cYARPBeginNode;
27
+ static VALUE rb_cYARPBlockArgumentNode;
28
+ static VALUE rb_cYARPBlockNode;
29
+ static VALUE rb_cYARPBlockParameterNode;
30
+ static VALUE rb_cYARPBlockParametersNode;
31
+ static VALUE rb_cYARPBreakNode;
32
+ static VALUE rb_cYARPCallNode;
33
+ static VALUE rb_cYARPCallOperatorAndWriteNode;
34
+ static VALUE rb_cYARPCallOperatorOrWriteNode;
35
+ static VALUE rb_cYARPCallOperatorWriteNode;
36
+ static VALUE rb_cYARPCapturePatternNode;
37
+ static VALUE rb_cYARPCaseNode;
38
+ static VALUE rb_cYARPClassNode;
39
+ static VALUE rb_cYARPClassVariableOperatorAndWriteNode;
40
+ static VALUE rb_cYARPClassVariableOperatorOrWriteNode;
41
+ static VALUE rb_cYARPClassVariableOperatorWriteNode;
42
+ static VALUE rb_cYARPClassVariableReadNode;
43
+ static VALUE rb_cYARPClassVariableWriteNode;
44
+ static VALUE rb_cYARPConstantOperatorAndWriteNode;
45
+ static VALUE rb_cYARPConstantOperatorOrWriteNode;
46
+ static VALUE rb_cYARPConstantOperatorWriteNode;
47
+ static VALUE rb_cYARPConstantPathNode;
48
+ static VALUE rb_cYARPConstantPathOperatorAndWriteNode;
49
+ static VALUE rb_cYARPConstantPathOperatorOrWriteNode;
50
+ static VALUE rb_cYARPConstantPathOperatorWriteNode;
51
+ static VALUE rb_cYARPConstantPathWriteNode;
52
+ static VALUE rb_cYARPConstantReadNode;
53
+ static VALUE rb_cYARPConstantWriteNode;
54
+ static VALUE rb_cYARPDefNode;
55
+ static VALUE rb_cYARPDefinedNode;
56
+ static VALUE rb_cYARPElseNode;
57
+ static VALUE rb_cYARPEmbeddedStatementsNode;
58
+ static VALUE rb_cYARPEmbeddedVariableNode;
59
+ static VALUE rb_cYARPEnsureNode;
60
+ static VALUE rb_cYARPFalseNode;
61
+ static VALUE rb_cYARPFindPatternNode;
62
+ static VALUE rb_cYARPFloatNode;
63
+ static VALUE rb_cYARPForNode;
64
+ static VALUE rb_cYARPForwardingArgumentsNode;
65
+ static VALUE rb_cYARPForwardingParameterNode;
66
+ static VALUE rb_cYARPForwardingSuperNode;
67
+ static VALUE rb_cYARPGlobalVariableOperatorAndWriteNode;
68
+ static VALUE rb_cYARPGlobalVariableOperatorOrWriteNode;
69
+ static VALUE rb_cYARPGlobalVariableOperatorWriteNode;
70
+ static VALUE rb_cYARPGlobalVariableReadNode;
71
+ static VALUE rb_cYARPGlobalVariableWriteNode;
72
+ static VALUE rb_cYARPHashNode;
73
+ static VALUE rb_cYARPHashPatternNode;
74
+ static VALUE rb_cYARPIfNode;
75
+ static VALUE rb_cYARPImaginaryNode;
76
+ static VALUE rb_cYARPInNode;
77
+ static VALUE rb_cYARPInstanceVariableOperatorAndWriteNode;
78
+ static VALUE rb_cYARPInstanceVariableOperatorOrWriteNode;
79
+ static VALUE rb_cYARPInstanceVariableOperatorWriteNode;
80
+ static VALUE rb_cYARPInstanceVariableReadNode;
81
+ static VALUE rb_cYARPInstanceVariableWriteNode;
82
+ static VALUE rb_cYARPIntegerNode;
83
+ static VALUE rb_cYARPInterpolatedRegularExpressionNode;
84
+ static VALUE rb_cYARPInterpolatedStringNode;
85
+ static VALUE rb_cYARPInterpolatedSymbolNode;
86
+ static VALUE rb_cYARPInterpolatedXStringNode;
87
+ static VALUE rb_cYARPKeywordHashNode;
88
+ static VALUE rb_cYARPKeywordParameterNode;
89
+ static VALUE rb_cYARPKeywordRestParameterNode;
90
+ static VALUE rb_cYARPLambdaNode;
91
+ static VALUE rb_cYARPLocalVariableOperatorAndWriteNode;
92
+ static VALUE rb_cYARPLocalVariableOperatorOrWriteNode;
93
+ static VALUE rb_cYARPLocalVariableOperatorWriteNode;
94
+ static VALUE rb_cYARPLocalVariableReadNode;
95
+ static VALUE rb_cYARPLocalVariableWriteNode;
96
+ static VALUE rb_cYARPMatchPredicateNode;
97
+ static VALUE rb_cYARPMatchRequiredNode;
98
+ static VALUE rb_cYARPMissingNode;
99
+ static VALUE rb_cYARPModuleNode;
100
+ static VALUE rb_cYARPMultiWriteNode;
101
+ static VALUE rb_cYARPNextNode;
102
+ static VALUE rb_cYARPNilNode;
103
+ static VALUE rb_cYARPNoKeywordsParameterNode;
104
+ static VALUE rb_cYARPNumberedReferenceReadNode;
105
+ static VALUE rb_cYARPOptionalParameterNode;
106
+ static VALUE rb_cYARPOrNode;
107
+ static VALUE rb_cYARPParametersNode;
108
+ static VALUE rb_cYARPParenthesesNode;
109
+ static VALUE rb_cYARPPinnedExpressionNode;
110
+ static VALUE rb_cYARPPinnedVariableNode;
111
+ static VALUE rb_cYARPPostExecutionNode;
112
+ static VALUE rb_cYARPPreExecutionNode;
113
+ static VALUE rb_cYARPProgramNode;
114
+ static VALUE rb_cYARPRangeNode;
115
+ static VALUE rb_cYARPRationalNode;
116
+ static VALUE rb_cYARPRedoNode;
117
+ static VALUE rb_cYARPRegularExpressionNode;
118
+ static VALUE rb_cYARPRequiredDestructuredParameterNode;
119
+ static VALUE rb_cYARPRequiredParameterNode;
120
+ static VALUE rb_cYARPRescueModifierNode;
121
+ static VALUE rb_cYARPRescueNode;
122
+ static VALUE rb_cYARPRestParameterNode;
123
+ static VALUE rb_cYARPRetryNode;
124
+ static VALUE rb_cYARPReturnNode;
125
+ static VALUE rb_cYARPSelfNode;
126
+ static VALUE rb_cYARPSingletonClassNode;
127
+ static VALUE rb_cYARPSourceEncodingNode;
128
+ static VALUE rb_cYARPSourceFileNode;
129
+ static VALUE rb_cYARPSourceLineNode;
130
+ static VALUE rb_cYARPSplatNode;
131
+ static VALUE rb_cYARPStatementsNode;
132
+ static VALUE rb_cYARPStringConcatNode;
133
+ static VALUE rb_cYARPStringNode;
134
+ static VALUE rb_cYARPSuperNode;
135
+ static VALUE rb_cYARPSymbolNode;
136
+ static VALUE rb_cYARPTrueNode;
137
+ static VALUE rb_cYARPUndefNode;
138
+ static VALUE rb_cYARPUnlessNode;
139
+ static VALUE rb_cYARPUntilNode;
140
+ static VALUE rb_cYARPWhenNode;
141
+ static VALUE rb_cYARPWhileNode;
142
+ static VALUE rb_cYARPXStringNode;
143
+ static VALUE rb_cYARPYieldNode;
144
+
145
+ static VALUE
146
+ yp_location_new(yp_parser_t *parser, const char *start, const char *end, VALUE source) {
147
+ VALUE argv[] = { source, LONG2FIX(start - parser->start), LONG2FIX(end - start) };
148
+ return rb_class_new_instance(3, argv, rb_cYARPLocation);
149
+ }
150
+
151
+ VALUE
152
+ yp_token_new(yp_parser_t *parser, yp_token_t *token, rb_encoding *encoding, VALUE source) {
153
+ ID type = rb_intern(yp_token_type_to_str(token->type));
154
+ VALUE location = yp_location_new(parser, token->start, token->end, source);
155
+
156
+ VALUE argv[] = {
157
+ ID2SYM(type),
158
+ rb_enc_str_new(token->start, token->end - token->start, encoding),
159
+ location
160
+ };
161
+
162
+ return rb_class_new_instance(3, argv, rb_cYARPToken);
163
+ }
164
+
165
+ static VALUE
166
+ yp_string_new(yp_string_t *string, rb_encoding *encoding) {
167
+ return rb_enc_str_new(yp_string_source(string), yp_string_length(string), encoding);
168
+ }
169
+
170
+ // Create a YARP::Source object from the given parser.
171
+ VALUE
172
+ yp_source_new(yp_parser_t *parser) {
173
+ VALUE source = rb_str_new(parser->start, parser->end - parser->start);
174
+ VALUE offsets = rb_ary_new_capa(parser->newline_list.size);
175
+
176
+ for (size_t index = 0; index < parser->newline_list.size; index++) {
177
+ rb_ary_push(offsets, INT2FIX(parser->newline_list.offsets[index]));
178
+ }
179
+
180
+ VALUE source_argv[] = { source, offsets };
181
+ return rb_class_new_instance(2, source_argv, rb_cYARPSource);
182
+ }
183
+
184
+ typedef struct yp_node_stack_node {
185
+ struct yp_node_stack_node *prev;
186
+ yp_node_t *visit;
187
+ bool visited;
188
+ } yp_node_stack_node_t;
189
+
190
+ static void
191
+ yp_node_stack_push(yp_node_stack_node_t **stack, yp_node_t *visit) {
192
+ yp_node_stack_node_t *node = malloc(sizeof(yp_node_stack_node_t));
193
+ node->prev = *stack;
194
+ node->visit = visit;
195
+ node->visited = false;
196
+ *stack = node;
197
+ }
198
+
199
+ static yp_node_t *
200
+ yp_node_stack_pop(yp_node_stack_node_t **stack) {
201
+ yp_node_stack_node_t *current = *stack;
202
+ yp_node_t *visit = current->visit;
203
+
204
+ *stack = current->prev;
205
+ free(current);
206
+
207
+ return visit;
208
+ }
209
+
210
+ VALUE
211
+ yp_ast_new(yp_parser_t *parser, yp_node_t *node, rb_encoding *encoding) {
212
+ VALUE source = yp_source_new(parser);
213
+ ID *constants = calloc(parser->constant_pool.size, sizeof(ID));
214
+
215
+ for (size_t index = 0; index < parser->constant_pool.capacity; index++) {
216
+ yp_constant_t constant = parser->constant_pool.constants[index];
217
+
218
+ if (constant.id != 0) {
219
+ constants[constant.id - 1] = rb_intern3(constant.start, constant.length, encoding);
220
+ }
221
+ }
222
+
223
+ yp_node_stack_node_t *node_stack = NULL;
224
+ yp_node_stack_push(&node_stack, node);
225
+ VALUE value_stack = rb_ary_new();
226
+
227
+ while (node_stack != NULL) {
228
+ if (!node_stack->visited) {
229
+ if (node_stack->visit == NULL) {
230
+ yp_node_stack_pop(&node_stack);
231
+ rb_ary_push(value_stack, Qnil);
232
+ continue;
233
+ }
234
+
235
+ yp_node_t *node = node_stack->visit;
236
+ node_stack->visited = true;
237
+
238
+ switch (YP_NODE_TYPE(node)) {
239
+ #line 111 "api_node.c.erb"
240
+ case YP_NODE_ALIAS_NODE: {
241
+ yp_alias_node_t *cast = (yp_alias_node_t *) node;
242
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->new_name);
243
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->old_name);
244
+ break;
245
+ }
246
+ #line 111 "api_node.c.erb"
247
+ case YP_NODE_ALTERNATION_PATTERN_NODE: {
248
+ yp_alternation_pattern_node_t *cast = (yp_alternation_pattern_node_t *) node;
249
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->left);
250
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->right);
251
+ break;
252
+ }
253
+ #line 111 "api_node.c.erb"
254
+ case YP_NODE_AND_NODE: {
255
+ yp_and_node_t *cast = (yp_and_node_t *) node;
256
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->left);
257
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->right);
258
+ break;
259
+ }
260
+ #line 111 "api_node.c.erb"
261
+ case YP_NODE_ARGUMENTS_NODE: {
262
+ yp_arguments_node_t *cast = (yp_arguments_node_t *) node;
263
+ for (size_t index = 0; index < cast->arguments.size; index++) {
264
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->arguments.nodes[index]);
265
+ }
266
+ break;
267
+ }
268
+ #line 111 "api_node.c.erb"
269
+ case YP_NODE_ARRAY_NODE: {
270
+ yp_array_node_t *cast = (yp_array_node_t *) node;
271
+ for (size_t index = 0; index < cast->elements.size; index++) {
272
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->elements.nodes[index]);
273
+ }
274
+ break;
275
+ }
276
+ #line 111 "api_node.c.erb"
277
+ case YP_NODE_ARRAY_PATTERN_NODE: {
278
+ yp_array_pattern_node_t *cast = (yp_array_pattern_node_t *) node;
279
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->constant);
280
+ for (size_t index = 0; index < cast->requireds.size; index++) {
281
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->requireds.nodes[index]);
282
+ }
283
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->rest);
284
+ for (size_t index = 0; index < cast->posts.size; index++) {
285
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->posts.nodes[index]);
286
+ }
287
+ break;
288
+ }
289
+ #line 111 "api_node.c.erb"
290
+ case YP_NODE_ASSOC_NODE: {
291
+ yp_assoc_node_t *cast = (yp_assoc_node_t *) node;
292
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->key);
293
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
294
+ break;
295
+ }
296
+ #line 111 "api_node.c.erb"
297
+ case YP_NODE_ASSOC_SPLAT_NODE: {
298
+ yp_assoc_splat_node_t *cast = (yp_assoc_splat_node_t *) node;
299
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
300
+ break;
301
+ }
302
+ #line 111 "api_node.c.erb"
303
+ case YP_NODE_BEGIN_NODE: {
304
+ yp_begin_node_t *cast = (yp_begin_node_t *) node;
305
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
306
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->rescue_clause);
307
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->else_clause);
308
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->ensure_clause);
309
+ break;
310
+ }
311
+ #line 111 "api_node.c.erb"
312
+ case YP_NODE_BLOCK_ARGUMENT_NODE: {
313
+ yp_block_argument_node_t *cast = (yp_block_argument_node_t *) node;
314
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->expression);
315
+ break;
316
+ }
317
+ #line 111 "api_node.c.erb"
318
+ case YP_NODE_BLOCK_NODE: {
319
+ yp_block_node_t *cast = (yp_block_node_t *) node;
320
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->parameters);
321
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
322
+ break;
323
+ }
324
+ #line 111 "api_node.c.erb"
325
+ case YP_NODE_BLOCK_PARAMETERS_NODE: {
326
+ yp_block_parameters_node_t *cast = (yp_block_parameters_node_t *) node;
327
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->parameters);
328
+ break;
329
+ }
330
+ #line 111 "api_node.c.erb"
331
+ case YP_NODE_BREAK_NODE: {
332
+ yp_break_node_t *cast = (yp_break_node_t *) node;
333
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->arguments);
334
+ break;
335
+ }
336
+ #line 111 "api_node.c.erb"
337
+ case YP_NODE_CALL_NODE: {
338
+ yp_call_node_t *cast = (yp_call_node_t *) node;
339
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->receiver);
340
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->arguments);
341
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->block);
342
+ break;
343
+ }
344
+ #line 111 "api_node.c.erb"
345
+ case YP_NODE_CALL_OPERATOR_AND_WRITE_NODE: {
346
+ yp_call_operator_and_write_node_t *cast = (yp_call_operator_and_write_node_t *) node;
347
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->target);
348
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
349
+ break;
350
+ }
351
+ #line 111 "api_node.c.erb"
352
+ case YP_NODE_CALL_OPERATOR_OR_WRITE_NODE: {
353
+ yp_call_operator_or_write_node_t *cast = (yp_call_operator_or_write_node_t *) node;
354
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->target);
355
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
356
+ break;
357
+ }
358
+ #line 111 "api_node.c.erb"
359
+ case YP_NODE_CALL_OPERATOR_WRITE_NODE: {
360
+ yp_call_operator_write_node_t *cast = (yp_call_operator_write_node_t *) node;
361
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->target);
362
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
363
+ break;
364
+ }
365
+ #line 111 "api_node.c.erb"
366
+ case YP_NODE_CAPTURE_PATTERN_NODE: {
367
+ yp_capture_pattern_node_t *cast = (yp_capture_pattern_node_t *) node;
368
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
369
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->target);
370
+ break;
371
+ }
372
+ #line 111 "api_node.c.erb"
373
+ case YP_NODE_CASE_NODE: {
374
+ yp_case_node_t *cast = (yp_case_node_t *) node;
375
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->predicate);
376
+ for (size_t index = 0; index < cast->conditions.size; index++) {
377
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->conditions.nodes[index]);
378
+ }
379
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->consequent);
380
+ break;
381
+ }
382
+ #line 111 "api_node.c.erb"
383
+ case YP_NODE_CLASS_NODE: {
384
+ yp_class_node_t *cast = (yp_class_node_t *) node;
385
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->constant_path);
386
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->superclass);
387
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
388
+ break;
389
+ }
390
+ #line 111 "api_node.c.erb"
391
+ case YP_NODE_CLASS_VARIABLE_OPERATOR_AND_WRITE_NODE: {
392
+ yp_class_variable_operator_and_write_node_t *cast = (yp_class_variable_operator_and_write_node_t *) node;
393
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
394
+ break;
395
+ }
396
+ #line 111 "api_node.c.erb"
397
+ case YP_NODE_CLASS_VARIABLE_OPERATOR_OR_WRITE_NODE: {
398
+ yp_class_variable_operator_or_write_node_t *cast = (yp_class_variable_operator_or_write_node_t *) node;
399
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
400
+ break;
401
+ }
402
+ #line 111 "api_node.c.erb"
403
+ case YP_NODE_CLASS_VARIABLE_OPERATOR_WRITE_NODE: {
404
+ yp_class_variable_operator_write_node_t *cast = (yp_class_variable_operator_write_node_t *) node;
405
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
406
+ break;
407
+ }
408
+ #line 111 "api_node.c.erb"
409
+ case YP_NODE_CLASS_VARIABLE_WRITE_NODE: {
410
+ yp_class_variable_write_node_t *cast = (yp_class_variable_write_node_t *) node;
411
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
412
+ break;
413
+ }
414
+ #line 111 "api_node.c.erb"
415
+ case YP_NODE_CONSTANT_OPERATOR_AND_WRITE_NODE: {
416
+ yp_constant_operator_and_write_node_t *cast = (yp_constant_operator_and_write_node_t *) node;
417
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
418
+ break;
419
+ }
420
+ #line 111 "api_node.c.erb"
421
+ case YP_NODE_CONSTANT_OPERATOR_OR_WRITE_NODE: {
422
+ yp_constant_operator_or_write_node_t *cast = (yp_constant_operator_or_write_node_t *) node;
423
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
424
+ break;
425
+ }
426
+ #line 111 "api_node.c.erb"
427
+ case YP_NODE_CONSTANT_OPERATOR_WRITE_NODE: {
428
+ yp_constant_operator_write_node_t *cast = (yp_constant_operator_write_node_t *) node;
429
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
430
+ break;
431
+ }
432
+ #line 111 "api_node.c.erb"
433
+ case YP_NODE_CONSTANT_PATH_NODE: {
434
+ yp_constant_path_node_t *cast = (yp_constant_path_node_t *) node;
435
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->parent);
436
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->child);
437
+ break;
438
+ }
439
+ #line 111 "api_node.c.erb"
440
+ case YP_NODE_CONSTANT_PATH_OPERATOR_AND_WRITE_NODE: {
441
+ yp_constant_path_operator_and_write_node_t *cast = (yp_constant_path_operator_and_write_node_t *) node;
442
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->target);
443
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
444
+ break;
445
+ }
446
+ #line 111 "api_node.c.erb"
447
+ case YP_NODE_CONSTANT_PATH_OPERATOR_OR_WRITE_NODE: {
448
+ yp_constant_path_operator_or_write_node_t *cast = (yp_constant_path_operator_or_write_node_t *) node;
449
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->target);
450
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
451
+ break;
452
+ }
453
+ #line 111 "api_node.c.erb"
454
+ case YP_NODE_CONSTANT_PATH_OPERATOR_WRITE_NODE: {
455
+ yp_constant_path_operator_write_node_t *cast = (yp_constant_path_operator_write_node_t *) node;
456
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->target);
457
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
458
+ break;
459
+ }
460
+ #line 111 "api_node.c.erb"
461
+ case YP_NODE_CONSTANT_PATH_WRITE_NODE: {
462
+ yp_constant_path_write_node_t *cast = (yp_constant_path_write_node_t *) node;
463
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->target);
464
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
465
+ break;
466
+ }
467
+ #line 111 "api_node.c.erb"
468
+ case YP_NODE_CONSTANT_WRITE_NODE: {
469
+ yp_constant_write_node_t *cast = (yp_constant_write_node_t *) node;
470
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
471
+ break;
472
+ }
473
+ #line 111 "api_node.c.erb"
474
+ case YP_NODE_DEF_NODE: {
475
+ yp_def_node_t *cast = (yp_def_node_t *) node;
476
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->receiver);
477
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->parameters);
478
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
479
+ break;
480
+ }
481
+ #line 111 "api_node.c.erb"
482
+ case YP_NODE_DEFINED_NODE: {
483
+ yp_defined_node_t *cast = (yp_defined_node_t *) node;
484
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
485
+ break;
486
+ }
487
+ #line 111 "api_node.c.erb"
488
+ case YP_NODE_ELSE_NODE: {
489
+ yp_else_node_t *cast = (yp_else_node_t *) node;
490
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
491
+ break;
492
+ }
493
+ #line 111 "api_node.c.erb"
494
+ case YP_NODE_EMBEDDED_STATEMENTS_NODE: {
495
+ yp_embedded_statements_node_t *cast = (yp_embedded_statements_node_t *) node;
496
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
497
+ break;
498
+ }
499
+ #line 111 "api_node.c.erb"
500
+ case YP_NODE_EMBEDDED_VARIABLE_NODE: {
501
+ yp_embedded_variable_node_t *cast = (yp_embedded_variable_node_t *) node;
502
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->variable);
503
+ break;
504
+ }
505
+ #line 111 "api_node.c.erb"
506
+ case YP_NODE_ENSURE_NODE: {
507
+ yp_ensure_node_t *cast = (yp_ensure_node_t *) node;
508
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
509
+ break;
510
+ }
511
+ #line 111 "api_node.c.erb"
512
+ case YP_NODE_FIND_PATTERN_NODE: {
513
+ yp_find_pattern_node_t *cast = (yp_find_pattern_node_t *) node;
514
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->constant);
515
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->left);
516
+ for (size_t index = 0; index < cast->requireds.size; index++) {
517
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->requireds.nodes[index]);
518
+ }
519
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->right);
520
+ break;
521
+ }
522
+ #line 111 "api_node.c.erb"
523
+ case YP_NODE_FOR_NODE: {
524
+ yp_for_node_t *cast = (yp_for_node_t *) node;
525
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->index);
526
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->collection);
527
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
528
+ break;
529
+ }
530
+ #line 111 "api_node.c.erb"
531
+ case YP_NODE_FORWARDING_SUPER_NODE: {
532
+ yp_forwarding_super_node_t *cast = (yp_forwarding_super_node_t *) node;
533
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->block);
534
+ break;
535
+ }
536
+ #line 111 "api_node.c.erb"
537
+ case YP_NODE_GLOBAL_VARIABLE_OPERATOR_AND_WRITE_NODE: {
538
+ yp_global_variable_operator_and_write_node_t *cast = (yp_global_variable_operator_and_write_node_t *) node;
539
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
540
+ break;
541
+ }
542
+ #line 111 "api_node.c.erb"
543
+ case YP_NODE_GLOBAL_VARIABLE_OPERATOR_OR_WRITE_NODE: {
544
+ yp_global_variable_operator_or_write_node_t *cast = (yp_global_variable_operator_or_write_node_t *) node;
545
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
546
+ break;
547
+ }
548
+ #line 111 "api_node.c.erb"
549
+ case YP_NODE_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: {
550
+ yp_global_variable_operator_write_node_t *cast = (yp_global_variable_operator_write_node_t *) node;
551
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
552
+ break;
553
+ }
554
+ #line 111 "api_node.c.erb"
555
+ case YP_NODE_GLOBAL_VARIABLE_WRITE_NODE: {
556
+ yp_global_variable_write_node_t *cast = (yp_global_variable_write_node_t *) node;
557
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
558
+ break;
559
+ }
560
+ #line 111 "api_node.c.erb"
561
+ case YP_NODE_HASH_NODE: {
562
+ yp_hash_node_t *cast = (yp_hash_node_t *) node;
563
+ for (size_t index = 0; index < cast->elements.size; index++) {
564
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->elements.nodes[index]);
565
+ }
566
+ break;
567
+ }
568
+ #line 111 "api_node.c.erb"
569
+ case YP_NODE_HASH_PATTERN_NODE: {
570
+ yp_hash_pattern_node_t *cast = (yp_hash_pattern_node_t *) node;
571
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->constant);
572
+ for (size_t index = 0; index < cast->assocs.size; index++) {
573
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->assocs.nodes[index]);
574
+ }
575
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->kwrest);
576
+ break;
577
+ }
578
+ #line 111 "api_node.c.erb"
579
+ case YP_NODE_IF_NODE: {
580
+ yp_if_node_t *cast = (yp_if_node_t *) node;
581
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->predicate);
582
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
583
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->consequent);
584
+ break;
585
+ }
586
+ #line 111 "api_node.c.erb"
587
+ case YP_NODE_IMAGINARY_NODE: {
588
+ yp_imaginary_node_t *cast = (yp_imaginary_node_t *) node;
589
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->numeric);
590
+ break;
591
+ }
592
+ #line 111 "api_node.c.erb"
593
+ case YP_NODE_IN_NODE: {
594
+ yp_in_node_t *cast = (yp_in_node_t *) node;
595
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->pattern);
596
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
597
+ break;
598
+ }
599
+ #line 111 "api_node.c.erb"
600
+ case YP_NODE_INSTANCE_VARIABLE_OPERATOR_AND_WRITE_NODE: {
601
+ yp_instance_variable_operator_and_write_node_t *cast = (yp_instance_variable_operator_and_write_node_t *) node;
602
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
603
+ break;
604
+ }
605
+ #line 111 "api_node.c.erb"
606
+ case YP_NODE_INSTANCE_VARIABLE_OPERATOR_OR_WRITE_NODE: {
607
+ yp_instance_variable_operator_or_write_node_t *cast = (yp_instance_variable_operator_or_write_node_t *) node;
608
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
609
+ break;
610
+ }
611
+ #line 111 "api_node.c.erb"
612
+ case YP_NODE_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: {
613
+ yp_instance_variable_operator_write_node_t *cast = (yp_instance_variable_operator_write_node_t *) node;
614
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
615
+ break;
616
+ }
617
+ #line 111 "api_node.c.erb"
618
+ case YP_NODE_INSTANCE_VARIABLE_WRITE_NODE: {
619
+ yp_instance_variable_write_node_t *cast = (yp_instance_variable_write_node_t *) node;
620
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
621
+ break;
622
+ }
623
+ #line 111 "api_node.c.erb"
624
+ case YP_NODE_INTERPOLATED_REGULAR_EXPRESSION_NODE: {
625
+ yp_interpolated_regular_expression_node_t *cast = (yp_interpolated_regular_expression_node_t *) node;
626
+ for (size_t index = 0; index < cast->parts.size; index++) {
627
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->parts.nodes[index]);
628
+ }
629
+ break;
630
+ }
631
+ #line 111 "api_node.c.erb"
632
+ case YP_NODE_INTERPOLATED_STRING_NODE: {
633
+ yp_interpolated_string_node_t *cast = (yp_interpolated_string_node_t *) node;
634
+ for (size_t index = 0; index < cast->parts.size; index++) {
635
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->parts.nodes[index]);
636
+ }
637
+ break;
638
+ }
639
+ #line 111 "api_node.c.erb"
640
+ case YP_NODE_INTERPOLATED_SYMBOL_NODE: {
641
+ yp_interpolated_symbol_node_t *cast = (yp_interpolated_symbol_node_t *) node;
642
+ for (size_t index = 0; index < cast->parts.size; index++) {
643
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->parts.nodes[index]);
644
+ }
645
+ break;
646
+ }
647
+ #line 111 "api_node.c.erb"
648
+ case YP_NODE_INTERPOLATED_X_STRING_NODE: {
649
+ yp_interpolated_x_string_node_t *cast = (yp_interpolated_x_string_node_t *) node;
650
+ for (size_t index = 0; index < cast->parts.size; index++) {
651
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->parts.nodes[index]);
652
+ }
653
+ break;
654
+ }
655
+ #line 111 "api_node.c.erb"
656
+ case YP_NODE_KEYWORD_HASH_NODE: {
657
+ yp_keyword_hash_node_t *cast = (yp_keyword_hash_node_t *) node;
658
+ for (size_t index = 0; index < cast->elements.size; index++) {
659
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->elements.nodes[index]);
660
+ }
661
+ break;
662
+ }
663
+ #line 111 "api_node.c.erb"
664
+ case YP_NODE_KEYWORD_PARAMETER_NODE: {
665
+ yp_keyword_parameter_node_t *cast = (yp_keyword_parameter_node_t *) node;
666
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
667
+ break;
668
+ }
669
+ #line 111 "api_node.c.erb"
670
+ case YP_NODE_LAMBDA_NODE: {
671
+ yp_lambda_node_t *cast = (yp_lambda_node_t *) node;
672
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->parameters);
673
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
674
+ break;
675
+ }
676
+ #line 111 "api_node.c.erb"
677
+ case YP_NODE_LOCAL_VARIABLE_OPERATOR_AND_WRITE_NODE: {
678
+ yp_local_variable_operator_and_write_node_t *cast = (yp_local_variable_operator_and_write_node_t *) node;
679
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
680
+ break;
681
+ }
682
+ #line 111 "api_node.c.erb"
683
+ case YP_NODE_LOCAL_VARIABLE_OPERATOR_OR_WRITE_NODE: {
684
+ yp_local_variable_operator_or_write_node_t *cast = (yp_local_variable_operator_or_write_node_t *) node;
685
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
686
+ break;
687
+ }
688
+ #line 111 "api_node.c.erb"
689
+ case YP_NODE_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: {
690
+ yp_local_variable_operator_write_node_t *cast = (yp_local_variable_operator_write_node_t *) node;
691
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
692
+ break;
693
+ }
694
+ #line 111 "api_node.c.erb"
695
+ case YP_NODE_LOCAL_VARIABLE_WRITE_NODE: {
696
+ yp_local_variable_write_node_t *cast = (yp_local_variable_write_node_t *) node;
697
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
698
+ break;
699
+ }
700
+ #line 111 "api_node.c.erb"
701
+ case YP_NODE_MATCH_PREDICATE_NODE: {
702
+ yp_match_predicate_node_t *cast = (yp_match_predicate_node_t *) node;
703
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
704
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->pattern);
705
+ break;
706
+ }
707
+ #line 111 "api_node.c.erb"
708
+ case YP_NODE_MATCH_REQUIRED_NODE: {
709
+ yp_match_required_node_t *cast = (yp_match_required_node_t *) node;
710
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
711
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->pattern);
712
+ break;
713
+ }
714
+ #line 111 "api_node.c.erb"
715
+ case YP_NODE_MODULE_NODE: {
716
+ yp_module_node_t *cast = (yp_module_node_t *) node;
717
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->constant_path);
718
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
719
+ break;
720
+ }
721
+ #line 111 "api_node.c.erb"
722
+ case YP_NODE_MULTI_WRITE_NODE: {
723
+ yp_multi_write_node_t *cast = (yp_multi_write_node_t *) node;
724
+ for (size_t index = 0; index < cast->targets.size; index++) {
725
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->targets.nodes[index]);
726
+ }
727
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
728
+ break;
729
+ }
730
+ #line 111 "api_node.c.erb"
731
+ case YP_NODE_NEXT_NODE: {
732
+ yp_next_node_t *cast = (yp_next_node_t *) node;
733
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->arguments);
734
+ break;
735
+ }
736
+ #line 111 "api_node.c.erb"
737
+ case YP_NODE_OPTIONAL_PARAMETER_NODE: {
738
+ yp_optional_parameter_node_t *cast = (yp_optional_parameter_node_t *) node;
739
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->value);
740
+ break;
741
+ }
742
+ #line 111 "api_node.c.erb"
743
+ case YP_NODE_OR_NODE: {
744
+ yp_or_node_t *cast = (yp_or_node_t *) node;
745
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->left);
746
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->right);
747
+ break;
748
+ }
749
+ #line 111 "api_node.c.erb"
750
+ case YP_NODE_PARAMETERS_NODE: {
751
+ yp_parameters_node_t *cast = (yp_parameters_node_t *) node;
752
+ for (size_t index = 0; index < cast->requireds.size; index++) {
753
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->requireds.nodes[index]);
754
+ }
755
+ for (size_t index = 0; index < cast->optionals.size; index++) {
756
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->optionals.nodes[index]);
757
+ }
758
+ for (size_t index = 0; index < cast->posts.size; index++) {
759
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->posts.nodes[index]);
760
+ }
761
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->rest);
762
+ for (size_t index = 0; index < cast->keywords.size; index++) {
763
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->keywords.nodes[index]);
764
+ }
765
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->keyword_rest);
766
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->block);
767
+ break;
768
+ }
769
+ #line 111 "api_node.c.erb"
770
+ case YP_NODE_PARENTHESES_NODE: {
771
+ yp_parentheses_node_t *cast = (yp_parentheses_node_t *) node;
772
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
773
+ break;
774
+ }
775
+ #line 111 "api_node.c.erb"
776
+ case YP_NODE_PINNED_EXPRESSION_NODE: {
777
+ yp_pinned_expression_node_t *cast = (yp_pinned_expression_node_t *) node;
778
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->expression);
779
+ break;
780
+ }
781
+ #line 111 "api_node.c.erb"
782
+ case YP_NODE_PINNED_VARIABLE_NODE: {
783
+ yp_pinned_variable_node_t *cast = (yp_pinned_variable_node_t *) node;
784
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->variable);
785
+ break;
786
+ }
787
+ #line 111 "api_node.c.erb"
788
+ case YP_NODE_POST_EXECUTION_NODE: {
789
+ yp_post_execution_node_t *cast = (yp_post_execution_node_t *) node;
790
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
791
+ break;
792
+ }
793
+ #line 111 "api_node.c.erb"
794
+ case YP_NODE_PRE_EXECUTION_NODE: {
795
+ yp_pre_execution_node_t *cast = (yp_pre_execution_node_t *) node;
796
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
797
+ break;
798
+ }
799
+ #line 111 "api_node.c.erb"
800
+ case YP_NODE_PROGRAM_NODE: {
801
+ yp_program_node_t *cast = (yp_program_node_t *) node;
802
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
803
+ break;
804
+ }
805
+ #line 111 "api_node.c.erb"
806
+ case YP_NODE_RANGE_NODE: {
807
+ yp_range_node_t *cast = (yp_range_node_t *) node;
808
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->left);
809
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->right);
810
+ break;
811
+ }
812
+ #line 111 "api_node.c.erb"
813
+ case YP_NODE_RATIONAL_NODE: {
814
+ yp_rational_node_t *cast = (yp_rational_node_t *) node;
815
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->numeric);
816
+ break;
817
+ }
818
+ #line 111 "api_node.c.erb"
819
+ case YP_NODE_REQUIRED_DESTRUCTURED_PARAMETER_NODE: {
820
+ yp_required_destructured_parameter_node_t *cast = (yp_required_destructured_parameter_node_t *) node;
821
+ for (size_t index = 0; index < cast->parameters.size; index++) {
822
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->parameters.nodes[index]);
823
+ }
824
+ break;
825
+ }
826
+ #line 111 "api_node.c.erb"
827
+ case YP_NODE_RESCUE_MODIFIER_NODE: {
828
+ yp_rescue_modifier_node_t *cast = (yp_rescue_modifier_node_t *) node;
829
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->expression);
830
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->rescue_expression);
831
+ break;
832
+ }
833
+ #line 111 "api_node.c.erb"
834
+ case YP_NODE_RESCUE_NODE: {
835
+ yp_rescue_node_t *cast = (yp_rescue_node_t *) node;
836
+ for (size_t index = 0; index < cast->exceptions.size; index++) {
837
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->exceptions.nodes[index]);
838
+ }
839
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->reference);
840
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
841
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->consequent);
842
+ break;
843
+ }
844
+ #line 111 "api_node.c.erb"
845
+ case YP_NODE_RETURN_NODE: {
846
+ yp_return_node_t *cast = (yp_return_node_t *) node;
847
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->arguments);
848
+ break;
849
+ }
850
+ #line 111 "api_node.c.erb"
851
+ case YP_NODE_SINGLETON_CLASS_NODE: {
852
+ yp_singleton_class_node_t *cast = (yp_singleton_class_node_t *) node;
853
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->expression);
854
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
855
+ break;
856
+ }
857
+ #line 111 "api_node.c.erb"
858
+ case YP_NODE_SPLAT_NODE: {
859
+ yp_splat_node_t *cast = (yp_splat_node_t *) node;
860
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->expression);
861
+ break;
862
+ }
863
+ #line 111 "api_node.c.erb"
864
+ case YP_NODE_STATEMENTS_NODE: {
865
+ yp_statements_node_t *cast = (yp_statements_node_t *) node;
866
+ for (size_t index = 0; index < cast->body.size; index++) {
867
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->body.nodes[index]);
868
+ }
869
+ break;
870
+ }
871
+ #line 111 "api_node.c.erb"
872
+ case YP_NODE_STRING_CONCAT_NODE: {
873
+ yp_string_concat_node_t *cast = (yp_string_concat_node_t *) node;
874
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->left);
875
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->right);
876
+ break;
877
+ }
878
+ #line 111 "api_node.c.erb"
879
+ case YP_NODE_SUPER_NODE: {
880
+ yp_super_node_t *cast = (yp_super_node_t *) node;
881
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->arguments);
882
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->block);
883
+ break;
884
+ }
885
+ #line 111 "api_node.c.erb"
886
+ case YP_NODE_UNDEF_NODE: {
887
+ yp_undef_node_t *cast = (yp_undef_node_t *) node;
888
+ for (size_t index = 0; index < cast->names.size; index++) {
889
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->names.nodes[index]);
890
+ }
891
+ break;
892
+ }
893
+ #line 111 "api_node.c.erb"
894
+ case YP_NODE_UNLESS_NODE: {
895
+ yp_unless_node_t *cast = (yp_unless_node_t *) node;
896
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->predicate);
897
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
898
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->consequent);
899
+ break;
900
+ }
901
+ #line 111 "api_node.c.erb"
902
+ case YP_NODE_UNTIL_NODE: {
903
+ yp_until_node_t *cast = (yp_until_node_t *) node;
904
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->predicate);
905
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
906
+ break;
907
+ }
908
+ #line 111 "api_node.c.erb"
909
+ case YP_NODE_WHEN_NODE: {
910
+ yp_when_node_t *cast = (yp_when_node_t *) node;
911
+ for (size_t index = 0; index < cast->conditions.size; index++) {
912
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->conditions.nodes[index]);
913
+ }
914
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
915
+ break;
916
+ }
917
+ #line 111 "api_node.c.erb"
918
+ case YP_NODE_WHILE_NODE: {
919
+ yp_while_node_t *cast = (yp_while_node_t *) node;
920
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->predicate);
921
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->statements);
922
+ break;
923
+ }
924
+ #line 111 "api_node.c.erb"
925
+ case YP_NODE_YIELD_NODE: {
926
+ yp_yield_node_t *cast = (yp_yield_node_t *) node;
927
+ yp_node_stack_push(&node_stack, (yp_node_t *) cast->arguments);
928
+ break;
929
+ }
930
+ default:
931
+ break;
932
+ }
933
+ #line 131 "api_node.c.erb"
934
+ } else {
935
+ yp_node_t *node = yp_node_stack_pop(&node_stack);
936
+
937
+ switch (YP_NODE_TYPE(node)) {
938
+ #line 137 "api_node.c.erb"
939
+ case YP_NODE_ALIAS_NODE: {
940
+ yp_alias_node_t *cast = (yp_alias_node_t *) node;
941
+ VALUE argv[4];
942
+
943
+ // new_name
944
+ argv[0] = rb_ary_pop(value_stack);
945
+
946
+ // old_name
947
+ argv[1] = rb_ary_pop(value_stack);
948
+
949
+ // keyword_loc
950
+ argv[2] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
951
+
952
+ // location
953
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
954
+
955
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPAliasNode));
956
+ break;
957
+ }
958
+ #line 137 "api_node.c.erb"
959
+ case YP_NODE_ALTERNATION_PATTERN_NODE: {
960
+ yp_alternation_pattern_node_t *cast = (yp_alternation_pattern_node_t *) node;
961
+ VALUE argv[4];
962
+
963
+ // left
964
+ argv[0] = rb_ary_pop(value_stack);
965
+
966
+ // right
967
+ argv[1] = rb_ary_pop(value_stack);
968
+
969
+ // operator_loc
970
+ argv[2] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
971
+
972
+ // location
973
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
974
+
975
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPAlternationPatternNode));
976
+ break;
977
+ }
978
+ #line 137 "api_node.c.erb"
979
+ case YP_NODE_AND_NODE: {
980
+ yp_and_node_t *cast = (yp_and_node_t *) node;
981
+ VALUE argv[4];
982
+
983
+ // left
984
+ argv[0] = rb_ary_pop(value_stack);
985
+
986
+ // right
987
+ argv[1] = rb_ary_pop(value_stack);
988
+
989
+ // operator_loc
990
+ argv[2] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
991
+
992
+ // location
993
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
994
+
995
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPAndNode));
996
+ break;
997
+ }
998
+ #line 137 "api_node.c.erb"
999
+ case YP_NODE_ARGUMENTS_NODE: {
1000
+ yp_arguments_node_t *cast = (yp_arguments_node_t *) node;
1001
+ VALUE argv[2];
1002
+
1003
+ // arguments
1004
+ argv[0] = rb_ary_new();
1005
+ for (size_t index = 0; index < cast->arguments.size; index++) {
1006
+ rb_ary_push(argv[0], rb_ary_pop(value_stack));
1007
+ }
1008
+
1009
+ // location
1010
+ argv[1] = yp_location_new(parser, node->location.start, node->location.end, source);
1011
+
1012
+ rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cYARPArgumentsNode));
1013
+ break;
1014
+ }
1015
+ #line 137 "api_node.c.erb"
1016
+ case YP_NODE_ARRAY_NODE: {
1017
+ yp_array_node_t *cast = (yp_array_node_t *) node;
1018
+ VALUE argv[4];
1019
+
1020
+ // elements
1021
+ argv[0] = rb_ary_new();
1022
+ for (size_t index = 0; index < cast->elements.size; index++) {
1023
+ rb_ary_push(argv[0], rb_ary_pop(value_stack));
1024
+ }
1025
+
1026
+ // opening_loc
1027
+ argv[1] = cast->opening_loc.start == NULL ? Qnil : yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
1028
+
1029
+ // closing_loc
1030
+ argv[2] = cast->closing_loc.start == NULL ? Qnil : yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
1031
+
1032
+ // location
1033
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1034
+
1035
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPArrayNode));
1036
+ break;
1037
+ }
1038
+ #line 137 "api_node.c.erb"
1039
+ case YP_NODE_ARRAY_PATTERN_NODE: {
1040
+ yp_array_pattern_node_t *cast = (yp_array_pattern_node_t *) node;
1041
+ VALUE argv[7];
1042
+
1043
+ // constant
1044
+ argv[0] = rb_ary_pop(value_stack);
1045
+
1046
+ // requireds
1047
+ argv[1] = rb_ary_new();
1048
+ for (size_t index = 0; index < cast->requireds.size; index++) {
1049
+ rb_ary_push(argv[1], rb_ary_pop(value_stack));
1050
+ }
1051
+
1052
+ // rest
1053
+ argv[2] = rb_ary_pop(value_stack);
1054
+
1055
+ // posts
1056
+ argv[3] = rb_ary_new();
1057
+ for (size_t index = 0; index < cast->posts.size; index++) {
1058
+ rb_ary_push(argv[3], rb_ary_pop(value_stack));
1059
+ }
1060
+
1061
+ // opening_loc
1062
+ argv[4] = cast->opening_loc.start == NULL ? Qnil : yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
1063
+
1064
+ // closing_loc
1065
+ argv[5] = cast->closing_loc.start == NULL ? Qnil : yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
1066
+
1067
+ // location
1068
+ argv[6] = yp_location_new(parser, node->location.start, node->location.end, source);
1069
+
1070
+ rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cYARPArrayPatternNode));
1071
+ break;
1072
+ }
1073
+ #line 137 "api_node.c.erb"
1074
+ case YP_NODE_ASSOC_NODE: {
1075
+ yp_assoc_node_t *cast = (yp_assoc_node_t *) node;
1076
+ VALUE argv[4];
1077
+
1078
+ // key
1079
+ argv[0] = rb_ary_pop(value_stack);
1080
+
1081
+ // value
1082
+ argv[1] = rb_ary_pop(value_stack);
1083
+
1084
+ // operator_loc
1085
+ argv[2] = cast->operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1086
+
1087
+ // location
1088
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1089
+
1090
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPAssocNode));
1091
+ break;
1092
+ }
1093
+ #line 137 "api_node.c.erb"
1094
+ case YP_NODE_ASSOC_SPLAT_NODE: {
1095
+ yp_assoc_splat_node_t *cast = (yp_assoc_splat_node_t *) node;
1096
+ VALUE argv[3];
1097
+
1098
+ // value
1099
+ argv[0] = rb_ary_pop(value_stack);
1100
+
1101
+ // operator_loc
1102
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1103
+
1104
+ // location
1105
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
1106
+
1107
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPAssocSplatNode));
1108
+ break;
1109
+ }
1110
+ #line 137 "api_node.c.erb"
1111
+ case YP_NODE_BACK_REFERENCE_READ_NODE: {
1112
+ VALUE argv[1];
1113
+
1114
+ // location
1115
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
1116
+
1117
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPBackReferenceReadNode));
1118
+ break;
1119
+ }
1120
+ #line 137 "api_node.c.erb"
1121
+ case YP_NODE_BEGIN_NODE: {
1122
+ yp_begin_node_t *cast = (yp_begin_node_t *) node;
1123
+ VALUE argv[7];
1124
+
1125
+ // begin_keyword_loc
1126
+ argv[0] = cast->begin_keyword_loc.start == NULL ? Qnil : yp_location_new(parser, cast->begin_keyword_loc.start, cast->begin_keyword_loc.end, source);
1127
+
1128
+ // statements
1129
+ argv[1] = rb_ary_pop(value_stack);
1130
+
1131
+ // rescue_clause
1132
+ argv[2] = rb_ary_pop(value_stack);
1133
+
1134
+ // else_clause
1135
+ argv[3] = rb_ary_pop(value_stack);
1136
+
1137
+ // ensure_clause
1138
+ argv[4] = rb_ary_pop(value_stack);
1139
+
1140
+ // end_keyword_loc
1141
+ argv[5] = cast->end_keyword_loc.start == NULL ? Qnil : yp_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
1142
+
1143
+ // location
1144
+ argv[6] = yp_location_new(parser, node->location.start, node->location.end, source);
1145
+
1146
+ rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cYARPBeginNode));
1147
+ break;
1148
+ }
1149
+ #line 137 "api_node.c.erb"
1150
+ case YP_NODE_BLOCK_ARGUMENT_NODE: {
1151
+ yp_block_argument_node_t *cast = (yp_block_argument_node_t *) node;
1152
+ VALUE argv[3];
1153
+
1154
+ // expression
1155
+ argv[0] = rb_ary_pop(value_stack);
1156
+
1157
+ // operator_loc
1158
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1159
+
1160
+ // location
1161
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
1162
+
1163
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPBlockArgumentNode));
1164
+ break;
1165
+ }
1166
+ #line 137 "api_node.c.erb"
1167
+ case YP_NODE_BLOCK_NODE: {
1168
+ yp_block_node_t *cast = (yp_block_node_t *) node;
1169
+ VALUE argv[6];
1170
+
1171
+ // locals
1172
+ argv[0] = rb_ary_new();
1173
+ for (size_t index = 0; index < cast->locals.size; index++) {
1174
+ rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
1175
+ }
1176
+
1177
+ // parameters
1178
+ argv[1] = rb_ary_pop(value_stack);
1179
+
1180
+ // statements
1181
+ argv[2] = rb_ary_pop(value_stack);
1182
+
1183
+ // opening_loc
1184
+ argv[3] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
1185
+
1186
+ // closing_loc
1187
+ argv[4] = yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
1188
+
1189
+ // location
1190
+ argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
1191
+
1192
+ rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPBlockNode));
1193
+ break;
1194
+ }
1195
+ #line 137 "api_node.c.erb"
1196
+ case YP_NODE_BLOCK_PARAMETER_NODE: {
1197
+ yp_block_parameter_node_t *cast = (yp_block_parameter_node_t *) node;
1198
+ VALUE argv[3];
1199
+
1200
+ // name_loc
1201
+ argv[0] = cast->name_loc.start == NULL ? Qnil : yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
1202
+
1203
+ // operator_loc
1204
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1205
+
1206
+ // location
1207
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
1208
+
1209
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPBlockParameterNode));
1210
+ break;
1211
+ }
1212
+ #line 137 "api_node.c.erb"
1213
+ case YP_NODE_BLOCK_PARAMETERS_NODE: {
1214
+ yp_block_parameters_node_t *cast = (yp_block_parameters_node_t *) node;
1215
+ VALUE argv[5];
1216
+
1217
+ // parameters
1218
+ argv[0] = rb_ary_pop(value_stack);
1219
+
1220
+ // locals
1221
+ argv[1] = rb_ary_new();
1222
+ for (size_t index = 0; index < cast->locals.size; index++) {
1223
+ yp_location_t location = cast->locals.locations[index];
1224
+ rb_ary_push(argv[1], yp_location_new(parser, location.start, location.end, source));
1225
+ }
1226
+
1227
+ // opening_loc
1228
+ argv[2] = cast->opening_loc.start == NULL ? Qnil : yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
1229
+
1230
+ // closing_loc
1231
+ argv[3] = cast->closing_loc.start == NULL ? Qnil : yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
1232
+
1233
+ // location
1234
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
1235
+
1236
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPBlockParametersNode));
1237
+ break;
1238
+ }
1239
+ #line 137 "api_node.c.erb"
1240
+ case YP_NODE_BREAK_NODE: {
1241
+ yp_break_node_t *cast = (yp_break_node_t *) node;
1242
+ VALUE argv[3];
1243
+
1244
+ // arguments
1245
+ argv[0] = rb_ary_pop(value_stack);
1246
+
1247
+ // keyword_loc
1248
+ argv[1] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
1249
+
1250
+ // location
1251
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
1252
+
1253
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPBreakNode));
1254
+ break;
1255
+ }
1256
+ #line 137 "api_node.c.erb"
1257
+ case YP_NODE_CALL_NODE: {
1258
+ yp_call_node_t *cast = (yp_call_node_t *) node;
1259
+ VALUE argv[10];
1260
+
1261
+ // receiver
1262
+ argv[0] = rb_ary_pop(value_stack);
1263
+
1264
+ // operator_loc
1265
+ argv[1] = cast->operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1266
+
1267
+ // message_loc
1268
+ argv[2] = cast->message_loc.start == NULL ? Qnil : yp_location_new(parser, cast->message_loc.start, cast->message_loc.end, source);
1269
+
1270
+ // opening_loc
1271
+ argv[3] = cast->opening_loc.start == NULL ? Qnil : yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
1272
+
1273
+ // arguments
1274
+ argv[4] = rb_ary_pop(value_stack);
1275
+
1276
+ // closing_loc
1277
+ argv[5] = cast->closing_loc.start == NULL ? Qnil : yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
1278
+
1279
+ // block
1280
+ argv[6] = rb_ary_pop(value_stack);
1281
+
1282
+ // flags
1283
+ argv[7] = ULONG2NUM(cast->flags);
1284
+
1285
+ // name
1286
+ argv[8] = yp_string_new(&cast->name, encoding);
1287
+
1288
+ // location
1289
+ argv[9] = yp_location_new(parser, node->location.start, node->location.end, source);
1290
+
1291
+ rb_ary_push(value_stack, rb_class_new_instance(10, argv, rb_cYARPCallNode));
1292
+ break;
1293
+ }
1294
+ #line 137 "api_node.c.erb"
1295
+ case YP_NODE_CALL_OPERATOR_AND_WRITE_NODE: {
1296
+ yp_call_operator_and_write_node_t *cast = (yp_call_operator_and_write_node_t *) node;
1297
+ VALUE argv[4];
1298
+
1299
+ // target
1300
+ argv[0] = rb_ary_pop(value_stack);
1301
+
1302
+ // operator_loc
1303
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1304
+
1305
+ // value
1306
+ argv[2] = rb_ary_pop(value_stack);
1307
+
1308
+ // location
1309
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1310
+
1311
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPCallOperatorAndWriteNode));
1312
+ break;
1313
+ }
1314
+ #line 137 "api_node.c.erb"
1315
+ case YP_NODE_CALL_OPERATOR_OR_WRITE_NODE: {
1316
+ yp_call_operator_or_write_node_t *cast = (yp_call_operator_or_write_node_t *) node;
1317
+ VALUE argv[4];
1318
+
1319
+ // target
1320
+ argv[0] = rb_ary_pop(value_stack);
1321
+
1322
+ // value
1323
+ argv[1] = rb_ary_pop(value_stack);
1324
+
1325
+ // operator_loc
1326
+ argv[2] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1327
+
1328
+ // location
1329
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1330
+
1331
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPCallOperatorOrWriteNode));
1332
+ break;
1333
+ }
1334
+ #line 137 "api_node.c.erb"
1335
+ case YP_NODE_CALL_OPERATOR_WRITE_NODE: {
1336
+ yp_call_operator_write_node_t *cast = (yp_call_operator_write_node_t *) node;
1337
+ VALUE argv[5];
1338
+
1339
+ // target
1340
+ argv[0] = rb_ary_pop(value_stack);
1341
+
1342
+ // operator_loc
1343
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1344
+
1345
+ // value
1346
+ argv[2] = rb_ary_pop(value_stack);
1347
+
1348
+ // operator_id
1349
+ argv[3] = rb_id2sym(constants[cast->operator_id - 1]);
1350
+
1351
+ // location
1352
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
1353
+
1354
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPCallOperatorWriteNode));
1355
+ break;
1356
+ }
1357
+ #line 137 "api_node.c.erb"
1358
+ case YP_NODE_CAPTURE_PATTERN_NODE: {
1359
+ yp_capture_pattern_node_t *cast = (yp_capture_pattern_node_t *) node;
1360
+ VALUE argv[4];
1361
+
1362
+ // value
1363
+ argv[0] = rb_ary_pop(value_stack);
1364
+
1365
+ // target
1366
+ argv[1] = rb_ary_pop(value_stack);
1367
+
1368
+ // operator_loc
1369
+ argv[2] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1370
+
1371
+ // location
1372
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1373
+
1374
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPCapturePatternNode));
1375
+ break;
1376
+ }
1377
+ #line 137 "api_node.c.erb"
1378
+ case YP_NODE_CASE_NODE: {
1379
+ yp_case_node_t *cast = (yp_case_node_t *) node;
1380
+ VALUE argv[6];
1381
+
1382
+ // predicate
1383
+ argv[0] = rb_ary_pop(value_stack);
1384
+
1385
+ // conditions
1386
+ argv[1] = rb_ary_new();
1387
+ for (size_t index = 0; index < cast->conditions.size; index++) {
1388
+ rb_ary_push(argv[1], rb_ary_pop(value_stack));
1389
+ }
1390
+
1391
+ // consequent
1392
+ argv[2] = rb_ary_pop(value_stack);
1393
+
1394
+ // case_keyword_loc
1395
+ argv[3] = yp_location_new(parser, cast->case_keyword_loc.start, cast->case_keyword_loc.end, source);
1396
+
1397
+ // end_keyword_loc
1398
+ argv[4] = yp_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
1399
+
1400
+ // location
1401
+ argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
1402
+
1403
+ rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPCaseNode));
1404
+ break;
1405
+ }
1406
+ #line 137 "api_node.c.erb"
1407
+ case YP_NODE_CLASS_NODE: {
1408
+ yp_class_node_t *cast = (yp_class_node_t *) node;
1409
+ VALUE argv[8];
1410
+
1411
+ // locals
1412
+ argv[0] = rb_ary_new();
1413
+ for (size_t index = 0; index < cast->locals.size; index++) {
1414
+ rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
1415
+ }
1416
+
1417
+ // class_keyword_loc
1418
+ argv[1] = yp_location_new(parser, cast->class_keyword_loc.start, cast->class_keyword_loc.end, source);
1419
+
1420
+ // constant_path
1421
+ argv[2] = rb_ary_pop(value_stack);
1422
+
1423
+ // inheritance_operator_loc
1424
+ argv[3] = cast->inheritance_operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->inheritance_operator_loc.start, cast->inheritance_operator_loc.end, source);
1425
+
1426
+ // superclass
1427
+ argv[4] = rb_ary_pop(value_stack);
1428
+
1429
+ // statements
1430
+ argv[5] = rb_ary_pop(value_stack);
1431
+
1432
+ // end_keyword_loc
1433
+ argv[6] = yp_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
1434
+
1435
+ // location
1436
+ argv[7] = yp_location_new(parser, node->location.start, node->location.end, source);
1437
+
1438
+ rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cYARPClassNode));
1439
+ break;
1440
+ }
1441
+ #line 137 "api_node.c.erb"
1442
+ case YP_NODE_CLASS_VARIABLE_OPERATOR_AND_WRITE_NODE: {
1443
+ yp_class_variable_operator_and_write_node_t *cast = (yp_class_variable_operator_and_write_node_t *) node;
1444
+ VALUE argv[4];
1445
+
1446
+ // name_loc
1447
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
1448
+
1449
+ // operator_loc
1450
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1451
+
1452
+ // value
1453
+ argv[2] = rb_ary_pop(value_stack);
1454
+
1455
+ // location
1456
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1457
+
1458
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPClassVariableOperatorAndWriteNode));
1459
+ break;
1460
+ }
1461
+ #line 137 "api_node.c.erb"
1462
+ case YP_NODE_CLASS_VARIABLE_OPERATOR_OR_WRITE_NODE: {
1463
+ yp_class_variable_operator_or_write_node_t *cast = (yp_class_variable_operator_or_write_node_t *) node;
1464
+ VALUE argv[4];
1465
+
1466
+ // name_loc
1467
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
1468
+
1469
+ // operator_loc
1470
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1471
+
1472
+ // value
1473
+ argv[2] = rb_ary_pop(value_stack);
1474
+
1475
+ // location
1476
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1477
+
1478
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPClassVariableOperatorOrWriteNode));
1479
+ break;
1480
+ }
1481
+ #line 137 "api_node.c.erb"
1482
+ case YP_NODE_CLASS_VARIABLE_OPERATOR_WRITE_NODE: {
1483
+ yp_class_variable_operator_write_node_t *cast = (yp_class_variable_operator_write_node_t *) node;
1484
+ VALUE argv[5];
1485
+
1486
+ // name_loc
1487
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
1488
+
1489
+ // operator_loc
1490
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1491
+
1492
+ // value
1493
+ argv[2] = rb_ary_pop(value_stack);
1494
+
1495
+ // operator
1496
+ argv[3] = rb_id2sym(constants[cast->operator - 1]);
1497
+
1498
+ // location
1499
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
1500
+
1501
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPClassVariableOperatorWriteNode));
1502
+ break;
1503
+ }
1504
+ #line 137 "api_node.c.erb"
1505
+ case YP_NODE_CLASS_VARIABLE_READ_NODE: {
1506
+ VALUE argv[1];
1507
+
1508
+ // location
1509
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
1510
+
1511
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPClassVariableReadNode));
1512
+ break;
1513
+ }
1514
+ #line 137 "api_node.c.erb"
1515
+ case YP_NODE_CLASS_VARIABLE_WRITE_NODE: {
1516
+ yp_class_variable_write_node_t *cast = (yp_class_variable_write_node_t *) node;
1517
+ VALUE argv[4];
1518
+
1519
+ // name_loc
1520
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
1521
+
1522
+ // value
1523
+ argv[1] = rb_ary_pop(value_stack);
1524
+
1525
+ // operator_loc
1526
+ argv[2] = cast->operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1527
+
1528
+ // location
1529
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1530
+
1531
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPClassVariableWriteNode));
1532
+ break;
1533
+ }
1534
+ #line 137 "api_node.c.erb"
1535
+ case YP_NODE_CONSTANT_OPERATOR_AND_WRITE_NODE: {
1536
+ yp_constant_operator_and_write_node_t *cast = (yp_constant_operator_and_write_node_t *) node;
1537
+ VALUE argv[4];
1538
+
1539
+ // name_loc
1540
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
1541
+
1542
+ // operator_loc
1543
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1544
+
1545
+ // value
1546
+ argv[2] = rb_ary_pop(value_stack);
1547
+
1548
+ // location
1549
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1550
+
1551
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPConstantOperatorAndWriteNode));
1552
+ break;
1553
+ }
1554
+ #line 137 "api_node.c.erb"
1555
+ case YP_NODE_CONSTANT_OPERATOR_OR_WRITE_NODE: {
1556
+ yp_constant_operator_or_write_node_t *cast = (yp_constant_operator_or_write_node_t *) node;
1557
+ VALUE argv[4];
1558
+
1559
+ // name_loc
1560
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
1561
+
1562
+ // operator_loc
1563
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1564
+
1565
+ // value
1566
+ argv[2] = rb_ary_pop(value_stack);
1567
+
1568
+ // location
1569
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1570
+
1571
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPConstantOperatorOrWriteNode));
1572
+ break;
1573
+ }
1574
+ #line 137 "api_node.c.erb"
1575
+ case YP_NODE_CONSTANT_OPERATOR_WRITE_NODE: {
1576
+ yp_constant_operator_write_node_t *cast = (yp_constant_operator_write_node_t *) node;
1577
+ VALUE argv[5];
1578
+
1579
+ // name_loc
1580
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
1581
+
1582
+ // operator_loc
1583
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1584
+
1585
+ // value
1586
+ argv[2] = rb_ary_pop(value_stack);
1587
+
1588
+ // operator
1589
+ argv[3] = rb_id2sym(constants[cast->operator - 1]);
1590
+
1591
+ // location
1592
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
1593
+
1594
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPConstantOperatorWriteNode));
1595
+ break;
1596
+ }
1597
+ #line 137 "api_node.c.erb"
1598
+ case YP_NODE_CONSTANT_PATH_NODE: {
1599
+ yp_constant_path_node_t *cast = (yp_constant_path_node_t *) node;
1600
+ VALUE argv[4];
1601
+
1602
+ // parent
1603
+ argv[0] = rb_ary_pop(value_stack);
1604
+
1605
+ // child
1606
+ argv[1] = rb_ary_pop(value_stack);
1607
+
1608
+ // delimiter_loc
1609
+ argv[2] = yp_location_new(parser, cast->delimiter_loc.start, cast->delimiter_loc.end, source);
1610
+
1611
+ // location
1612
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1613
+
1614
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPConstantPathNode));
1615
+ break;
1616
+ }
1617
+ #line 137 "api_node.c.erb"
1618
+ case YP_NODE_CONSTANT_PATH_OPERATOR_AND_WRITE_NODE: {
1619
+ yp_constant_path_operator_and_write_node_t *cast = (yp_constant_path_operator_and_write_node_t *) node;
1620
+ VALUE argv[4];
1621
+
1622
+ // target
1623
+ argv[0] = rb_ary_pop(value_stack);
1624
+
1625
+ // operator_loc
1626
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1627
+
1628
+ // value
1629
+ argv[2] = rb_ary_pop(value_stack);
1630
+
1631
+ // location
1632
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1633
+
1634
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPConstantPathOperatorAndWriteNode));
1635
+ break;
1636
+ }
1637
+ #line 137 "api_node.c.erb"
1638
+ case YP_NODE_CONSTANT_PATH_OPERATOR_OR_WRITE_NODE: {
1639
+ yp_constant_path_operator_or_write_node_t *cast = (yp_constant_path_operator_or_write_node_t *) node;
1640
+ VALUE argv[4];
1641
+
1642
+ // target
1643
+ argv[0] = rb_ary_pop(value_stack);
1644
+
1645
+ // operator_loc
1646
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1647
+
1648
+ // value
1649
+ argv[2] = rb_ary_pop(value_stack);
1650
+
1651
+ // location
1652
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1653
+
1654
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPConstantPathOperatorOrWriteNode));
1655
+ break;
1656
+ }
1657
+ #line 137 "api_node.c.erb"
1658
+ case YP_NODE_CONSTANT_PATH_OPERATOR_WRITE_NODE: {
1659
+ yp_constant_path_operator_write_node_t *cast = (yp_constant_path_operator_write_node_t *) node;
1660
+ VALUE argv[5];
1661
+
1662
+ // target
1663
+ argv[0] = rb_ary_pop(value_stack);
1664
+
1665
+ // operator_loc
1666
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1667
+
1668
+ // value
1669
+ argv[2] = rb_ary_pop(value_stack);
1670
+
1671
+ // operator
1672
+ argv[3] = rb_id2sym(constants[cast->operator - 1]);
1673
+
1674
+ // location
1675
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
1676
+
1677
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPConstantPathOperatorWriteNode));
1678
+ break;
1679
+ }
1680
+ #line 137 "api_node.c.erb"
1681
+ case YP_NODE_CONSTANT_PATH_WRITE_NODE: {
1682
+ yp_constant_path_write_node_t *cast = (yp_constant_path_write_node_t *) node;
1683
+ VALUE argv[4];
1684
+
1685
+ // target
1686
+ argv[0] = rb_ary_pop(value_stack);
1687
+
1688
+ // operator_loc
1689
+ argv[1] = cast->operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1690
+
1691
+ // value
1692
+ argv[2] = rb_ary_pop(value_stack);
1693
+
1694
+ // location
1695
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1696
+
1697
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPConstantPathWriteNode));
1698
+ break;
1699
+ }
1700
+ #line 137 "api_node.c.erb"
1701
+ case YP_NODE_CONSTANT_READ_NODE: {
1702
+ VALUE argv[1];
1703
+
1704
+ // location
1705
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
1706
+
1707
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPConstantReadNode));
1708
+ break;
1709
+ }
1710
+ #line 137 "api_node.c.erb"
1711
+ case YP_NODE_CONSTANT_WRITE_NODE: {
1712
+ yp_constant_write_node_t *cast = (yp_constant_write_node_t *) node;
1713
+ VALUE argv[4];
1714
+
1715
+ // name_loc
1716
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
1717
+
1718
+ // value
1719
+ argv[1] = rb_ary_pop(value_stack);
1720
+
1721
+ // operator_loc
1722
+ argv[2] = cast->operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1723
+
1724
+ // location
1725
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1726
+
1727
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPConstantWriteNode));
1728
+ break;
1729
+ }
1730
+ #line 137 "api_node.c.erb"
1731
+ case YP_NODE_DEF_NODE: {
1732
+ yp_def_node_t *cast = (yp_def_node_t *) node;
1733
+ VALUE argv[12];
1734
+
1735
+ // name_loc
1736
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
1737
+
1738
+ // receiver
1739
+ argv[1] = rb_ary_pop(value_stack);
1740
+
1741
+ // parameters
1742
+ argv[2] = rb_ary_pop(value_stack);
1743
+
1744
+ // statements
1745
+ argv[3] = rb_ary_pop(value_stack);
1746
+
1747
+ // locals
1748
+ argv[4] = rb_ary_new();
1749
+ for (size_t index = 0; index < cast->locals.size; index++) {
1750
+ rb_ary_push(argv[4], rb_id2sym(constants[cast->locals.ids[index] - 1]));
1751
+ }
1752
+
1753
+ // def_keyword_loc
1754
+ argv[5] = yp_location_new(parser, cast->def_keyword_loc.start, cast->def_keyword_loc.end, source);
1755
+
1756
+ // operator_loc
1757
+ argv[6] = cast->operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1758
+
1759
+ // lparen_loc
1760
+ argv[7] = cast->lparen_loc.start == NULL ? Qnil : yp_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source);
1761
+
1762
+ // rparen_loc
1763
+ argv[8] = cast->rparen_loc.start == NULL ? Qnil : yp_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source);
1764
+
1765
+ // equal_loc
1766
+ argv[9] = cast->equal_loc.start == NULL ? Qnil : yp_location_new(parser, cast->equal_loc.start, cast->equal_loc.end, source);
1767
+
1768
+ // end_keyword_loc
1769
+ argv[10] = cast->end_keyword_loc.start == NULL ? Qnil : yp_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
1770
+
1771
+ // location
1772
+ argv[11] = yp_location_new(parser, node->location.start, node->location.end, source);
1773
+
1774
+ rb_ary_push(value_stack, rb_class_new_instance(12, argv, rb_cYARPDefNode));
1775
+ break;
1776
+ }
1777
+ #line 137 "api_node.c.erb"
1778
+ case YP_NODE_DEFINED_NODE: {
1779
+ yp_defined_node_t *cast = (yp_defined_node_t *) node;
1780
+ VALUE argv[5];
1781
+
1782
+ // lparen_loc
1783
+ argv[0] = cast->lparen_loc.start == NULL ? Qnil : yp_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source);
1784
+
1785
+ // value
1786
+ argv[1] = rb_ary_pop(value_stack);
1787
+
1788
+ // rparen_loc
1789
+ argv[2] = cast->rparen_loc.start == NULL ? Qnil : yp_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source);
1790
+
1791
+ // keyword_loc
1792
+ argv[3] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
1793
+
1794
+ // location
1795
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
1796
+
1797
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPDefinedNode));
1798
+ break;
1799
+ }
1800
+ #line 137 "api_node.c.erb"
1801
+ case YP_NODE_ELSE_NODE: {
1802
+ yp_else_node_t *cast = (yp_else_node_t *) node;
1803
+ VALUE argv[4];
1804
+
1805
+ // else_keyword_loc
1806
+ argv[0] = yp_location_new(parser, cast->else_keyword_loc.start, cast->else_keyword_loc.end, source);
1807
+
1808
+ // statements
1809
+ argv[1] = rb_ary_pop(value_stack);
1810
+
1811
+ // end_keyword_loc
1812
+ argv[2] = cast->end_keyword_loc.start == NULL ? Qnil : yp_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
1813
+
1814
+ // location
1815
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1816
+
1817
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPElseNode));
1818
+ break;
1819
+ }
1820
+ #line 137 "api_node.c.erb"
1821
+ case YP_NODE_EMBEDDED_STATEMENTS_NODE: {
1822
+ yp_embedded_statements_node_t *cast = (yp_embedded_statements_node_t *) node;
1823
+ VALUE argv[4];
1824
+
1825
+ // opening_loc
1826
+ argv[0] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
1827
+
1828
+ // statements
1829
+ argv[1] = rb_ary_pop(value_stack);
1830
+
1831
+ // closing_loc
1832
+ argv[2] = yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
1833
+
1834
+ // location
1835
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1836
+
1837
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPEmbeddedStatementsNode));
1838
+ break;
1839
+ }
1840
+ #line 137 "api_node.c.erb"
1841
+ case YP_NODE_EMBEDDED_VARIABLE_NODE: {
1842
+ yp_embedded_variable_node_t *cast = (yp_embedded_variable_node_t *) node;
1843
+ VALUE argv[3];
1844
+
1845
+ // operator_loc
1846
+ argv[0] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
1847
+
1848
+ // variable
1849
+ argv[1] = rb_ary_pop(value_stack);
1850
+
1851
+ // location
1852
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
1853
+
1854
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPEmbeddedVariableNode));
1855
+ break;
1856
+ }
1857
+ #line 137 "api_node.c.erb"
1858
+ case YP_NODE_ENSURE_NODE: {
1859
+ yp_ensure_node_t *cast = (yp_ensure_node_t *) node;
1860
+ VALUE argv[4];
1861
+
1862
+ // ensure_keyword_loc
1863
+ argv[0] = yp_location_new(parser, cast->ensure_keyword_loc.start, cast->ensure_keyword_loc.end, source);
1864
+
1865
+ // statements
1866
+ argv[1] = rb_ary_pop(value_stack);
1867
+
1868
+ // end_keyword_loc
1869
+ argv[2] = yp_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
1870
+
1871
+ // location
1872
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
1873
+
1874
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPEnsureNode));
1875
+ break;
1876
+ }
1877
+ #line 137 "api_node.c.erb"
1878
+ case YP_NODE_FALSE_NODE: {
1879
+ VALUE argv[1];
1880
+
1881
+ // location
1882
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
1883
+
1884
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPFalseNode));
1885
+ break;
1886
+ }
1887
+ #line 137 "api_node.c.erb"
1888
+ case YP_NODE_FIND_PATTERN_NODE: {
1889
+ yp_find_pattern_node_t *cast = (yp_find_pattern_node_t *) node;
1890
+ VALUE argv[7];
1891
+
1892
+ // constant
1893
+ argv[0] = rb_ary_pop(value_stack);
1894
+
1895
+ // left
1896
+ argv[1] = rb_ary_pop(value_stack);
1897
+
1898
+ // requireds
1899
+ argv[2] = rb_ary_new();
1900
+ for (size_t index = 0; index < cast->requireds.size; index++) {
1901
+ rb_ary_push(argv[2], rb_ary_pop(value_stack));
1902
+ }
1903
+
1904
+ // right
1905
+ argv[3] = rb_ary_pop(value_stack);
1906
+
1907
+ // opening_loc
1908
+ argv[4] = cast->opening_loc.start == NULL ? Qnil : yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
1909
+
1910
+ // closing_loc
1911
+ argv[5] = cast->closing_loc.start == NULL ? Qnil : yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
1912
+
1913
+ // location
1914
+ argv[6] = yp_location_new(parser, node->location.start, node->location.end, source);
1915
+
1916
+ rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cYARPFindPatternNode));
1917
+ break;
1918
+ }
1919
+ #line 137 "api_node.c.erb"
1920
+ case YP_NODE_FLOAT_NODE: {
1921
+ VALUE argv[1];
1922
+
1923
+ // location
1924
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
1925
+
1926
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPFloatNode));
1927
+ break;
1928
+ }
1929
+ #line 137 "api_node.c.erb"
1930
+ case YP_NODE_FOR_NODE: {
1931
+ yp_for_node_t *cast = (yp_for_node_t *) node;
1932
+ VALUE argv[8];
1933
+
1934
+ // index
1935
+ argv[0] = rb_ary_pop(value_stack);
1936
+
1937
+ // collection
1938
+ argv[1] = rb_ary_pop(value_stack);
1939
+
1940
+ // statements
1941
+ argv[2] = rb_ary_pop(value_stack);
1942
+
1943
+ // for_keyword_loc
1944
+ argv[3] = yp_location_new(parser, cast->for_keyword_loc.start, cast->for_keyword_loc.end, source);
1945
+
1946
+ // in_keyword_loc
1947
+ argv[4] = yp_location_new(parser, cast->in_keyword_loc.start, cast->in_keyword_loc.end, source);
1948
+
1949
+ // do_keyword_loc
1950
+ argv[5] = cast->do_keyword_loc.start == NULL ? Qnil : yp_location_new(parser, cast->do_keyword_loc.start, cast->do_keyword_loc.end, source);
1951
+
1952
+ // end_keyword_loc
1953
+ argv[6] = yp_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
1954
+
1955
+ // location
1956
+ argv[7] = yp_location_new(parser, node->location.start, node->location.end, source);
1957
+
1958
+ rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cYARPForNode));
1959
+ break;
1960
+ }
1961
+ #line 137 "api_node.c.erb"
1962
+ case YP_NODE_FORWARDING_ARGUMENTS_NODE: {
1963
+ VALUE argv[1];
1964
+
1965
+ // location
1966
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
1967
+
1968
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPForwardingArgumentsNode));
1969
+ break;
1970
+ }
1971
+ #line 137 "api_node.c.erb"
1972
+ case YP_NODE_FORWARDING_PARAMETER_NODE: {
1973
+ VALUE argv[1];
1974
+
1975
+ // location
1976
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
1977
+
1978
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPForwardingParameterNode));
1979
+ break;
1980
+ }
1981
+ #line 137 "api_node.c.erb"
1982
+ case YP_NODE_FORWARDING_SUPER_NODE: {
1983
+ VALUE argv[2];
1984
+
1985
+ // block
1986
+ argv[0] = rb_ary_pop(value_stack);
1987
+
1988
+ // location
1989
+ argv[1] = yp_location_new(parser, node->location.start, node->location.end, source);
1990
+
1991
+ rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cYARPForwardingSuperNode));
1992
+ break;
1993
+ }
1994
+ #line 137 "api_node.c.erb"
1995
+ case YP_NODE_GLOBAL_VARIABLE_OPERATOR_AND_WRITE_NODE: {
1996
+ yp_global_variable_operator_and_write_node_t *cast = (yp_global_variable_operator_and_write_node_t *) node;
1997
+ VALUE argv[4];
1998
+
1999
+ // name_loc
2000
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2001
+
2002
+ // operator_loc
2003
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2004
+
2005
+ // value
2006
+ argv[2] = rb_ary_pop(value_stack);
2007
+
2008
+ // location
2009
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2010
+
2011
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPGlobalVariableOperatorAndWriteNode));
2012
+ break;
2013
+ }
2014
+ #line 137 "api_node.c.erb"
2015
+ case YP_NODE_GLOBAL_VARIABLE_OPERATOR_OR_WRITE_NODE: {
2016
+ yp_global_variable_operator_or_write_node_t *cast = (yp_global_variable_operator_or_write_node_t *) node;
2017
+ VALUE argv[4];
2018
+
2019
+ // name_loc
2020
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2021
+
2022
+ // operator_loc
2023
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2024
+
2025
+ // value
2026
+ argv[2] = rb_ary_pop(value_stack);
2027
+
2028
+ // location
2029
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2030
+
2031
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPGlobalVariableOperatorOrWriteNode));
2032
+ break;
2033
+ }
2034
+ #line 137 "api_node.c.erb"
2035
+ case YP_NODE_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: {
2036
+ yp_global_variable_operator_write_node_t *cast = (yp_global_variable_operator_write_node_t *) node;
2037
+ VALUE argv[5];
2038
+
2039
+ // name_loc
2040
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2041
+
2042
+ // operator_loc
2043
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2044
+
2045
+ // value
2046
+ argv[2] = rb_ary_pop(value_stack);
2047
+
2048
+ // operator
2049
+ argv[3] = rb_id2sym(constants[cast->operator - 1]);
2050
+
2051
+ // location
2052
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2053
+
2054
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPGlobalVariableOperatorWriteNode));
2055
+ break;
2056
+ }
2057
+ #line 137 "api_node.c.erb"
2058
+ case YP_NODE_GLOBAL_VARIABLE_READ_NODE: {
2059
+ VALUE argv[1];
2060
+
2061
+ // location
2062
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
2063
+
2064
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPGlobalVariableReadNode));
2065
+ break;
2066
+ }
2067
+ #line 137 "api_node.c.erb"
2068
+ case YP_NODE_GLOBAL_VARIABLE_WRITE_NODE: {
2069
+ yp_global_variable_write_node_t *cast = (yp_global_variable_write_node_t *) node;
2070
+ VALUE argv[4];
2071
+
2072
+ // name_loc
2073
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2074
+
2075
+ // operator_loc
2076
+ argv[1] = cast->operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2077
+
2078
+ // value
2079
+ argv[2] = rb_ary_pop(value_stack);
2080
+
2081
+ // location
2082
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2083
+
2084
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPGlobalVariableWriteNode));
2085
+ break;
2086
+ }
2087
+ #line 137 "api_node.c.erb"
2088
+ case YP_NODE_HASH_NODE: {
2089
+ yp_hash_node_t *cast = (yp_hash_node_t *) node;
2090
+ VALUE argv[4];
2091
+
2092
+ // opening_loc
2093
+ argv[0] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2094
+
2095
+ // elements
2096
+ argv[1] = rb_ary_new();
2097
+ for (size_t index = 0; index < cast->elements.size; index++) {
2098
+ rb_ary_push(argv[1], rb_ary_pop(value_stack));
2099
+ }
2100
+
2101
+ // closing_loc
2102
+ argv[2] = yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
2103
+
2104
+ // location
2105
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2106
+
2107
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPHashNode));
2108
+ break;
2109
+ }
2110
+ #line 137 "api_node.c.erb"
2111
+ case YP_NODE_HASH_PATTERN_NODE: {
2112
+ yp_hash_pattern_node_t *cast = (yp_hash_pattern_node_t *) node;
2113
+ VALUE argv[6];
2114
+
2115
+ // constant
2116
+ argv[0] = rb_ary_pop(value_stack);
2117
+
2118
+ // assocs
2119
+ argv[1] = rb_ary_new();
2120
+ for (size_t index = 0; index < cast->assocs.size; index++) {
2121
+ rb_ary_push(argv[1], rb_ary_pop(value_stack));
2122
+ }
2123
+
2124
+ // kwrest
2125
+ argv[2] = rb_ary_pop(value_stack);
2126
+
2127
+ // opening_loc
2128
+ argv[3] = cast->opening_loc.start == NULL ? Qnil : yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2129
+
2130
+ // closing_loc
2131
+ argv[4] = cast->closing_loc.start == NULL ? Qnil : yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
2132
+
2133
+ // location
2134
+ argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
2135
+
2136
+ rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPHashPatternNode));
2137
+ break;
2138
+ }
2139
+ #line 137 "api_node.c.erb"
2140
+ case YP_NODE_IF_NODE: {
2141
+ yp_if_node_t *cast = (yp_if_node_t *) node;
2142
+ VALUE argv[6];
2143
+
2144
+ // if_keyword_loc
2145
+ argv[0] = cast->if_keyword_loc.start == NULL ? Qnil : yp_location_new(parser, cast->if_keyword_loc.start, cast->if_keyword_loc.end, source);
2146
+
2147
+ // predicate
2148
+ argv[1] = rb_ary_pop(value_stack);
2149
+
2150
+ // statements
2151
+ argv[2] = rb_ary_pop(value_stack);
2152
+
2153
+ // consequent
2154
+ argv[3] = rb_ary_pop(value_stack);
2155
+
2156
+ // end_keyword_loc
2157
+ argv[4] = cast->end_keyword_loc.start == NULL ? Qnil : yp_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
2158
+
2159
+ // location
2160
+ argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
2161
+
2162
+ rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPIfNode));
2163
+ break;
2164
+ }
2165
+ #line 137 "api_node.c.erb"
2166
+ case YP_NODE_IMAGINARY_NODE: {
2167
+ VALUE argv[2];
2168
+
2169
+ // numeric
2170
+ argv[0] = rb_ary_pop(value_stack);
2171
+
2172
+ // location
2173
+ argv[1] = yp_location_new(parser, node->location.start, node->location.end, source);
2174
+
2175
+ rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cYARPImaginaryNode));
2176
+ break;
2177
+ }
2178
+ #line 137 "api_node.c.erb"
2179
+ case YP_NODE_IN_NODE: {
2180
+ yp_in_node_t *cast = (yp_in_node_t *) node;
2181
+ VALUE argv[5];
2182
+
2183
+ // pattern
2184
+ argv[0] = rb_ary_pop(value_stack);
2185
+
2186
+ // statements
2187
+ argv[1] = rb_ary_pop(value_stack);
2188
+
2189
+ // in_loc
2190
+ argv[2] = yp_location_new(parser, cast->in_loc.start, cast->in_loc.end, source);
2191
+
2192
+ // then_loc
2193
+ argv[3] = cast->then_loc.start == NULL ? Qnil : yp_location_new(parser, cast->then_loc.start, cast->then_loc.end, source);
2194
+
2195
+ // location
2196
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2197
+
2198
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPInNode));
2199
+ break;
2200
+ }
2201
+ #line 137 "api_node.c.erb"
2202
+ case YP_NODE_INSTANCE_VARIABLE_OPERATOR_AND_WRITE_NODE: {
2203
+ yp_instance_variable_operator_and_write_node_t *cast = (yp_instance_variable_operator_and_write_node_t *) node;
2204
+ VALUE argv[4];
2205
+
2206
+ // name_loc
2207
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2208
+
2209
+ // operator_loc
2210
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2211
+
2212
+ // value
2213
+ argv[2] = rb_ary_pop(value_stack);
2214
+
2215
+ // location
2216
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2217
+
2218
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPInstanceVariableOperatorAndWriteNode));
2219
+ break;
2220
+ }
2221
+ #line 137 "api_node.c.erb"
2222
+ case YP_NODE_INSTANCE_VARIABLE_OPERATOR_OR_WRITE_NODE: {
2223
+ yp_instance_variable_operator_or_write_node_t *cast = (yp_instance_variable_operator_or_write_node_t *) node;
2224
+ VALUE argv[4];
2225
+
2226
+ // name_loc
2227
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2228
+
2229
+ // operator_loc
2230
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2231
+
2232
+ // value
2233
+ argv[2] = rb_ary_pop(value_stack);
2234
+
2235
+ // location
2236
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2237
+
2238
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPInstanceVariableOperatorOrWriteNode));
2239
+ break;
2240
+ }
2241
+ #line 137 "api_node.c.erb"
2242
+ case YP_NODE_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: {
2243
+ yp_instance_variable_operator_write_node_t *cast = (yp_instance_variable_operator_write_node_t *) node;
2244
+ VALUE argv[5];
2245
+
2246
+ // name_loc
2247
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2248
+
2249
+ // operator_loc
2250
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2251
+
2252
+ // value
2253
+ argv[2] = rb_ary_pop(value_stack);
2254
+
2255
+ // operator
2256
+ argv[3] = rb_id2sym(constants[cast->operator - 1]);
2257
+
2258
+ // location
2259
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2260
+
2261
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPInstanceVariableOperatorWriteNode));
2262
+ break;
2263
+ }
2264
+ #line 137 "api_node.c.erb"
2265
+ case YP_NODE_INSTANCE_VARIABLE_READ_NODE: {
2266
+ VALUE argv[1];
2267
+
2268
+ // location
2269
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
2270
+
2271
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPInstanceVariableReadNode));
2272
+ break;
2273
+ }
2274
+ #line 137 "api_node.c.erb"
2275
+ case YP_NODE_INSTANCE_VARIABLE_WRITE_NODE: {
2276
+ yp_instance_variable_write_node_t *cast = (yp_instance_variable_write_node_t *) node;
2277
+ VALUE argv[4];
2278
+
2279
+ // name_loc
2280
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2281
+
2282
+ // value
2283
+ argv[1] = rb_ary_pop(value_stack);
2284
+
2285
+ // operator_loc
2286
+ argv[2] = cast->operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2287
+
2288
+ // location
2289
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2290
+
2291
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPInstanceVariableWriteNode));
2292
+ break;
2293
+ }
2294
+ #line 137 "api_node.c.erb"
2295
+ case YP_NODE_INTEGER_NODE: {
2296
+ VALUE argv[1];
2297
+
2298
+ // location
2299
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
2300
+
2301
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPIntegerNode));
2302
+ break;
2303
+ }
2304
+ #line 137 "api_node.c.erb"
2305
+ case YP_NODE_INTERPOLATED_REGULAR_EXPRESSION_NODE: {
2306
+ yp_interpolated_regular_expression_node_t *cast = (yp_interpolated_regular_expression_node_t *) node;
2307
+ VALUE argv[5];
2308
+
2309
+ // opening_loc
2310
+ argv[0] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2311
+
2312
+ // parts
2313
+ argv[1] = rb_ary_new();
2314
+ for (size_t index = 0; index < cast->parts.size; index++) {
2315
+ rb_ary_push(argv[1], rb_ary_pop(value_stack));
2316
+ }
2317
+
2318
+ // closing_loc
2319
+ argv[2] = yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
2320
+
2321
+ // flags
2322
+ argv[3] = ULONG2NUM(cast->flags);
2323
+
2324
+ // location
2325
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2326
+
2327
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPInterpolatedRegularExpressionNode));
2328
+ break;
2329
+ }
2330
+ #line 137 "api_node.c.erb"
2331
+ case YP_NODE_INTERPOLATED_STRING_NODE: {
2332
+ yp_interpolated_string_node_t *cast = (yp_interpolated_string_node_t *) node;
2333
+ VALUE argv[4];
2334
+
2335
+ // opening_loc
2336
+ argv[0] = cast->opening_loc.start == NULL ? Qnil : yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2337
+
2338
+ // parts
2339
+ argv[1] = rb_ary_new();
2340
+ for (size_t index = 0; index < cast->parts.size; index++) {
2341
+ rb_ary_push(argv[1], rb_ary_pop(value_stack));
2342
+ }
2343
+
2344
+ // closing_loc
2345
+ argv[2] = cast->closing_loc.start == NULL ? Qnil : yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
2346
+
2347
+ // location
2348
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2349
+
2350
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPInterpolatedStringNode));
2351
+ break;
2352
+ }
2353
+ #line 137 "api_node.c.erb"
2354
+ case YP_NODE_INTERPOLATED_SYMBOL_NODE: {
2355
+ yp_interpolated_symbol_node_t *cast = (yp_interpolated_symbol_node_t *) node;
2356
+ VALUE argv[4];
2357
+
2358
+ // opening_loc
2359
+ argv[0] = cast->opening_loc.start == NULL ? Qnil : yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2360
+
2361
+ // parts
2362
+ argv[1] = rb_ary_new();
2363
+ for (size_t index = 0; index < cast->parts.size; index++) {
2364
+ rb_ary_push(argv[1], rb_ary_pop(value_stack));
2365
+ }
2366
+
2367
+ // closing_loc
2368
+ argv[2] = cast->closing_loc.start == NULL ? Qnil : yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
2369
+
2370
+ // location
2371
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2372
+
2373
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPInterpolatedSymbolNode));
2374
+ break;
2375
+ }
2376
+ #line 137 "api_node.c.erb"
2377
+ case YP_NODE_INTERPOLATED_X_STRING_NODE: {
2378
+ yp_interpolated_x_string_node_t *cast = (yp_interpolated_x_string_node_t *) node;
2379
+ VALUE argv[4];
2380
+
2381
+ // opening_loc
2382
+ argv[0] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2383
+
2384
+ // parts
2385
+ argv[1] = rb_ary_new();
2386
+ for (size_t index = 0; index < cast->parts.size; index++) {
2387
+ rb_ary_push(argv[1], rb_ary_pop(value_stack));
2388
+ }
2389
+
2390
+ // closing_loc
2391
+ argv[2] = yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
2392
+
2393
+ // location
2394
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2395
+
2396
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPInterpolatedXStringNode));
2397
+ break;
2398
+ }
2399
+ #line 137 "api_node.c.erb"
2400
+ case YP_NODE_KEYWORD_HASH_NODE: {
2401
+ yp_keyword_hash_node_t *cast = (yp_keyword_hash_node_t *) node;
2402
+ VALUE argv[2];
2403
+
2404
+ // elements
2405
+ argv[0] = rb_ary_new();
2406
+ for (size_t index = 0; index < cast->elements.size; index++) {
2407
+ rb_ary_push(argv[0], rb_ary_pop(value_stack));
2408
+ }
2409
+
2410
+ // location
2411
+ argv[1] = yp_location_new(parser, node->location.start, node->location.end, source);
2412
+
2413
+ rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cYARPKeywordHashNode));
2414
+ break;
2415
+ }
2416
+ #line 137 "api_node.c.erb"
2417
+ case YP_NODE_KEYWORD_PARAMETER_NODE: {
2418
+ yp_keyword_parameter_node_t *cast = (yp_keyword_parameter_node_t *) node;
2419
+ VALUE argv[3];
2420
+
2421
+ // name_loc
2422
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2423
+
2424
+ // value
2425
+ argv[1] = rb_ary_pop(value_stack);
2426
+
2427
+ // location
2428
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
2429
+
2430
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPKeywordParameterNode));
2431
+ break;
2432
+ }
2433
+ #line 137 "api_node.c.erb"
2434
+ case YP_NODE_KEYWORD_REST_PARAMETER_NODE: {
2435
+ yp_keyword_rest_parameter_node_t *cast = (yp_keyword_rest_parameter_node_t *) node;
2436
+ VALUE argv[3];
2437
+
2438
+ // operator_loc
2439
+ argv[0] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2440
+
2441
+ // name_loc
2442
+ argv[1] = cast->name_loc.start == NULL ? Qnil : yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2443
+
2444
+ // location
2445
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
2446
+
2447
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPKeywordRestParameterNode));
2448
+ break;
2449
+ }
2450
+ #line 137 "api_node.c.erb"
2451
+ case YP_NODE_LAMBDA_NODE: {
2452
+ yp_lambda_node_t *cast = (yp_lambda_node_t *) node;
2453
+ VALUE argv[5];
2454
+
2455
+ // locals
2456
+ argv[0] = rb_ary_new();
2457
+ for (size_t index = 0; index < cast->locals.size; index++) {
2458
+ rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
2459
+ }
2460
+
2461
+ // opening_loc
2462
+ argv[1] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2463
+
2464
+ // parameters
2465
+ argv[2] = rb_ary_pop(value_stack);
2466
+
2467
+ // statements
2468
+ argv[3] = rb_ary_pop(value_stack);
2469
+
2470
+ // location
2471
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2472
+
2473
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPLambdaNode));
2474
+ break;
2475
+ }
2476
+ #line 137 "api_node.c.erb"
2477
+ case YP_NODE_LOCAL_VARIABLE_OPERATOR_AND_WRITE_NODE: {
2478
+ yp_local_variable_operator_and_write_node_t *cast = (yp_local_variable_operator_and_write_node_t *) node;
2479
+ VALUE argv[5];
2480
+
2481
+ // name_loc
2482
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2483
+
2484
+ // operator_loc
2485
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2486
+
2487
+ // value
2488
+ argv[2] = rb_ary_pop(value_stack);
2489
+
2490
+ // constant_id
2491
+ argv[3] = rb_id2sym(constants[cast->constant_id - 1]);
2492
+
2493
+ // location
2494
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2495
+
2496
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPLocalVariableOperatorAndWriteNode));
2497
+ break;
2498
+ }
2499
+ #line 137 "api_node.c.erb"
2500
+ case YP_NODE_LOCAL_VARIABLE_OPERATOR_OR_WRITE_NODE: {
2501
+ yp_local_variable_operator_or_write_node_t *cast = (yp_local_variable_operator_or_write_node_t *) node;
2502
+ VALUE argv[5];
2503
+
2504
+ // name_loc
2505
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2506
+
2507
+ // operator_loc
2508
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2509
+
2510
+ // value
2511
+ argv[2] = rb_ary_pop(value_stack);
2512
+
2513
+ // constant_id
2514
+ argv[3] = rb_id2sym(constants[cast->constant_id - 1]);
2515
+
2516
+ // location
2517
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2518
+
2519
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPLocalVariableOperatorOrWriteNode));
2520
+ break;
2521
+ }
2522
+ #line 137 "api_node.c.erb"
2523
+ case YP_NODE_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: {
2524
+ yp_local_variable_operator_write_node_t *cast = (yp_local_variable_operator_write_node_t *) node;
2525
+ VALUE argv[6];
2526
+
2527
+ // name_loc
2528
+ argv[0] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2529
+
2530
+ // operator_loc
2531
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2532
+
2533
+ // value
2534
+ argv[2] = rb_ary_pop(value_stack);
2535
+
2536
+ // constant_id
2537
+ argv[3] = rb_id2sym(constants[cast->constant_id - 1]);
2538
+
2539
+ // operator_id
2540
+ argv[4] = rb_id2sym(constants[cast->operator_id - 1]);
2541
+
2542
+ // location
2543
+ argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
2544
+
2545
+ rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPLocalVariableOperatorWriteNode));
2546
+ break;
2547
+ }
2548
+ #line 137 "api_node.c.erb"
2549
+ case YP_NODE_LOCAL_VARIABLE_READ_NODE: {
2550
+ yp_local_variable_read_node_t *cast = (yp_local_variable_read_node_t *) node;
2551
+ VALUE argv[3];
2552
+
2553
+ // constant_id
2554
+ argv[0] = rb_id2sym(constants[cast->constant_id - 1]);
2555
+
2556
+ // depth
2557
+ argv[1] = ULONG2NUM(cast->depth);
2558
+
2559
+ // location
2560
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
2561
+
2562
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPLocalVariableReadNode));
2563
+ break;
2564
+ }
2565
+ #line 137 "api_node.c.erb"
2566
+ case YP_NODE_LOCAL_VARIABLE_WRITE_NODE: {
2567
+ yp_local_variable_write_node_t *cast = (yp_local_variable_write_node_t *) node;
2568
+ VALUE argv[6];
2569
+
2570
+ // constant_id
2571
+ argv[0] = rb_id2sym(constants[cast->constant_id - 1]);
2572
+
2573
+ // depth
2574
+ argv[1] = ULONG2NUM(cast->depth);
2575
+
2576
+ // value
2577
+ argv[2] = rb_ary_pop(value_stack);
2578
+
2579
+ // name_loc
2580
+ argv[3] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2581
+
2582
+ // operator_loc
2583
+ argv[4] = cast->operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2584
+
2585
+ // location
2586
+ argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
2587
+
2588
+ rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPLocalVariableWriteNode));
2589
+ break;
2590
+ }
2591
+ #line 137 "api_node.c.erb"
2592
+ case YP_NODE_MATCH_PREDICATE_NODE: {
2593
+ yp_match_predicate_node_t *cast = (yp_match_predicate_node_t *) node;
2594
+ VALUE argv[4];
2595
+
2596
+ // value
2597
+ argv[0] = rb_ary_pop(value_stack);
2598
+
2599
+ // pattern
2600
+ argv[1] = rb_ary_pop(value_stack);
2601
+
2602
+ // operator_loc
2603
+ argv[2] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2604
+
2605
+ // location
2606
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2607
+
2608
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPMatchPredicateNode));
2609
+ break;
2610
+ }
2611
+ #line 137 "api_node.c.erb"
2612
+ case YP_NODE_MATCH_REQUIRED_NODE: {
2613
+ yp_match_required_node_t *cast = (yp_match_required_node_t *) node;
2614
+ VALUE argv[4];
2615
+
2616
+ // value
2617
+ argv[0] = rb_ary_pop(value_stack);
2618
+
2619
+ // pattern
2620
+ argv[1] = rb_ary_pop(value_stack);
2621
+
2622
+ // operator_loc
2623
+ argv[2] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2624
+
2625
+ // location
2626
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2627
+
2628
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPMatchRequiredNode));
2629
+ break;
2630
+ }
2631
+ #line 137 "api_node.c.erb"
2632
+ case YP_NODE_MISSING_NODE: {
2633
+ VALUE argv[1];
2634
+
2635
+ // location
2636
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
2637
+
2638
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPMissingNode));
2639
+ break;
2640
+ }
2641
+ #line 137 "api_node.c.erb"
2642
+ case YP_NODE_MODULE_NODE: {
2643
+ yp_module_node_t *cast = (yp_module_node_t *) node;
2644
+ VALUE argv[6];
2645
+
2646
+ // locals
2647
+ argv[0] = rb_ary_new();
2648
+ for (size_t index = 0; index < cast->locals.size; index++) {
2649
+ rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
2650
+ }
2651
+
2652
+ // module_keyword_loc
2653
+ argv[1] = yp_location_new(parser, cast->module_keyword_loc.start, cast->module_keyword_loc.end, source);
2654
+
2655
+ // constant_path
2656
+ argv[2] = rb_ary_pop(value_stack);
2657
+
2658
+ // statements
2659
+ argv[3] = rb_ary_pop(value_stack);
2660
+
2661
+ // end_keyword_loc
2662
+ argv[4] = yp_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
2663
+
2664
+ // location
2665
+ argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
2666
+
2667
+ rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPModuleNode));
2668
+ break;
2669
+ }
2670
+ #line 137 "api_node.c.erb"
2671
+ case YP_NODE_MULTI_WRITE_NODE: {
2672
+ yp_multi_write_node_t *cast = (yp_multi_write_node_t *) node;
2673
+ VALUE argv[6];
2674
+
2675
+ // targets
2676
+ argv[0] = rb_ary_new();
2677
+ for (size_t index = 0; index < cast->targets.size; index++) {
2678
+ rb_ary_push(argv[0], rb_ary_pop(value_stack));
2679
+ }
2680
+
2681
+ // operator_loc
2682
+ argv[1] = cast->operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2683
+
2684
+ // value
2685
+ argv[2] = rb_ary_pop(value_stack);
2686
+
2687
+ // lparen_loc
2688
+ argv[3] = cast->lparen_loc.start == NULL ? Qnil : yp_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source);
2689
+
2690
+ // rparen_loc
2691
+ argv[4] = cast->rparen_loc.start == NULL ? Qnil : yp_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source);
2692
+
2693
+ // location
2694
+ argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
2695
+
2696
+ rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPMultiWriteNode));
2697
+ break;
2698
+ }
2699
+ #line 137 "api_node.c.erb"
2700
+ case YP_NODE_NEXT_NODE: {
2701
+ yp_next_node_t *cast = (yp_next_node_t *) node;
2702
+ VALUE argv[3];
2703
+
2704
+ // arguments
2705
+ argv[0] = rb_ary_pop(value_stack);
2706
+
2707
+ // keyword_loc
2708
+ argv[1] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
2709
+
2710
+ // location
2711
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
2712
+
2713
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPNextNode));
2714
+ break;
2715
+ }
2716
+ #line 137 "api_node.c.erb"
2717
+ case YP_NODE_NIL_NODE: {
2718
+ VALUE argv[1];
2719
+
2720
+ // location
2721
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
2722
+
2723
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPNilNode));
2724
+ break;
2725
+ }
2726
+ #line 137 "api_node.c.erb"
2727
+ case YP_NODE_NO_KEYWORDS_PARAMETER_NODE: {
2728
+ yp_no_keywords_parameter_node_t *cast = (yp_no_keywords_parameter_node_t *) node;
2729
+ VALUE argv[3];
2730
+
2731
+ // operator_loc
2732
+ argv[0] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2733
+
2734
+ // keyword_loc
2735
+ argv[1] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
2736
+
2737
+ // location
2738
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
2739
+
2740
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPNoKeywordsParameterNode));
2741
+ break;
2742
+ }
2743
+ #line 137 "api_node.c.erb"
2744
+ case YP_NODE_NUMBERED_REFERENCE_READ_NODE: {
2745
+ VALUE argv[1];
2746
+
2747
+ // location
2748
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
2749
+
2750
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPNumberedReferenceReadNode));
2751
+ break;
2752
+ }
2753
+ #line 137 "api_node.c.erb"
2754
+ case YP_NODE_OPTIONAL_PARAMETER_NODE: {
2755
+ yp_optional_parameter_node_t *cast = (yp_optional_parameter_node_t *) node;
2756
+ VALUE argv[5];
2757
+
2758
+ // constant_id
2759
+ argv[0] = rb_id2sym(constants[cast->constant_id - 1]);
2760
+
2761
+ // name_loc
2762
+ argv[1] = yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
2763
+
2764
+ // operator_loc
2765
+ argv[2] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2766
+
2767
+ // value
2768
+ argv[3] = rb_ary_pop(value_stack);
2769
+
2770
+ // location
2771
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2772
+
2773
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPOptionalParameterNode));
2774
+ break;
2775
+ }
2776
+ #line 137 "api_node.c.erb"
2777
+ case YP_NODE_OR_NODE: {
2778
+ yp_or_node_t *cast = (yp_or_node_t *) node;
2779
+ VALUE argv[4];
2780
+
2781
+ // left
2782
+ argv[0] = rb_ary_pop(value_stack);
2783
+
2784
+ // right
2785
+ argv[1] = rb_ary_pop(value_stack);
2786
+
2787
+ // operator_loc
2788
+ argv[2] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2789
+
2790
+ // location
2791
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2792
+
2793
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPOrNode));
2794
+ break;
2795
+ }
2796
+ #line 137 "api_node.c.erb"
2797
+ case YP_NODE_PARAMETERS_NODE: {
2798
+ yp_parameters_node_t *cast = (yp_parameters_node_t *) node;
2799
+ VALUE argv[8];
2800
+
2801
+ // requireds
2802
+ argv[0] = rb_ary_new();
2803
+ for (size_t index = 0; index < cast->requireds.size; index++) {
2804
+ rb_ary_push(argv[0], rb_ary_pop(value_stack));
2805
+ }
2806
+
2807
+ // optionals
2808
+ argv[1] = rb_ary_new();
2809
+ for (size_t index = 0; index < cast->optionals.size; index++) {
2810
+ rb_ary_push(argv[1], rb_ary_pop(value_stack));
2811
+ }
2812
+
2813
+ // posts
2814
+ argv[2] = rb_ary_new();
2815
+ for (size_t index = 0; index < cast->posts.size; index++) {
2816
+ rb_ary_push(argv[2], rb_ary_pop(value_stack));
2817
+ }
2818
+
2819
+ // rest
2820
+ argv[3] = rb_ary_pop(value_stack);
2821
+
2822
+ // keywords
2823
+ argv[4] = rb_ary_new();
2824
+ for (size_t index = 0; index < cast->keywords.size; index++) {
2825
+ rb_ary_push(argv[4], rb_ary_pop(value_stack));
2826
+ }
2827
+
2828
+ // keyword_rest
2829
+ argv[5] = rb_ary_pop(value_stack);
2830
+
2831
+ // block
2832
+ argv[6] = rb_ary_pop(value_stack);
2833
+
2834
+ // location
2835
+ argv[7] = yp_location_new(parser, node->location.start, node->location.end, source);
2836
+
2837
+ rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cYARPParametersNode));
2838
+ break;
2839
+ }
2840
+ #line 137 "api_node.c.erb"
2841
+ case YP_NODE_PARENTHESES_NODE: {
2842
+ yp_parentheses_node_t *cast = (yp_parentheses_node_t *) node;
2843
+ VALUE argv[4];
2844
+
2845
+ // statements
2846
+ argv[0] = rb_ary_pop(value_stack);
2847
+
2848
+ // opening_loc
2849
+ argv[1] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2850
+
2851
+ // closing_loc
2852
+ argv[2] = yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
2853
+
2854
+ // location
2855
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
2856
+
2857
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPParenthesesNode));
2858
+ break;
2859
+ }
2860
+ #line 137 "api_node.c.erb"
2861
+ case YP_NODE_PINNED_EXPRESSION_NODE: {
2862
+ yp_pinned_expression_node_t *cast = (yp_pinned_expression_node_t *) node;
2863
+ VALUE argv[5];
2864
+
2865
+ // expression
2866
+ argv[0] = rb_ary_pop(value_stack);
2867
+
2868
+ // operator_loc
2869
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2870
+
2871
+ // lparen_loc
2872
+ argv[2] = yp_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source);
2873
+
2874
+ // rparen_loc
2875
+ argv[3] = yp_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source);
2876
+
2877
+ // location
2878
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2879
+
2880
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPPinnedExpressionNode));
2881
+ break;
2882
+ }
2883
+ #line 137 "api_node.c.erb"
2884
+ case YP_NODE_PINNED_VARIABLE_NODE: {
2885
+ yp_pinned_variable_node_t *cast = (yp_pinned_variable_node_t *) node;
2886
+ VALUE argv[3];
2887
+
2888
+ // variable
2889
+ argv[0] = rb_ary_pop(value_stack);
2890
+
2891
+ // operator_loc
2892
+ argv[1] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2893
+
2894
+ // location
2895
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
2896
+
2897
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPPinnedVariableNode));
2898
+ break;
2899
+ }
2900
+ #line 137 "api_node.c.erb"
2901
+ case YP_NODE_POST_EXECUTION_NODE: {
2902
+ yp_post_execution_node_t *cast = (yp_post_execution_node_t *) node;
2903
+ VALUE argv[5];
2904
+
2905
+ // statements
2906
+ argv[0] = rb_ary_pop(value_stack);
2907
+
2908
+ // keyword_loc
2909
+ argv[1] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
2910
+
2911
+ // opening_loc
2912
+ argv[2] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2913
+
2914
+ // closing_loc
2915
+ argv[3] = yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
2916
+
2917
+ // location
2918
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2919
+
2920
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPPostExecutionNode));
2921
+ break;
2922
+ }
2923
+ #line 137 "api_node.c.erb"
2924
+ case YP_NODE_PRE_EXECUTION_NODE: {
2925
+ yp_pre_execution_node_t *cast = (yp_pre_execution_node_t *) node;
2926
+ VALUE argv[5];
2927
+
2928
+ // statements
2929
+ argv[0] = rb_ary_pop(value_stack);
2930
+
2931
+ // keyword_loc
2932
+ argv[1] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
2933
+
2934
+ // opening_loc
2935
+ argv[2] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
2936
+
2937
+ // closing_loc
2938
+ argv[3] = yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
2939
+
2940
+ // location
2941
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2942
+
2943
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPPreExecutionNode));
2944
+ break;
2945
+ }
2946
+ #line 137 "api_node.c.erb"
2947
+ case YP_NODE_PROGRAM_NODE: {
2948
+ yp_program_node_t *cast = (yp_program_node_t *) node;
2949
+ VALUE argv[3];
2950
+
2951
+ // locals
2952
+ argv[0] = rb_ary_new();
2953
+ for (size_t index = 0; index < cast->locals.size; index++) {
2954
+ rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
2955
+ }
2956
+
2957
+ // statements
2958
+ argv[1] = rb_ary_pop(value_stack);
2959
+
2960
+ // location
2961
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
2962
+
2963
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPProgramNode));
2964
+ break;
2965
+ }
2966
+ #line 137 "api_node.c.erb"
2967
+ case YP_NODE_RANGE_NODE: {
2968
+ yp_range_node_t *cast = (yp_range_node_t *) node;
2969
+ VALUE argv[5];
2970
+
2971
+ // left
2972
+ argv[0] = rb_ary_pop(value_stack);
2973
+
2974
+ // right
2975
+ argv[1] = rb_ary_pop(value_stack);
2976
+
2977
+ // operator_loc
2978
+ argv[2] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
2979
+
2980
+ // flags
2981
+ argv[3] = ULONG2NUM(cast->flags);
2982
+
2983
+ // location
2984
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
2985
+
2986
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPRangeNode));
2987
+ break;
2988
+ }
2989
+ #line 137 "api_node.c.erb"
2990
+ case YP_NODE_RATIONAL_NODE: {
2991
+ VALUE argv[2];
2992
+
2993
+ // numeric
2994
+ argv[0] = rb_ary_pop(value_stack);
2995
+
2996
+ // location
2997
+ argv[1] = yp_location_new(parser, node->location.start, node->location.end, source);
2998
+
2999
+ rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cYARPRationalNode));
3000
+ break;
3001
+ }
3002
+ #line 137 "api_node.c.erb"
3003
+ case YP_NODE_REDO_NODE: {
3004
+ VALUE argv[1];
3005
+
3006
+ // location
3007
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
3008
+
3009
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPRedoNode));
3010
+ break;
3011
+ }
3012
+ #line 137 "api_node.c.erb"
3013
+ case YP_NODE_REGULAR_EXPRESSION_NODE: {
3014
+ yp_regular_expression_node_t *cast = (yp_regular_expression_node_t *) node;
3015
+ VALUE argv[6];
3016
+
3017
+ // opening_loc
3018
+ argv[0] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
3019
+
3020
+ // content_loc
3021
+ argv[1] = yp_location_new(parser, cast->content_loc.start, cast->content_loc.end, source);
3022
+
3023
+ // closing_loc
3024
+ argv[2] = yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3025
+
3026
+ // unescaped
3027
+ argv[3] = yp_string_new(&cast->unescaped, encoding);
3028
+
3029
+ // flags
3030
+ argv[4] = ULONG2NUM(cast->flags);
3031
+
3032
+ // location
3033
+ argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
3034
+
3035
+ rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPRegularExpressionNode));
3036
+ break;
3037
+ }
3038
+ #line 137 "api_node.c.erb"
3039
+ case YP_NODE_REQUIRED_DESTRUCTURED_PARAMETER_NODE: {
3040
+ yp_required_destructured_parameter_node_t *cast = (yp_required_destructured_parameter_node_t *) node;
3041
+ VALUE argv[4];
3042
+
3043
+ // parameters
3044
+ argv[0] = rb_ary_new();
3045
+ for (size_t index = 0; index < cast->parameters.size; index++) {
3046
+ rb_ary_push(argv[0], rb_ary_pop(value_stack));
3047
+ }
3048
+
3049
+ // opening_loc
3050
+ argv[1] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
3051
+
3052
+ // closing_loc
3053
+ argv[2] = yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3054
+
3055
+ // location
3056
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
3057
+
3058
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPRequiredDestructuredParameterNode));
3059
+ break;
3060
+ }
3061
+ #line 137 "api_node.c.erb"
3062
+ case YP_NODE_REQUIRED_PARAMETER_NODE: {
3063
+ yp_required_parameter_node_t *cast = (yp_required_parameter_node_t *) node;
3064
+ VALUE argv[2];
3065
+
3066
+ // constant_id
3067
+ argv[0] = rb_id2sym(constants[cast->constant_id - 1]);
3068
+
3069
+ // location
3070
+ argv[1] = yp_location_new(parser, node->location.start, node->location.end, source);
3071
+
3072
+ rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cYARPRequiredParameterNode));
3073
+ break;
3074
+ }
3075
+ #line 137 "api_node.c.erb"
3076
+ case YP_NODE_RESCUE_MODIFIER_NODE: {
3077
+ yp_rescue_modifier_node_t *cast = (yp_rescue_modifier_node_t *) node;
3078
+ VALUE argv[4];
3079
+
3080
+ // expression
3081
+ argv[0] = rb_ary_pop(value_stack);
3082
+
3083
+ // keyword_loc
3084
+ argv[1] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
3085
+
3086
+ // rescue_expression
3087
+ argv[2] = rb_ary_pop(value_stack);
3088
+
3089
+ // location
3090
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
3091
+
3092
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPRescueModifierNode));
3093
+ break;
3094
+ }
3095
+ #line 137 "api_node.c.erb"
3096
+ case YP_NODE_RESCUE_NODE: {
3097
+ yp_rescue_node_t *cast = (yp_rescue_node_t *) node;
3098
+ VALUE argv[7];
3099
+
3100
+ // keyword_loc
3101
+ argv[0] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
3102
+
3103
+ // exceptions
3104
+ argv[1] = rb_ary_new();
3105
+ for (size_t index = 0; index < cast->exceptions.size; index++) {
3106
+ rb_ary_push(argv[1], rb_ary_pop(value_stack));
3107
+ }
3108
+
3109
+ // operator_loc
3110
+ argv[2] = cast->operator_loc.start == NULL ? Qnil : yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3111
+
3112
+ // reference
3113
+ argv[3] = rb_ary_pop(value_stack);
3114
+
3115
+ // statements
3116
+ argv[4] = rb_ary_pop(value_stack);
3117
+
3118
+ // consequent
3119
+ argv[5] = rb_ary_pop(value_stack);
3120
+
3121
+ // location
3122
+ argv[6] = yp_location_new(parser, node->location.start, node->location.end, source);
3123
+
3124
+ rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cYARPRescueNode));
3125
+ break;
3126
+ }
3127
+ #line 137 "api_node.c.erb"
3128
+ case YP_NODE_REST_PARAMETER_NODE: {
3129
+ yp_rest_parameter_node_t *cast = (yp_rest_parameter_node_t *) node;
3130
+ VALUE argv[3];
3131
+
3132
+ // operator_loc
3133
+ argv[0] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3134
+
3135
+ // name_loc
3136
+ argv[1] = cast->name_loc.start == NULL ? Qnil : yp_location_new(parser, cast->name_loc.start, cast->name_loc.end, source);
3137
+
3138
+ // location
3139
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
3140
+
3141
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPRestParameterNode));
3142
+ break;
3143
+ }
3144
+ #line 137 "api_node.c.erb"
3145
+ case YP_NODE_RETRY_NODE: {
3146
+ VALUE argv[1];
3147
+
3148
+ // location
3149
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
3150
+
3151
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPRetryNode));
3152
+ break;
3153
+ }
3154
+ #line 137 "api_node.c.erb"
3155
+ case YP_NODE_RETURN_NODE: {
3156
+ yp_return_node_t *cast = (yp_return_node_t *) node;
3157
+ VALUE argv[3];
3158
+
3159
+ // keyword_loc
3160
+ argv[0] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
3161
+
3162
+ // arguments
3163
+ argv[1] = rb_ary_pop(value_stack);
3164
+
3165
+ // location
3166
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
3167
+
3168
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPReturnNode));
3169
+ break;
3170
+ }
3171
+ #line 137 "api_node.c.erb"
3172
+ case YP_NODE_SELF_NODE: {
3173
+ VALUE argv[1];
3174
+
3175
+ // location
3176
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
3177
+
3178
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPSelfNode));
3179
+ break;
3180
+ }
3181
+ #line 137 "api_node.c.erb"
3182
+ case YP_NODE_SINGLETON_CLASS_NODE: {
3183
+ yp_singleton_class_node_t *cast = (yp_singleton_class_node_t *) node;
3184
+ VALUE argv[7];
3185
+
3186
+ // locals
3187
+ argv[0] = rb_ary_new();
3188
+ for (size_t index = 0; index < cast->locals.size; index++) {
3189
+ rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
3190
+ }
3191
+
3192
+ // class_keyword_loc
3193
+ argv[1] = yp_location_new(parser, cast->class_keyword_loc.start, cast->class_keyword_loc.end, source);
3194
+
3195
+ // operator_loc
3196
+ argv[2] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3197
+
3198
+ // expression
3199
+ argv[3] = rb_ary_pop(value_stack);
3200
+
3201
+ // statements
3202
+ argv[4] = rb_ary_pop(value_stack);
3203
+
3204
+ // end_keyword_loc
3205
+ argv[5] = yp_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
3206
+
3207
+ // location
3208
+ argv[6] = yp_location_new(parser, node->location.start, node->location.end, source);
3209
+
3210
+ rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cYARPSingletonClassNode));
3211
+ break;
3212
+ }
3213
+ #line 137 "api_node.c.erb"
3214
+ case YP_NODE_SOURCE_ENCODING_NODE: {
3215
+ VALUE argv[1];
3216
+
3217
+ // location
3218
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
3219
+
3220
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPSourceEncodingNode));
3221
+ break;
3222
+ }
3223
+ #line 137 "api_node.c.erb"
3224
+ case YP_NODE_SOURCE_FILE_NODE: {
3225
+ yp_source_file_node_t *cast = (yp_source_file_node_t *) node;
3226
+ VALUE argv[2];
3227
+
3228
+ // filepath
3229
+ argv[0] = yp_string_new(&cast->filepath, encoding);
3230
+
3231
+ // location
3232
+ argv[1] = yp_location_new(parser, node->location.start, node->location.end, source);
3233
+
3234
+ rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cYARPSourceFileNode));
3235
+ break;
3236
+ }
3237
+ #line 137 "api_node.c.erb"
3238
+ case YP_NODE_SOURCE_LINE_NODE: {
3239
+ VALUE argv[1];
3240
+
3241
+ // location
3242
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
3243
+
3244
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPSourceLineNode));
3245
+ break;
3246
+ }
3247
+ #line 137 "api_node.c.erb"
3248
+ case YP_NODE_SPLAT_NODE: {
3249
+ yp_splat_node_t *cast = (yp_splat_node_t *) node;
3250
+ VALUE argv[3];
3251
+
3252
+ // operator_loc
3253
+ argv[0] = yp_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
3254
+
3255
+ // expression
3256
+ argv[1] = rb_ary_pop(value_stack);
3257
+
3258
+ // location
3259
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
3260
+
3261
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPSplatNode));
3262
+ break;
3263
+ }
3264
+ #line 137 "api_node.c.erb"
3265
+ case YP_NODE_STATEMENTS_NODE: {
3266
+ yp_statements_node_t *cast = (yp_statements_node_t *) node;
3267
+ VALUE argv[2];
3268
+
3269
+ // body
3270
+ argv[0] = rb_ary_new();
3271
+ for (size_t index = 0; index < cast->body.size; index++) {
3272
+ rb_ary_push(argv[0], rb_ary_pop(value_stack));
3273
+ }
3274
+
3275
+ // location
3276
+ argv[1] = yp_location_new(parser, node->location.start, node->location.end, source);
3277
+
3278
+ rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cYARPStatementsNode));
3279
+ break;
3280
+ }
3281
+ #line 137 "api_node.c.erb"
3282
+ case YP_NODE_STRING_CONCAT_NODE: {
3283
+ VALUE argv[3];
3284
+
3285
+ // left
3286
+ argv[0] = rb_ary_pop(value_stack);
3287
+
3288
+ // right
3289
+ argv[1] = rb_ary_pop(value_stack);
3290
+
3291
+ // location
3292
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
3293
+
3294
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPStringConcatNode));
3295
+ break;
3296
+ }
3297
+ #line 137 "api_node.c.erb"
3298
+ case YP_NODE_STRING_NODE: {
3299
+ yp_string_node_t *cast = (yp_string_node_t *) node;
3300
+ VALUE argv[5];
3301
+
3302
+ // opening_loc
3303
+ argv[0] = cast->opening_loc.start == NULL ? Qnil : yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
3304
+
3305
+ // content_loc
3306
+ argv[1] = yp_location_new(parser, cast->content_loc.start, cast->content_loc.end, source);
3307
+
3308
+ // closing_loc
3309
+ argv[2] = cast->closing_loc.start == NULL ? Qnil : yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3310
+
3311
+ // unescaped
3312
+ argv[3] = yp_string_new(&cast->unescaped, encoding);
3313
+
3314
+ // location
3315
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
3316
+
3317
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPStringNode));
3318
+ break;
3319
+ }
3320
+ #line 137 "api_node.c.erb"
3321
+ case YP_NODE_SUPER_NODE: {
3322
+ yp_super_node_t *cast = (yp_super_node_t *) node;
3323
+ VALUE argv[6];
3324
+
3325
+ // keyword_loc
3326
+ argv[0] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
3327
+
3328
+ // lparen_loc
3329
+ argv[1] = cast->lparen_loc.start == NULL ? Qnil : yp_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source);
3330
+
3331
+ // arguments
3332
+ argv[2] = rb_ary_pop(value_stack);
3333
+
3334
+ // rparen_loc
3335
+ argv[3] = cast->rparen_loc.start == NULL ? Qnil : yp_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source);
3336
+
3337
+ // block
3338
+ argv[4] = rb_ary_pop(value_stack);
3339
+
3340
+ // location
3341
+ argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
3342
+
3343
+ rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPSuperNode));
3344
+ break;
3345
+ }
3346
+ #line 137 "api_node.c.erb"
3347
+ case YP_NODE_SYMBOL_NODE: {
3348
+ yp_symbol_node_t *cast = (yp_symbol_node_t *) node;
3349
+ VALUE argv[5];
3350
+
3351
+ // opening_loc
3352
+ argv[0] = cast->opening_loc.start == NULL ? Qnil : yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
3353
+
3354
+ // value_loc
3355
+ argv[1] = yp_location_new(parser, cast->value_loc.start, cast->value_loc.end, source);
3356
+
3357
+ // closing_loc
3358
+ argv[2] = cast->closing_loc.start == NULL ? Qnil : yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3359
+
3360
+ // unescaped
3361
+ argv[3] = yp_string_new(&cast->unescaped, encoding);
3362
+
3363
+ // location
3364
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
3365
+
3366
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPSymbolNode));
3367
+ break;
3368
+ }
3369
+ #line 137 "api_node.c.erb"
3370
+ case YP_NODE_TRUE_NODE: {
3371
+ VALUE argv[1];
3372
+
3373
+ // location
3374
+ argv[0] = yp_location_new(parser, node->location.start, node->location.end, source);
3375
+
3376
+ rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cYARPTrueNode));
3377
+ break;
3378
+ }
3379
+ #line 137 "api_node.c.erb"
3380
+ case YP_NODE_UNDEF_NODE: {
3381
+ yp_undef_node_t *cast = (yp_undef_node_t *) node;
3382
+ VALUE argv[3];
3383
+
3384
+ // names
3385
+ argv[0] = rb_ary_new();
3386
+ for (size_t index = 0; index < cast->names.size; index++) {
3387
+ rb_ary_push(argv[0], rb_ary_pop(value_stack));
3388
+ }
3389
+
3390
+ // keyword_loc
3391
+ argv[1] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
3392
+
3393
+ // location
3394
+ argv[2] = yp_location_new(parser, node->location.start, node->location.end, source);
3395
+
3396
+ rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cYARPUndefNode));
3397
+ break;
3398
+ }
3399
+ #line 137 "api_node.c.erb"
3400
+ case YP_NODE_UNLESS_NODE: {
3401
+ yp_unless_node_t *cast = (yp_unless_node_t *) node;
3402
+ VALUE argv[6];
3403
+
3404
+ // keyword_loc
3405
+ argv[0] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
3406
+
3407
+ // predicate
3408
+ argv[1] = rb_ary_pop(value_stack);
3409
+
3410
+ // statements
3411
+ argv[2] = rb_ary_pop(value_stack);
3412
+
3413
+ // consequent
3414
+ argv[3] = rb_ary_pop(value_stack);
3415
+
3416
+ // end_keyword_loc
3417
+ argv[4] = cast->end_keyword_loc.start == NULL ? Qnil : yp_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
3418
+
3419
+ // location
3420
+ argv[5] = yp_location_new(parser, node->location.start, node->location.end, source);
3421
+
3422
+ rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cYARPUnlessNode));
3423
+ break;
3424
+ }
3425
+ #line 137 "api_node.c.erb"
3426
+ case YP_NODE_UNTIL_NODE: {
3427
+ yp_until_node_t *cast = (yp_until_node_t *) node;
3428
+ VALUE argv[5];
3429
+
3430
+ // keyword_loc
3431
+ argv[0] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
3432
+
3433
+ // predicate
3434
+ argv[1] = rb_ary_pop(value_stack);
3435
+
3436
+ // statements
3437
+ argv[2] = rb_ary_pop(value_stack);
3438
+
3439
+ // flags
3440
+ argv[3] = ULONG2NUM(cast->flags);
3441
+
3442
+ // location
3443
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
3444
+
3445
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPUntilNode));
3446
+ break;
3447
+ }
3448
+ #line 137 "api_node.c.erb"
3449
+ case YP_NODE_WHEN_NODE: {
3450
+ yp_when_node_t *cast = (yp_when_node_t *) node;
3451
+ VALUE argv[4];
3452
+
3453
+ // keyword_loc
3454
+ argv[0] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
3455
+
3456
+ // conditions
3457
+ argv[1] = rb_ary_new();
3458
+ for (size_t index = 0; index < cast->conditions.size; index++) {
3459
+ rb_ary_push(argv[1], rb_ary_pop(value_stack));
3460
+ }
3461
+
3462
+ // statements
3463
+ argv[2] = rb_ary_pop(value_stack);
3464
+
3465
+ // location
3466
+ argv[3] = yp_location_new(parser, node->location.start, node->location.end, source);
3467
+
3468
+ rb_ary_push(value_stack, rb_class_new_instance(4, argv, rb_cYARPWhenNode));
3469
+ break;
3470
+ }
3471
+ #line 137 "api_node.c.erb"
3472
+ case YP_NODE_WHILE_NODE: {
3473
+ yp_while_node_t *cast = (yp_while_node_t *) node;
3474
+ VALUE argv[5];
3475
+
3476
+ // keyword_loc
3477
+ argv[0] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
3478
+
3479
+ // predicate
3480
+ argv[1] = rb_ary_pop(value_stack);
3481
+
3482
+ // statements
3483
+ argv[2] = rb_ary_pop(value_stack);
3484
+
3485
+ // flags
3486
+ argv[3] = ULONG2NUM(cast->flags);
3487
+
3488
+ // location
3489
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
3490
+
3491
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPWhileNode));
3492
+ break;
3493
+ }
3494
+ #line 137 "api_node.c.erb"
3495
+ case YP_NODE_X_STRING_NODE: {
3496
+ yp_x_string_node_t *cast = (yp_x_string_node_t *) node;
3497
+ VALUE argv[5];
3498
+
3499
+ // opening_loc
3500
+ argv[0] = yp_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
3501
+
3502
+ // content_loc
3503
+ argv[1] = yp_location_new(parser, cast->content_loc.start, cast->content_loc.end, source);
3504
+
3505
+ // closing_loc
3506
+ argv[2] = yp_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
3507
+
3508
+ // unescaped
3509
+ argv[3] = yp_string_new(&cast->unescaped, encoding);
3510
+
3511
+ // location
3512
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
3513
+
3514
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPXStringNode));
3515
+ break;
3516
+ }
3517
+ #line 137 "api_node.c.erb"
3518
+ case YP_NODE_YIELD_NODE: {
3519
+ yp_yield_node_t *cast = (yp_yield_node_t *) node;
3520
+ VALUE argv[5];
3521
+
3522
+ // keyword_loc
3523
+ argv[0] = yp_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
3524
+
3525
+ // lparen_loc
3526
+ argv[1] = cast->lparen_loc.start == NULL ? Qnil : yp_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source);
3527
+
3528
+ // arguments
3529
+ argv[2] = rb_ary_pop(value_stack);
3530
+
3531
+ // rparen_loc
3532
+ argv[3] = cast->rparen_loc.start == NULL ? Qnil : yp_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source);
3533
+
3534
+ // location
3535
+ argv[4] = yp_location_new(parser, node->location.start, node->location.end, source);
3536
+
3537
+ rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cYARPYieldNode));
3538
+ break;
3539
+ }
3540
+ default:
3541
+ rb_raise(rb_eRuntimeError, "unknown node type: %d", YP_NODE_TYPE(node));
3542
+ }
3543
+ }
3544
+ }
3545
+
3546
+ VALUE result = rb_ary_pop(value_stack);
3547
+ free(constants);
3548
+ return result;
3549
+ }
3550
+
3551
+ void
3552
+ Init_yarp_api_node(void) {
3553
+ rb_cYARPAliasNode = rb_define_class_under(rb_cYARP, "AliasNode", rb_cYARPNode);
3554
+ rb_cYARPAlternationPatternNode = rb_define_class_under(rb_cYARP, "AlternationPatternNode", rb_cYARPNode);
3555
+ rb_cYARPAndNode = rb_define_class_under(rb_cYARP, "AndNode", rb_cYARPNode);
3556
+ rb_cYARPArgumentsNode = rb_define_class_under(rb_cYARP, "ArgumentsNode", rb_cYARPNode);
3557
+ rb_cYARPArrayNode = rb_define_class_under(rb_cYARP, "ArrayNode", rb_cYARPNode);
3558
+ rb_cYARPArrayPatternNode = rb_define_class_under(rb_cYARP, "ArrayPatternNode", rb_cYARPNode);
3559
+ rb_cYARPAssocNode = rb_define_class_under(rb_cYARP, "AssocNode", rb_cYARPNode);
3560
+ rb_cYARPAssocSplatNode = rb_define_class_under(rb_cYARP, "AssocSplatNode", rb_cYARPNode);
3561
+ rb_cYARPBackReferenceReadNode = rb_define_class_under(rb_cYARP, "BackReferenceReadNode", rb_cYARPNode);
3562
+ rb_cYARPBeginNode = rb_define_class_under(rb_cYARP, "BeginNode", rb_cYARPNode);
3563
+ rb_cYARPBlockArgumentNode = rb_define_class_under(rb_cYARP, "BlockArgumentNode", rb_cYARPNode);
3564
+ rb_cYARPBlockNode = rb_define_class_under(rb_cYARP, "BlockNode", rb_cYARPNode);
3565
+ rb_cYARPBlockParameterNode = rb_define_class_under(rb_cYARP, "BlockParameterNode", rb_cYARPNode);
3566
+ rb_cYARPBlockParametersNode = rb_define_class_under(rb_cYARP, "BlockParametersNode", rb_cYARPNode);
3567
+ rb_cYARPBreakNode = rb_define_class_under(rb_cYARP, "BreakNode", rb_cYARPNode);
3568
+ rb_cYARPCallNode = rb_define_class_under(rb_cYARP, "CallNode", rb_cYARPNode);
3569
+ rb_cYARPCallOperatorAndWriteNode = rb_define_class_under(rb_cYARP, "CallOperatorAndWriteNode", rb_cYARPNode);
3570
+ rb_cYARPCallOperatorOrWriteNode = rb_define_class_under(rb_cYARP, "CallOperatorOrWriteNode", rb_cYARPNode);
3571
+ rb_cYARPCallOperatorWriteNode = rb_define_class_under(rb_cYARP, "CallOperatorWriteNode", rb_cYARPNode);
3572
+ rb_cYARPCapturePatternNode = rb_define_class_under(rb_cYARP, "CapturePatternNode", rb_cYARPNode);
3573
+ rb_cYARPCaseNode = rb_define_class_under(rb_cYARP, "CaseNode", rb_cYARPNode);
3574
+ rb_cYARPClassNode = rb_define_class_under(rb_cYARP, "ClassNode", rb_cYARPNode);
3575
+ rb_cYARPClassVariableOperatorAndWriteNode = rb_define_class_under(rb_cYARP, "ClassVariableOperatorAndWriteNode", rb_cYARPNode);
3576
+ rb_cYARPClassVariableOperatorOrWriteNode = rb_define_class_under(rb_cYARP, "ClassVariableOperatorOrWriteNode", rb_cYARPNode);
3577
+ rb_cYARPClassVariableOperatorWriteNode = rb_define_class_under(rb_cYARP, "ClassVariableOperatorWriteNode", rb_cYARPNode);
3578
+ rb_cYARPClassVariableReadNode = rb_define_class_under(rb_cYARP, "ClassVariableReadNode", rb_cYARPNode);
3579
+ rb_cYARPClassVariableWriteNode = rb_define_class_under(rb_cYARP, "ClassVariableWriteNode", rb_cYARPNode);
3580
+ rb_cYARPConstantOperatorAndWriteNode = rb_define_class_under(rb_cYARP, "ConstantOperatorAndWriteNode", rb_cYARPNode);
3581
+ rb_cYARPConstantOperatorOrWriteNode = rb_define_class_under(rb_cYARP, "ConstantOperatorOrWriteNode", rb_cYARPNode);
3582
+ rb_cYARPConstantOperatorWriteNode = rb_define_class_under(rb_cYARP, "ConstantOperatorWriteNode", rb_cYARPNode);
3583
+ rb_cYARPConstantPathNode = rb_define_class_under(rb_cYARP, "ConstantPathNode", rb_cYARPNode);
3584
+ rb_cYARPConstantPathOperatorAndWriteNode = rb_define_class_under(rb_cYARP, "ConstantPathOperatorAndWriteNode", rb_cYARPNode);
3585
+ rb_cYARPConstantPathOperatorOrWriteNode = rb_define_class_under(rb_cYARP, "ConstantPathOperatorOrWriteNode", rb_cYARPNode);
3586
+ rb_cYARPConstantPathOperatorWriteNode = rb_define_class_under(rb_cYARP, "ConstantPathOperatorWriteNode", rb_cYARPNode);
3587
+ rb_cYARPConstantPathWriteNode = rb_define_class_under(rb_cYARP, "ConstantPathWriteNode", rb_cYARPNode);
3588
+ rb_cYARPConstantReadNode = rb_define_class_under(rb_cYARP, "ConstantReadNode", rb_cYARPNode);
3589
+ rb_cYARPConstantWriteNode = rb_define_class_under(rb_cYARP, "ConstantWriteNode", rb_cYARPNode);
3590
+ rb_cYARPDefNode = rb_define_class_under(rb_cYARP, "DefNode", rb_cYARPNode);
3591
+ rb_cYARPDefinedNode = rb_define_class_under(rb_cYARP, "DefinedNode", rb_cYARPNode);
3592
+ rb_cYARPElseNode = rb_define_class_under(rb_cYARP, "ElseNode", rb_cYARPNode);
3593
+ rb_cYARPEmbeddedStatementsNode = rb_define_class_under(rb_cYARP, "EmbeddedStatementsNode", rb_cYARPNode);
3594
+ rb_cYARPEmbeddedVariableNode = rb_define_class_under(rb_cYARP, "EmbeddedVariableNode", rb_cYARPNode);
3595
+ rb_cYARPEnsureNode = rb_define_class_under(rb_cYARP, "EnsureNode", rb_cYARPNode);
3596
+ rb_cYARPFalseNode = rb_define_class_under(rb_cYARP, "FalseNode", rb_cYARPNode);
3597
+ rb_cYARPFindPatternNode = rb_define_class_under(rb_cYARP, "FindPatternNode", rb_cYARPNode);
3598
+ rb_cYARPFloatNode = rb_define_class_under(rb_cYARP, "FloatNode", rb_cYARPNode);
3599
+ rb_cYARPForNode = rb_define_class_under(rb_cYARP, "ForNode", rb_cYARPNode);
3600
+ rb_cYARPForwardingArgumentsNode = rb_define_class_under(rb_cYARP, "ForwardingArgumentsNode", rb_cYARPNode);
3601
+ rb_cYARPForwardingParameterNode = rb_define_class_under(rb_cYARP, "ForwardingParameterNode", rb_cYARPNode);
3602
+ rb_cYARPForwardingSuperNode = rb_define_class_under(rb_cYARP, "ForwardingSuperNode", rb_cYARPNode);
3603
+ rb_cYARPGlobalVariableOperatorAndWriteNode = rb_define_class_under(rb_cYARP, "GlobalVariableOperatorAndWriteNode", rb_cYARPNode);
3604
+ rb_cYARPGlobalVariableOperatorOrWriteNode = rb_define_class_under(rb_cYARP, "GlobalVariableOperatorOrWriteNode", rb_cYARPNode);
3605
+ rb_cYARPGlobalVariableOperatorWriteNode = rb_define_class_under(rb_cYARP, "GlobalVariableOperatorWriteNode", rb_cYARPNode);
3606
+ rb_cYARPGlobalVariableReadNode = rb_define_class_under(rb_cYARP, "GlobalVariableReadNode", rb_cYARPNode);
3607
+ rb_cYARPGlobalVariableWriteNode = rb_define_class_under(rb_cYARP, "GlobalVariableWriteNode", rb_cYARPNode);
3608
+ rb_cYARPHashNode = rb_define_class_under(rb_cYARP, "HashNode", rb_cYARPNode);
3609
+ rb_cYARPHashPatternNode = rb_define_class_under(rb_cYARP, "HashPatternNode", rb_cYARPNode);
3610
+ rb_cYARPIfNode = rb_define_class_under(rb_cYARP, "IfNode", rb_cYARPNode);
3611
+ rb_cYARPImaginaryNode = rb_define_class_under(rb_cYARP, "ImaginaryNode", rb_cYARPNode);
3612
+ rb_cYARPInNode = rb_define_class_under(rb_cYARP, "InNode", rb_cYARPNode);
3613
+ rb_cYARPInstanceVariableOperatorAndWriteNode = rb_define_class_under(rb_cYARP, "InstanceVariableOperatorAndWriteNode", rb_cYARPNode);
3614
+ rb_cYARPInstanceVariableOperatorOrWriteNode = rb_define_class_under(rb_cYARP, "InstanceVariableOperatorOrWriteNode", rb_cYARPNode);
3615
+ rb_cYARPInstanceVariableOperatorWriteNode = rb_define_class_under(rb_cYARP, "InstanceVariableOperatorWriteNode", rb_cYARPNode);
3616
+ rb_cYARPInstanceVariableReadNode = rb_define_class_under(rb_cYARP, "InstanceVariableReadNode", rb_cYARPNode);
3617
+ rb_cYARPInstanceVariableWriteNode = rb_define_class_under(rb_cYARP, "InstanceVariableWriteNode", rb_cYARPNode);
3618
+ rb_cYARPIntegerNode = rb_define_class_under(rb_cYARP, "IntegerNode", rb_cYARPNode);
3619
+ rb_cYARPInterpolatedRegularExpressionNode = rb_define_class_under(rb_cYARP, "InterpolatedRegularExpressionNode", rb_cYARPNode);
3620
+ rb_cYARPInterpolatedStringNode = rb_define_class_under(rb_cYARP, "InterpolatedStringNode", rb_cYARPNode);
3621
+ rb_cYARPInterpolatedSymbolNode = rb_define_class_under(rb_cYARP, "InterpolatedSymbolNode", rb_cYARPNode);
3622
+ rb_cYARPInterpolatedXStringNode = rb_define_class_under(rb_cYARP, "InterpolatedXStringNode", rb_cYARPNode);
3623
+ rb_cYARPKeywordHashNode = rb_define_class_under(rb_cYARP, "KeywordHashNode", rb_cYARPNode);
3624
+ rb_cYARPKeywordParameterNode = rb_define_class_under(rb_cYARP, "KeywordParameterNode", rb_cYARPNode);
3625
+ rb_cYARPKeywordRestParameterNode = rb_define_class_under(rb_cYARP, "KeywordRestParameterNode", rb_cYARPNode);
3626
+ rb_cYARPLambdaNode = rb_define_class_under(rb_cYARP, "LambdaNode", rb_cYARPNode);
3627
+ rb_cYARPLocalVariableOperatorAndWriteNode = rb_define_class_under(rb_cYARP, "LocalVariableOperatorAndWriteNode", rb_cYARPNode);
3628
+ rb_cYARPLocalVariableOperatorOrWriteNode = rb_define_class_under(rb_cYARP, "LocalVariableOperatorOrWriteNode", rb_cYARPNode);
3629
+ rb_cYARPLocalVariableOperatorWriteNode = rb_define_class_under(rb_cYARP, "LocalVariableOperatorWriteNode", rb_cYARPNode);
3630
+ rb_cYARPLocalVariableReadNode = rb_define_class_under(rb_cYARP, "LocalVariableReadNode", rb_cYARPNode);
3631
+ rb_cYARPLocalVariableWriteNode = rb_define_class_under(rb_cYARP, "LocalVariableWriteNode", rb_cYARPNode);
3632
+ rb_cYARPMatchPredicateNode = rb_define_class_under(rb_cYARP, "MatchPredicateNode", rb_cYARPNode);
3633
+ rb_cYARPMatchRequiredNode = rb_define_class_under(rb_cYARP, "MatchRequiredNode", rb_cYARPNode);
3634
+ rb_cYARPMissingNode = rb_define_class_under(rb_cYARP, "MissingNode", rb_cYARPNode);
3635
+ rb_cYARPModuleNode = rb_define_class_under(rb_cYARP, "ModuleNode", rb_cYARPNode);
3636
+ rb_cYARPMultiWriteNode = rb_define_class_under(rb_cYARP, "MultiWriteNode", rb_cYARPNode);
3637
+ rb_cYARPNextNode = rb_define_class_under(rb_cYARP, "NextNode", rb_cYARPNode);
3638
+ rb_cYARPNilNode = rb_define_class_under(rb_cYARP, "NilNode", rb_cYARPNode);
3639
+ rb_cYARPNoKeywordsParameterNode = rb_define_class_under(rb_cYARP, "NoKeywordsParameterNode", rb_cYARPNode);
3640
+ rb_cYARPNumberedReferenceReadNode = rb_define_class_under(rb_cYARP, "NumberedReferenceReadNode", rb_cYARPNode);
3641
+ rb_cYARPOptionalParameterNode = rb_define_class_under(rb_cYARP, "OptionalParameterNode", rb_cYARPNode);
3642
+ rb_cYARPOrNode = rb_define_class_under(rb_cYARP, "OrNode", rb_cYARPNode);
3643
+ rb_cYARPParametersNode = rb_define_class_under(rb_cYARP, "ParametersNode", rb_cYARPNode);
3644
+ rb_cYARPParenthesesNode = rb_define_class_under(rb_cYARP, "ParenthesesNode", rb_cYARPNode);
3645
+ rb_cYARPPinnedExpressionNode = rb_define_class_under(rb_cYARP, "PinnedExpressionNode", rb_cYARPNode);
3646
+ rb_cYARPPinnedVariableNode = rb_define_class_under(rb_cYARP, "PinnedVariableNode", rb_cYARPNode);
3647
+ rb_cYARPPostExecutionNode = rb_define_class_under(rb_cYARP, "PostExecutionNode", rb_cYARPNode);
3648
+ rb_cYARPPreExecutionNode = rb_define_class_under(rb_cYARP, "PreExecutionNode", rb_cYARPNode);
3649
+ rb_cYARPProgramNode = rb_define_class_under(rb_cYARP, "ProgramNode", rb_cYARPNode);
3650
+ rb_cYARPRangeNode = rb_define_class_under(rb_cYARP, "RangeNode", rb_cYARPNode);
3651
+ rb_cYARPRationalNode = rb_define_class_under(rb_cYARP, "RationalNode", rb_cYARPNode);
3652
+ rb_cYARPRedoNode = rb_define_class_under(rb_cYARP, "RedoNode", rb_cYARPNode);
3653
+ rb_cYARPRegularExpressionNode = rb_define_class_under(rb_cYARP, "RegularExpressionNode", rb_cYARPNode);
3654
+ rb_cYARPRequiredDestructuredParameterNode = rb_define_class_under(rb_cYARP, "RequiredDestructuredParameterNode", rb_cYARPNode);
3655
+ rb_cYARPRequiredParameterNode = rb_define_class_under(rb_cYARP, "RequiredParameterNode", rb_cYARPNode);
3656
+ rb_cYARPRescueModifierNode = rb_define_class_under(rb_cYARP, "RescueModifierNode", rb_cYARPNode);
3657
+ rb_cYARPRescueNode = rb_define_class_under(rb_cYARP, "RescueNode", rb_cYARPNode);
3658
+ rb_cYARPRestParameterNode = rb_define_class_under(rb_cYARP, "RestParameterNode", rb_cYARPNode);
3659
+ rb_cYARPRetryNode = rb_define_class_under(rb_cYARP, "RetryNode", rb_cYARPNode);
3660
+ rb_cYARPReturnNode = rb_define_class_under(rb_cYARP, "ReturnNode", rb_cYARPNode);
3661
+ rb_cYARPSelfNode = rb_define_class_under(rb_cYARP, "SelfNode", rb_cYARPNode);
3662
+ rb_cYARPSingletonClassNode = rb_define_class_under(rb_cYARP, "SingletonClassNode", rb_cYARPNode);
3663
+ rb_cYARPSourceEncodingNode = rb_define_class_under(rb_cYARP, "SourceEncodingNode", rb_cYARPNode);
3664
+ rb_cYARPSourceFileNode = rb_define_class_under(rb_cYARP, "SourceFileNode", rb_cYARPNode);
3665
+ rb_cYARPSourceLineNode = rb_define_class_under(rb_cYARP, "SourceLineNode", rb_cYARPNode);
3666
+ rb_cYARPSplatNode = rb_define_class_under(rb_cYARP, "SplatNode", rb_cYARPNode);
3667
+ rb_cYARPStatementsNode = rb_define_class_under(rb_cYARP, "StatementsNode", rb_cYARPNode);
3668
+ rb_cYARPStringConcatNode = rb_define_class_under(rb_cYARP, "StringConcatNode", rb_cYARPNode);
3669
+ rb_cYARPStringNode = rb_define_class_under(rb_cYARP, "StringNode", rb_cYARPNode);
3670
+ rb_cYARPSuperNode = rb_define_class_under(rb_cYARP, "SuperNode", rb_cYARPNode);
3671
+ rb_cYARPSymbolNode = rb_define_class_under(rb_cYARP, "SymbolNode", rb_cYARPNode);
3672
+ rb_cYARPTrueNode = rb_define_class_under(rb_cYARP, "TrueNode", rb_cYARPNode);
3673
+ rb_cYARPUndefNode = rb_define_class_under(rb_cYARP, "UndefNode", rb_cYARPNode);
3674
+ rb_cYARPUnlessNode = rb_define_class_under(rb_cYARP, "UnlessNode", rb_cYARPNode);
3675
+ rb_cYARPUntilNode = rb_define_class_under(rb_cYARP, "UntilNode", rb_cYARPNode);
3676
+ rb_cYARPWhenNode = rb_define_class_under(rb_cYARP, "WhenNode", rb_cYARPNode);
3677
+ rb_cYARPWhileNode = rb_define_class_under(rb_cYARP, "WhileNode", rb_cYARPNode);
3678
+ rb_cYARPXStringNode = rb_define_class_under(rb_cYARP, "XStringNode", rb_cYARPNode);
3679
+ rb_cYARPYieldNode = rb_define_class_under(rb_cYARP, "YieldNode", rb_cYARPNode);
3680
+ }