prism 0.30.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -1
- data/README.md +3 -1
- data/config.yml +185 -126
- data/docs/serialization.md +3 -0
- data/ext/prism/api_node.c +2843 -2085
- data/ext/prism/extconf.rb +1 -1
- data/ext/prism/extension.c +35 -25
- data/ext/prism/extension.h +2 -2
- data/include/prism/ast.h +1048 -69
- data/include/prism/defines.h +9 -0
- data/include/prism/diagnostic.h +11 -3
- data/include/prism/options.h +55 -1
- data/include/prism/parser.h +27 -3
- data/include/prism/regexp.h +2 -1
- data/include/prism/util/pm_integer.h +6 -6
- data/include/prism/util/pm_newline_list.h +11 -0
- data/include/prism/util/pm_string.h +1 -0
- data/include/prism/version.h +3 -3
- data/lib/prism/desugar_compiler.rb +111 -74
- data/lib/prism/dispatcher.rb +2 -1
- data/lib/prism/dot_visitor.rb +21 -31
- data/lib/prism/dsl.rb +656 -471
- data/lib/prism/ffi.rb +3 -0
- data/lib/prism/inspect_visitor.rb +285 -57
- data/lib/prism/mutation_compiler.rb +5 -5
- data/lib/prism/node.rb +2282 -4754
- data/lib/prism/node_ext.rb +72 -11
- data/lib/prism/parse_result/errors.rb +65 -0
- data/lib/prism/parse_result/newlines.rb +28 -28
- data/lib/prism/parse_result.rb +25 -2
- data/lib/prism/reflection.rb +7 -7
- data/lib/prism/serialize.rb +468 -610
- data/lib/prism/translation/parser/compiler.rb +18 -18
- data/lib/prism/translation/parser/lexer.rb +1 -1
- data/lib/prism/translation/parser.rb +3 -3
- data/lib/prism/translation/ripper.rb +14 -14
- data/lib/prism/translation/ruby_parser.rb +43 -7
- data/prism.gemspec +3 -1
- data/rbi/prism/dsl.rbi +521 -0
- data/rbi/prism/node.rbi +1456 -5616
- data/rbi/prism.rbi +16 -16
- data/sig/prism/dsl.rbs +189 -305
- data/sig/prism/node.rbs +702 -603
- data/sig/prism/parse_result.rbs +2 -0
- data/src/diagnostic.c +22 -6
- data/src/node.c +277 -284
- data/src/options.c +18 -0
- data/src/prettyprint.c +99 -108
- data/src/prism.c +1282 -760
- data/src/regexp.c +72 -4
- data/src/serialize.c +165 -50
- data/src/token_type.c +2 -2
- data/src/util/pm_integer.c +14 -14
- data/src/util/pm_newline_list.c +29 -0
- data/src/util/pm_string.c +9 -5
- metadata +4 -2
data/src/node.c
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
|
1
|
+
/*----------------------------------------------------------------------------*/
|
2
2
|
/* This file is generated by the templates/template.rb script and should not */
|
3
3
|
/* be modified manually. See */
|
4
4
|
/* templates/src/node.c.erb */
|
5
5
|
/* if you are looking to modify the */
|
6
6
|
/* template */
|
7
|
-
|
7
|
+
/*----------------------------------------------------------------------------*/
|
8
8
|
|
9
|
-
#line 2 "node.c.erb"
|
9
|
+
#line 2 "prism/templates/src/node.c.erb"
|
10
10
|
#include "prism/node.h"
|
11
11
|
|
12
12
|
/**
|
@@ -113,47 +113,47 @@ pm_node_list_destroy(pm_parser_t *parser, pm_node_list_t *list) {
|
|
113
113
|
PRISM_EXPORTED_FUNCTION void
|
114
114
|
pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
115
115
|
switch (PM_NODE_TYPE(node)) {
|
116
|
-
#line 110 "node.c.erb"
|
116
|
+
#line 110 "prism/templates/src/node.c.erb"
|
117
117
|
case PM_ALIAS_GLOBAL_VARIABLE_NODE: {
|
118
118
|
pm_alias_global_variable_node_t *cast = (pm_alias_global_variable_node_t *) node;
|
119
119
|
pm_node_destroy(parser, (pm_node_t *)cast->new_name);
|
120
120
|
pm_node_destroy(parser, (pm_node_t *)cast->old_name);
|
121
121
|
break;
|
122
122
|
}
|
123
|
-
#line 110 "node.c.erb"
|
123
|
+
#line 110 "prism/templates/src/node.c.erb"
|
124
124
|
case PM_ALIAS_METHOD_NODE: {
|
125
125
|
pm_alias_method_node_t *cast = (pm_alias_method_node_t *) node;
|
126
126
|
pm_node_destroy(parser, (pm_node_t *)cast->new_name);
|
127
127
|
pm_node_destroy(parser, (pm_node_t *)cast->old_name);
|
128
128
|
break;
|
129
129
|
}
|
130
|
-
#line 110 "node.c.erb"
|
130
|
+
#line 110 "prism/templates/src/node.c.erb"
|
131
131
|
case PM_ALTERNATION_PATTERN_NODE: {
|
132
132
|
pm_alternation_pattern_node_t *cast = (pm_alternation_pattern_node_t *) node;
|
133
133
|
pm_node_destroy(parser, (pm_node_t *)cast->left);
|
134
134
|
pm_node_destroy(parser, (pm_node_t *)cast->right);
|
135
135
|
break;
|
136
136
|
}
|
137
|
-
#line 110 "node.c.erb"
|
137
|
+
#line 110 "prism/templates/src/node.c.erb"
|
138
138
|
case PM_AND_NODE: {
|
139
139
|
pm_and_node_t *cast = (pm_and_node_t *) node;
|
140
140
|
pm_node_destroy(parser, (pm_node_t *)cast->left);
|
141
141
|
pm_node_destroy(parser, (pm_node_t *)cast->right);
|
142
142
|
break;
|
143
143
|
}
|
144
|
-
#line 110 "node.c.erb"
|
144
|
+
#line 110 "prism/templates/src/node.c.erb"
|
145
145
|
case PM_ARGUMENTS_NODE: {
|
146
146
|
pm_arguments_node_t *cast = (pm_arguments_node_t *) node;
|
147
147
|
pm_node_list_destroy(parser, &cast->arguments);
|
148
148
|
break;
|
149
149
|
}
|
150
|
-
#line 110 "node.c.erb"
|
150
|
+
#line 110 "prism/templates/src/node.c.erb"
|
151
151
|
case PM_ARRAY_NODE: {
|
152
152
|
pm_array_node_t *cast = (pm_array_node_t *) node;
|
153
153
|
pm_node_list_destroy(parser, &cast->elements);
|
154
154
|
break;
|
155
155
|
}
|
156
|
-
#line 110 "node.c.erb"
|
156
|
+
#line 110 "prism/templates/src/node.c.erb"
|
157
157
|
case PM_ARRAY_PATTERN_NODE: {
|
158
158
|
pm_array_pattern_node_t *cast = (pm_array_pattern_node_t *) node;
|
159
159
|
if (cast->constant != NULL) {
|
@@ -166,14 +166,14 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
166
166
|
pm_node_list_destroy(parser, &cast->posts);
|
167
167
|
break;
|
168
168
|
}
|
169
|
-
#line 110 "node.c.erb"
|
169
|
+
#line 110 "prism/templates/src/node.c.erb"
|
170
170
|
case PM_ASSOC_NODE: {
|
171
171
|
pm_assoc_node_t *cast = (pm_assoc_node_t *) node;
|
172
172
|
pm_node_destroy(parser, (pm_node_t *)cast->key);
|
173
173
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
174
174
|
break;
|
175
175
|
}
|
176
|
-
#line 110 "node.c.erb"
|
176
|
+
#line 110 "prism/templates/src/node.c.erb"
|
177
177
|
case PM_ASSOC_SPLAT_NODE: {
|
178
178
|
pm_assoc_splat_node_t *cast = (pm_assoc_splat_node_t *) node;
|
179
179
|
if (cast->value != NULL) {
|
@@ -181,11 +181,11 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
181
181
|
}
|
182
182
|
break;
|
183
183
|
}
|
184
|
-
#line 110 "node.c.erb"
|
184
|
+
#line 110 "prism/templates/src/node.c.erb"
|
185
185
|
case PM_BACK_REFERENCE_READ_NODE: {
|
186
186
|
break;
|
187
187
|
}
|
188
|
-
#line 110 "node.c.erb"
|
188
|
+
#line 110 "prism/templates/src/node.c.erb"
|
189
189
|
case PM_BEGIN_NODE: {
|
190
190
|
pm_begin_node_t *cast = (pm_begin_node_t *) node;
|
191
191
|
if (cast->statements != NULL) {
|
@@ -202,7 +202,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
202
202
|
}
|
203
203
|
break;
|
204
204
|
}
|
205
|
-
#line 110 "node.c.erb"
|
205
|
+
#line 110 "prism/templates/src/node.c.erb"
|
206
206
|
case PM_BLOCK_ARGUMENT_NODE: {
|
207
207
|
pm_block_argument_node_t *cast = (pm_block_argument_node_t *) node;
|
208
208
|
if (cast->expression != NULL) {
|
@@ -210,11 +210,11 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
210
210
|
}
|
211
211
|
break;
|
212
212
|
}
|
213
|
-
#line 110 "node.c.erb"
|
213
|
+
#line 110 "prism/templates/src/node.c.erb"
|
214
214
|
case PM_BLOCK_LOCAL_VARIABLE_NODE: {
|
215
215
|
break;
|
216
216
|
}
|
217
|
-
#line 110 "node.c.erb"
|
217
|
+
#line 110 "prism/templates/src/node.c.erb"
|
218
218
|
case PM_BLOCK_NODE: {
|
219
219
|
pm_block_node_t *cast = (pm_block_node_t *) node;
|
220
220
|
pm_constant_id_list_free(&cast->locals);
|
@@ -226,11 +226,11 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
226
226
|
}
|
227
227
|
break;
|
228
228
|
}
|
229
|
-
#line 110 "node.c.erb"
|
229
|
+
#line 110 "prism/templates/src/node.c.erb"
|
230
230
|
case PM_BLOCK_PARAMETER_NODE: {
|
231
231
|
break;
|
232
232
|
}
|
233
|
-
#line 110 "node.c.erb"
|
233
|
+
#line 110 "prism/templates/src/node.c.erb"
|
234
234
|
case PM_BLOCK_PARAMETERS_NODE: {
|
235
235
|
pm_block_parameters_node_t *cast = (pm_block_parameters_node_t *) node;
|
236
236
|
if (cast->parameters != NULL) {
|
@@ -239,7 +239,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
239
239
|
pm_node_list_destroy(parser, &cast->locals);
|
240
240
|
break;
|
241
241
|
}
|
242
|
-
#line 110 "node.c.erb"
|
242
|
+
#line 110 "prism/templates/src/node.c.erb"
|
243
243
|
case PM_BREAK_NODE: {
|
244
244
|
pm_break_node_t *cast = (pm_break_node_t *) node;
|
245
245
|
if (cast->arguments != NULL) {
|
@@ -247,7 +247,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
247
247
|
}
|
248
248
|
break;
|
249
249
|
}
|
250
|
-
#line 110 "node.c.erb"
|
250
|
+
#line 110 "prism/templates/src/node.c.erb"
|
251
251
|
case PM_CALL_AND_WRITE_NODE: {
|
252
252
|
pm_call_and_write_node_t *cast = (pm_call_and_write_node_t *) node;
|
253
253
|
if (cast->receiver != NULL) {
|
@@ -256,7 +256,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
256
256
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
257
257
|
break;
|
258
258
|
}
|
259
|
-
#line 110 "node.c.erb"
|
259
|
+
#line 110 "prism/templates/src/node.c.erb"
|
260
260
|
case PM_CALL_NODE: {
|
261
261
|
pm_call_node_t *cast = (pm_call_node_t *) node;
|
262
262
|
if (cast->receiver != NULL) {
|
@@ -270,7 +270,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
270
270
|
}
|
271
271
|
break;
|
272
272
|
}
|
273
|
-
#line 110 "node.c.erb"
|
273
|
+
#line 110 "prism/templates/src/node.c.erb"
|
274
274
|
case PM_CALL_OPERATOR_WRITE_NODE: {
|
275
275
|
pm_call_operator_write_node_t *cast = (pm_call_operator_write_node_t *) node;
|
276
276
|
if (cast->receiver != NULL) {
|
@@ -279,7 +279,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
279
279
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
280
280
|
break;
|
281
281
|
}
|
282
|
-
#line 110 "node.c.erb"
|
282
|
+
#line 110 "prism/templates/src/node.c.erb"
|
283
283
|
case PM_CALL_OR_WRITE_NODE: {
|
284
284
|
pm_call_or_write_node_t *cast = (pm_call_or_write_node_t *) node;
|
285
285
|
if (cast->receiver != NULL) {
|
@@ -288,44 +288,44 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
288
288
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
289
289
|
break;
|
290
290
|
}
|
291
|
-
#line 110 "node.c.erb"
|
291
|
+
#line 110 "prism/templates/src/node.c.erb"
|
292
292
|
case PM_CALL_TARGET_NODE: {
|
293
293
|
pm_call_target_node_t *cast = (pm_call_target_node_t *) node;
|
294
294
|
pm_node_destroy(parser, (pm_node_t *)cast->receiver);
|
295
295
|
break;
|
296
296
|
}
|
297
|
-
#line 110 "node.c.erb"
|
297
|
+
#line 110 "prism/templates/src/node.c.erb"
|
298
298
|
case PM_CAPTURE_PATTERN_NODE: {
|
299
299
|
pm_capture_pattern_node_t *cast = (pm_capture_pattern_node_t *) node;
|
300
300
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
301
301
|
pm_node_destroy(parser, (pm_node_t *)cast->target);
|
302
302
|
break;
|
303
303
|
}
|
304
|
-
#line 110 "node.c.erb"
|
304
|
+
#line 110 "prism/templates/src/node.c.erb"
|
305
305
|
case PM_CASE_MATCH_NODE: {
|
306
306
|
pm_case_match_node_t *cast = (pm_case_match_node_t *) node;
|
307
307
|
if (cast->predicate != NULL) {
|
308
308
|
pm_node_destroy(parser, (pm_node_t *)cast->predicate);
|
309
309
|
}
|
310
310
|
pm_node_list_destroy(parser, &cast->conditions);
|
311
|
-
if (cast->
|
312
|
-
pm_node_destroy(parser, (pm_node_t *)cast->
|
311
|
+
if (cast->else_clause != NULL) {
|
312
|
+
pm_node_destroy(parser, (pm_node_t *)cast->else_clause);
|
313
313
|
}
|
314
314
|
break;
|
315
315
|
}
|
316
|
-
#line 110 "node.c.erb"
|
316
|
+
#line 110 "prism/templates/src/node.c.erb"
|
317
317
|
case PM_CASE_NODE: {
|
318
318
|
pm_case_node_t *cast = (pm_case_node_t *) node;
|
319
319
|
if (cast->predicate != NULL) {
|
320
320
|
pm_node_destroy(parser, (pm_node_t *)cast->predicate);
|
321
321
|
}
|
322
322
|
pm_node_list_destroy(parser, &cast->conditions);
|
323
|
-
if (cast->
|
324
|
-
pm_node_destroy(parser, (pm_node_t *)cast->
|
323
|
+
if (cast->else_clause != NULL) {
|
324
|
+
pm_node_destroy(parser, (pm_node_t *)cast->else_clause);
|
325
325
|
}
|
326
326
|
break;
|
327
327
|
}
|
328
|
-
#line 110 "node.c.erb"
|
328
|
+
#line 110 "prism/templates/src/node.c.erb"
|
329
329
|
case PM_CLASS_NODE: {
|
330
330
|
pm_class_node_t *cast = (pm_class_node_t *) node;
|
331
331
|
pm_constant_id_list_free(&cast->locals);
|
@@ -338,64 +338,64 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
338
338
|
}
|
339
339
|
break;
|
340
340
|
}
|
341
|
-
#line 110 "node.c.erb"
|
341
|
+
#line 110 "prism/templates/src/node.c.erb"
|
342
342
|
case PM_CLASS_VARIABLE_AND_WRITE_NODE: {
|
343
343
|
pm_class_variable_and_write_node_t *cast = (pm_class_variable_and_write_node_t *) node;
|
344
344
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
345
345
|
break;
|
346
346
|
}
|
347
|
-
#line 110 "node.c.erb"
|
347
|
+
#line 110 "prism/templates/src/node.c.erb"
|
348
348
|
case PM_CLASS_VARIABLE_OPERATOR_WRITE_NODE: {
|
349
349
|
pm_class_variable_operator_write_node_t *cast = (pm_class_variable_operator_write_node_t *) node;
|
350
350
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
351
351
|
break;
|
352
352
|
}
|
353
|
-
#line 110 "node.c.erb"
|
353
|
+
#line 110 "prism/templates/src/node.c.erb"
|
354
354
|
case PM_CLASS_VARIABLE_OR_WRITE_NODE: {
|
355
355
|
pm_class_variable_or_write_node_t *cast = (pm_class_variable_or_write_node_t *) node;
|
356
356
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
357
357
|
break;
|
358
358
|
}
|
359
|
-
#line 110 "node.c.erb"
|
359
|
+
#line 110 "prism/templates/src/node.c.erb"
|
360
360
|
case PM_CLASS_VARIABLE_READ_NODE: {
|
361
361
|
break;
|
362
362
|
}
|
363
|
-
#line 110 "node.c.erb"
|
363
|
+
#line 110 "prism/templates/src/node.c.erb"
|
364
364
|
case PM_CLASS_VARIABLE_TARGET_NODE: {
|
365
365
|
break;
|
366
366
|
}
|
367
|
-
#line 110 "node.c.erb"
|
367
|
+
#line 110 "prism/templates/src/node.c.erb"
|
368
368
|
case PM_CLASS_VARIABLE_WRITE_NODE: {
|
369
369
|
pm_class_variable_write_node_t *cast = (pm_class_variable_write_node_t *) node;
|
370
370
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
371
371
|
break;
|
372
372
|
}
|
373
|
-
#line 110 "node.c.erb"
|
373
|
+
#line 110 "prism/templates/src/node.c.erb"
|
374
374
|
case PM_CONSTANT_AND_WRITE_NODE: {
|
375
375
|
pm_constant_and_write_node_t *cast = (pm_constant_and_write_node_t *) node;
|
376
376
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
377
377
|
break;
|
378
378
|
}
|
379
|
-
#line 110 "node.c.erb"
|
379
|
+
#line 110 "prism/templates/src/node.c.erb"
|
380
380
|
case PM_CONSTANT_OPERATOR_WRITE_NODE: {
|
381
381
|
pm_constant_operator_write_node_t *cast = (pm_constant_operator_write_node_t *) node;
|
382
382
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
383
383
|
break;
|
384
384
|
}
|
385
|
-
#line 110 "node.c.erb"
|
385
|
+
#line 110 "prism/templates/src/node.c.erb"
|
386
386
|
case PM_CONSTANT_OR_WRITE_NODE: {
|
387
387
|
pm_constant_or_write_node_t *cast = (pm_constant_or_write_node_t *) node;
|
388
388
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
389
389
|
break;
|
390
390
|
}
|
391
|
-
#line 110 "node.c.erb"
|
391
|
+
#line 110 "prism/templates/src/node.c.erb"
|
392
392
|
case PM_CONSTANT_PATH_AND_WRITE_NODE: {
|
393
393
|
pm_constant_path_and_write_node_t *cast = (pm_constant_path_and_write_node_t *) node;
|
394
394
|
pm_node_destroy(parser, (pm_node_t *)cast->target);
|
395
395
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
396
396
|
break;
|
397
397
|
}
|
398
|
-
#line 110 "node.c.erb"
|
398
|
+
#line 110 "prism/templates/src/node.c.erb"
|
399
399
|
case PM_CONSTANT_PATH_NODE: {
|
400
400
|
pm_constant_path_node_t *cast = (pm_constant_path_node_t *) node;
|
401
401
|
if (cast->parent != NULL) {
|
@@ -403,21 +403,21 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
403
403
|
}
|
404
404
|
break;
|
405
405
|
}
|
406
|
-
#line 110 "node.c.erb"
|
406
|
+
#line 110 "prism/templates/src/node.c.erb"
|
407
407
|
case PM_CONSTANT_PATH_OPERATOR_WRITE_NODE: {
|
408
408
|
pm_constant_path_operator_write_node_t *cast = (pm_constant_path_operator_write_node_t *) node;
|
409
409
|
pm_node_destroy(parser, (pm_node_t *)cast->target);
|
410
410
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
411
411
|
break;
|
412
412
|
}
|
413
|
-
#line 110 "node.c.erb"
|
413
|
+
#line 110 "prism/templates/src/node.c.erb"
|
414
414
|
case PM_CONSTANT_PATH_OR_WRITE_NODE: {
|
415
415
|
pm_constant_path_or_write_node_t *cast = (pm_constant_path_or_write_node_t *) node;
|
416
416
|
pm_node_destroy(parser, (pm_node_t *)cast->target);
|
417
417
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
418
418
|
break;
|
419
419
|
}
|
420
|
-
#line 110 "node.c.erb"
|
420
|
+
#line 110 "prism/templates/src/node.c.erb"
|
421
421
|
case PM_CONSTANT_PATH_TARGET_NODE: {
|
422
422
|
pm_constant_path_target_node_t *cast = (pm_constant_path_target_node_t *) node;
|
423
423
|
if (cast->parent != NULL) {
|
@@ -425,28 +425,28 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
425
425
|
}
|
426
426
|
break;
|
427
427
|
}
|
428
|
-
#line 110 "node.c.erb"
|
428
|
+
#line 110 "prism/templates/src/node.c.erb"
|
429
429
|
case PM_CONSTANT_PATH_WRITE_NODE: {
|
430
430
|
pm_constant_path_write_node_t *cast = (pm_constant_path_write_node_t *) node;
|
431
431
|
pm_node_destroy(parser, (pm_node_t *)cast->target);
|
432
432
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
433
433
|
break;
|
434
434
|
}
|
435
|
-
#line 110 "node.c.erb"
|
435
|
+
#line 110 "prism/templates/src/node.c.erb"
|
436
436
|
case PM_CONSTANT_READ_NODE: {
|
437
437
|
break;
|
438
438
|
}
|
439
|
-
#line 110 "node.c.erb"
|
439
|
+
#line 110 "prism/templates/src/node.c.erb"
|
440
440
|
case PM_CONSTANT_TARGET_NODE: {
|
441
441
|
break;
|
442
442
|
}
|
443
|
-
#line 110 "node.c.erb"
|
443
|
+
#line 110 "prism/templates/src/node.c.erb"
|
444
444
|
case PM_CONSTANT_WRITE_NODE: {
|
445
445
|
pm_constant_write_node_t *cast = (pm_constant_write_node_t *) node;
|
446
446
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
447
447
|
break;
|
448
448
|
}
|
449
|
-
#line 110 "node.c.erb"
|
449
|
+
#line 110 "prism/templates/src/node.c.erb"
|
450
450
|
case PM_DEF_NODE: {
|
451
451
|
pm_def_node_t *cast = (pm_def_node_t *) node;
|
452
452
|
if (cast->receiver != NULL) {
|
@@ -461,13 +461,13 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
461
461
|
pm_constant_id_list_free(&cast->locals);
|
462
462
|
break;
|
463
463
|
}
|
464
|
-
#line 110 "node.c.erb"
|
464
|
+
#line 110 "prism/templates/src/node.c.erb"
|
465
465
|
case PM_DEFINED_NODE: {
|
466
466
|
pm_defined_node_t *cast = (pm_defined_node_t *) node;
|
467
467
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
468
468
|
break;
|
469
469
|
}
|
470
|
-
#line 110 "node.c.erb"
|
470
|
+
#line 110 "prism/templates/src/node.c.erb"
|
471
471
|
case PM_ELSE_NODE: {
|
472
472
|
pm_else_node_t *cast = (pm_else_node_t *) node;
|
473
473
|
if (cast->statements != NULL) {
|
@@ -475,7 +475,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
475
475
|
}
|
476
476
|
break;
|
477
477
|
}
|
478
|
-
#line 110 "node.c.erb"
|
478
|
+
#line 110 "prism/templates/src/node.c.erb"
|
479
479
|
case PM_EMBEDDED_STATEMENTS_NODE: {
|
480
480
|
pm_embedded_statements_node_t *cast = (pm_embedded_statements_node_t *) node;
|
481
481
|
if (cast->statements != NULL) {
|
@@ -483,13 +483,13 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
483
483
|
}
|
484
484
|
break;
|
485
485
|
}
|
486
|
-
#line 110 "node.c.erb"
|
486
|
+
#line 110 "prism/templates/src/node.c.erb"
|
487
487
|
case PM_EMBEDDED_VARIABLE_NODE: {
|
488
488
|
pm_embedded_variable_node_t *cast = (pm_embedded_variable_node_t *) node;
|
489
489
|
pm_node_destroy(parser, (pm_node_t *)cast->variable);
|
490
490
|
break;
|
491
491
|
}
|
492
|
-
#line 110 "node.c.erb"
|
492
|
+
#line 110 "prism/templates/src/node.c.erb"
|
493
493
|
case PM_ENSURE_NODE: {
|
494
494
|
pm_ensure_node_t *cast = (pm_ensure_node_t *) node;
|
495
495
|
if (cast->statements != NULL) {
|
@@ -497,11 +497,11 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
497
497
|
}
|
498
498
|
break;
|
499
499
|
}
|
500
|
-
#line 110 "node.c.erb"
|
500
|
+
#line 110 "prism/templates/src/node.c.erb"
|
501
501
|
case PM_FALSE_NODE: {
|
502
502
|
break;
|
503
503
|
}
|
504
|
-
#line 110 "node.c.erb"
|
504
|
+
#line 110 "prism/templates/src/node.c.erb"
|
505
505
|
case PM_FIND_PATTERN_NODE: {
|
506
506
|
pm_find_pattern_node_t *cast = (pm_find_pattern_node_t *) node;
|
507
507
|
if (cast->constant != NULL) {
|
@@ -512,7 +512,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
512
512
|
pm_node_destroy(parser, (pm_node_t *)cast->right);
|
513
513
|
break;
|
514
514
|
}
|
515
|
-
#line 110 "node.c.erb"
|
515
|
+
#line 110 "prism/templates/src/node.c.erb"
|
516
516
|
case PM_FLIP_FLOP_NODE: {
|
517
517
|
pm_flip_flop_node_t *cast = (pm_flip_flop_node_t *) node;
|
518
518
|
if (cast->left != NULL) {
|
@@ -523,11 +523,11 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
523
523
|
}
|
524
524
|
break;
|
525
525
|
}
|
526
|
-
#line 110 "node.c.erb"
|
526
|
+
#line 110 "prism/templates/src/node.c.erb"
|
527
527
|
case PM_FLOAT_NODE: {
|
528
528
|
break;
|
529
529
|
}
|
530
|
-
#line 110 "node.c.erb"
|
530
|
+
#line 110 "prism/templates/src/node.c.erb"
|
531
531
|
case PM_FOR_NODE: {
|
532
532
|
pm_for_node_t *cast = (pm_for_node_t *) node;
|
533
533
|
pm_node_destroy(parser, (pm_node_t *)cast->index);
|
@@ -537,15 +537,15 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
537
537
|
}
|
538
538
|
break;
|
539
539
|
}
|
540
|
-
#line 110 "node.c.erb"
|
540
|
+
#line 110 "prism/templates/src/node.c.erb"
|
541
541
|
case PM_FORWARDING_ARGUMENTS_NODE: {
|
542
542
|
break;
|
543
543
|
}
|
544
|
-
#line 110 "node.c.erb"
|
544
|
+
#line 110 "prism/templates/src/node.c.erb"
|
545
545
|
case PM_FORWARDING_PARAMETER_NODE: {
|
546
546
|
break;
|
547
547
|
}
|
548
|
-
#line 110 "node.c.erb"
|
548
|
+
#line 110 "prism/templates/src/node.c.erb"
|
549
549
|
case PM_FORWARDING_SUPER_NODE: {
|
550
550
|
pm_forwarding_super_node_t *cast = (pm_forwarding_super_node_t *) node;
|
551
551
|
if (cast->block != NULL) {
|
@@ -553,45 +553,45 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
553
553
|
}
|
554
554
|
break;
|
555
555
|
}
|
556
|
-
#line 110 "node.c.erb"
|
556
|
+
#line 110 "prism/templates/src/node.c.erb"
|
557
557
|
case PM_GLOBAL_VARIABLE_AND_WRITE_NODE: {
|
558
558
|
pm_global_variable_and_write_node_t *cast = (pm_global_variable_and_write_node_t *) node;
|
559
559
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
560
560
|
break;
|
561
561
|
}
|
562
|
-
#line 110 "node.c.erb"
|
562
|
+
#line 110 "prism/templates/src/node.c.erb"
|
563
563
|
case PM_GLOBAL_VARIABLE_OPERATOR_WRITE_NODE: {
|
564
564
|
pm_global_variable_operator_write_node_t *cast = (pm_global_variable_operator_write_node_t *) node;
|
565
565
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
566
566
|
break;
|
567
567
|
}
|
568
|
-
#line 110 "node.c.erb"
|
568
|
+
#line 110 "prism/templates/src/node.c.erb"
|
569
569
|
case PM_GLOBAL_VARIABLE_OR_WRITE_NODE: {
|
570
570
|
pm_global_variable_or_write_node_t *cast = (pm_global_variable_or_write_node_t *) node;
|
571
571
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
572
572
|
break;
|
573
573
|
}
|
574
|
-
#line 110 "node.c.erb"
|
574
|
+
#line 110 "prism/templates/src/node.c.erb"
|
575
575
|
case PM_GLOBAL_VARIABLE_READ_NODE: {
|
576
576
|
break;
|
577
577
|
}
|
578
|
-
#line 110 "node.c.erb"
|
578
|
+
#line 110 "prism/templates/src/node.c.erb"
|
579
579
|
case PM_GLOBAL_VARIABLE_TARGET_NODE: {
|
580
580
|
break;
|
581
581
|
}
|
582
|
-
#line 110 "node.c.erb"
|
582
|
+
#line 110 "prism/templates/src/node.c.erb"
|
583
583
|
case PM_GLOBAL_VARIABLE_WRITE_NODE: {
|
584
584
|
pm_global_variable_write_node_t *cast = (pm_global_variable_write_node_t *) node;
|
585
585
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
586
586
|
break;
|
587
587
|
}
|
588
|
-
#line 110 "node.c.erb"
|
588
|
+
#line 110 "prism/templates/src/node.c.erb"
|
589
589
|
case PM_HASH_NODE: {
|
590
590
|
pm_hash_node_t *cast = (pm_hash_node_t *) node;
|
591
591
|
pm_node_list_destroy(parser, &cast->elements);
|
592
592
|
break;
|
593
593
|
}
|
594
|
-
#line 110 "node.c.erb"
|
594
|
+
#line 110 "prism/templates/src/node.c.erb"
|
595
595
|
case PM_HASH_PATTERN_NODE: {
|
596
596
|
pm_hash_pattern_node_t *cast = (pm_hash_pattern_node_t *) node;
|
597
597
|
if (cast->constant != NULL) {
|
@@ -603,35 +603,35 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
603
603
|
}
|
604
604
|
break;
|
605
605
|
}
|
606
|
-
#line 110 "node.c.erb"
|
606
|
+
#line 110 "prism/templates/src/node.c.erb"
|
607
607
|
case PM_IF_NODE: {
|
608
608
|
pm_if_node_t *cast = (pm_if_node_t *) node;
|
609
609
|
pm_node_destroy(parser, (pm_node_t *)cast->predicate);
|
610
610
|
if (cast->statements != NULL) {
|
611
611
|
pm_node_destroy(parser, (pm_node_t *)cast->statements);
|
612
612
|
}
|
613
|
-
if (cast->
|
614
|
-
pm_node_destroy(parser, (pm_node_t *)cast->
|
613
|
+
if (cast->subsequent != NULL) {
|
614
|
+
pm_node_destroy(parser, (pm_node_t *)cast->subsequent);
|
615
615
|
}
|
616
616
|
break;
|
617
617
|
}
|
618
|
-
#line 110 "node.c.erb"
|
618
|
+
#line 110 "prism/templates/src/node.c.erb"
|
619
619
|
case PM_IMAGINARY_NODE: {
|
620
620
|
pm_imaginary_node_t *cast = (pm_imaginary_node_t *) node;
|
621
621
|
pm_node_destroy(parser, (pm_node_t *)cast->numeric);
|
622
622
|
break;
|
623
623
|
}
|
624
|
-
#line 110 "node.c.erb"
|
624
|
+
#line 110 "prism/templates/src/node.c.erb"
|
625
625
|
case PM_IMPLICIT_NODE: {
|
626
626
|
pm_implicit_node_t *cast = (pm_implicit_node_t *) node;
|
627
627
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
628
628
|
break;
|
629
629
|
}
|
630
|
-
#line 110 "node.c.erb"
|
630
|
+
#line 110 "prism/templates/src/node.c.erb"
|
631
631
|
case PM_IMPLICIT_REST_NODE: {
|
632
632
|
break;
|
633
633
|
}
|
634
|
-
#line 110 "node.c.erb"
|
634
|
+
#line 110 "prism/templates/src/node.c.erb"
|
635
635
|
case PM_IN_NODE: {
|
636
636
|
pm_in_node_t *cast = (pm_in_node_t *) node;
|
637
637
|
pm_node_destroy(parser, (pm_node_t *)cast->pattern);
|
@@ -640,7 +640,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
640
640
|
}
|
641
641
|
break;
|
642
642
|
}
|
643
|
-
#line 110 "node.c.erb"
|
643
|
+
#line 110 "prism/templates/src/node.c.erb"
|
644
644
|
case PM_INDEX_AND_WRITE_NODE: {
|
645
645
|
pm_index_and_write_node_t *cast = (pm_index_and_write_node_t *) node;
|
646
646
|
if (cast->receiver != NULL) {
|
@@ -655,7 +655,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
655
655
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
656
656
|
break;
|
657
657
|
}
|
658
|
-
#line 110 "node.c.erb"
|
658
|
+
#line 110 "prism/templates/src/node.c.erb"
|
659
659
|
case PM_INDEX_OPERATOR_WRITE_NODE: {
|
660
660
|
pm_index_operator_write_node_t *cast = (pm_index_operator_write_node_t *) node;
|
661
661
|
if (cast->receiver != NULL) {
|
@@ -670,7 +670,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
670
670
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
671
671
|
break;
|
672
672
|
}
|
673
|
-
#line 110 "node.c.erb"
|
673
|
+
#line 110 "prism/templates/src/node.c.erb"
|
674
674
|
case PM_INDEX_OR_WRITE_NODE: {
|
675
675
|
pm_index_or_write_node_t *cast = (pm_index_or_write_node_t *) node;
|
676
676
|
if (cast->receiver != NULL) {
|
@@ -685,7 +685,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
685
685
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
686
686
|
break;
|
687
687
|
}
|
688
|
-
#line 110 "node.c.erb"
|
688
|
+
#line 110 "prism/templates/src/node.c.erb"
|
689
689
|
case PM_INDEX_TARGET_NODE: {
|
690
690
|
pm_index_target_node_t *cast = (pm_index_target_node_t *) node;
|
691
691
|
pm_node_destroy(parser, (pm_node_t *)cast->receiver);
|
@@ -697,93 +697,93 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
697
697
|
}
|
698
698
|
break;
|
699
699
|
}
|
700
|
-
#line 110 "node.c.erb"
|
700
|
+
#line 110 "prism/templates/src/node.c.erb"
|
701
701
|
case PM_INSTANCE_VARIABLE_AND_WRITE_NODE: {
|
702
702
|
pm_instance_variable_and_write_node_t *cast = (pm_instance_variable_and_write_node_t *) node;
|
703
703
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
704
704
|
break;
|
705
705
|
}
|
706
|
-
#line 110 "node.c.erb"
|
706
|
+
#line 110 "prism/templates/src/node.c.erb"
|
707
707
|
case PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: {
|
708
708
|
pm_instance_variable_operator_write_node_t *cast = (pm_instance_variable_operator_write_node_t *) node;
|
709
709
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
710
710
|
break;
|
711
711
|
}
|
712
|
-
#line 110 "node.c.erb"
|
712
|
+
#line 110 "prism/templates/src/node.c.erb"
|
713
713
|
case PM_INSTANCE_VARIABLE_OR_WRITE_NODE: {
|
714
714
|
pm_instance_variable_or_write_node_t *cast = (pm_instance_variable_or_write_node_t *) node;
|
715
715
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
716
716
|
break;
|
717
717
|
}
|
718
|
-
#line 110 "node.c.erb"
|
718
|
+
#line 110 "prism/templates/src/node.c.erb"
|
719
719
|
case PM_INSTANCE_VARIABLE_READ_NODE: {
|
720
720
|
break;
|
721
721
|
}
|
722
|
-
#line 110 "node.c.erb"
|
722
|
+
#line 110 "prism/templates/src/node.c.erb"
|
723
723
|
case PM_INSTANCE_VARIABLE_TARGET_NODE: {
|
724
724
|
break;
|
725
725
|
}
|
726
|
-
#line 110 "node.c.erb"
|
726
|
+
#line 110 "prism/templates/src/node.c.erb"
|
727
727
|
case PM_INSTANCE_VARIABLE_WRITE_NODE: {
|
728
728
|
pm_instance_variable_write_node_t *cast = (pm_instance_variable_write_node_t *) node;
|
729
729
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
730
730
|
break;
|
731
731
|
}
|
732
|
-
#line 110 "node.c.erb"
|
732
|
+
#line 110 "prism/templates/src/node.c.erb"
|
733
733
|
case PM_INTEGER_NODE: {
|
734
734
|
pm_integer_node_t *cast = (pm_integer_node_t *) node;
|
735
735
|
pm_integer_free(&cast->value);
|
736
736
|
break;
|
737
737
|
}
|
738
|
-
#line 110 "node.c.erb"
|
738
|
+
#line 110 "prism/templates/src/node.c.erb"
|
739
739
|
case PM_INTERPOLATED_MATCH_LAST_LINE_NODE: {
|
740
740
|
pm_interpolated_match_last_line_node_t *cast = (pm_interpolated_match_last_line_node_t *) node;
|
741
741
|
pm_node_list_destroy(parser, &cast->parts);
|
742
742
|
break;
|
743
743
|
}
|
744
|
-
#line 110 "node.c.erb"
|
744
|
+
#line 110 "prism/templates/src/node.c.erb"
|
745
745
|
case PM_INTERPOLATED_REGULAR_EXPRESSION_NODE: {
|
746
746
|
pm_interpolated_regular_expression_node_t *cast = (pm_interpolated_regular_expression_node_t *) node;
|
747
747
|
pm_node_list_destroy(parser, &cast->parts);
|
748
748
|
break;
|
749
749
|
}
|
750
|
-
#line 110 "node.c.erb"
|
750
|
+
#line 110 "prism/templates/src/node.c.erb"
|
751
751
|
case PM_INTERPOLATED_STRING_NODE: {
|
752
752
|
pm_interpolated_string_node_t *cast = (pm_interpolated_string_node_t *) node;
|
753
753
|
pm_node_list_destroy(parser, &cast->parts);
|
754
754
|
break;
|
755
755
|
}
|
756
|
-
#line 110 "node.c.erb"
|
756
|
+
#line 110 "prism/templates/src/node.c.erb"
|
757
757
|
case PM_INTERPOLATED_SYMBOL_NODE: {
|
758
758
|
pm_interpolated_symbol_node_t *cast = (pm_interpolated_symbol_node_t *) node;
|
759
759
|
pm_node_list_destroy(parser, &cast->parts);
|
760
760
|
break;
|
761
761
|
}
|
762
|
-
#line 110 "node.c.erb"
|
762
|
+
#line 110 "prism/templates/src/node.c.erb"
|
763
763
|
case PM_INTERPOLATED_X_STRING_NODE: {
|
764
764
|
pm_interpolated_x_string_node_t *cast = (pm_interpolated_x_string_node_t *) node;
|
765
765
|
pm_node_list_destroy(parser, &cast->parts);
|
766
766
|
break;
|
767
767
|
}
|
768
|
-
#line 110 "node.c.erb"
|
768
|
+
#line 110 "prism/templates/src/node.c.erb"
|
769
769
|
case PM_IT_LOCAL_VARIABLE_READ_NODE: {
|
770
770
|
break;
|
771
771
|
}
|
772
|
-
#line 110 "node.c.erb"
|
772
|
+
#line 110 "prism/templates/src/node.c.erb"
|
773
773
|
case PM_IT_PARAMETERS_NODE: {
|
774
774
|
break;
|
775
775
|
}
|
776
|
-
#line 110 "node.c.erb"
|
776
|
+
#line 110 "prism/templates/src/node.c.erb"
|
777
777
|
case PM_KEYWORD_HASH_NODE: {
|
778
778
|
pm_keyword_hash_node_t *cast = (pm_keyword_hash_node_t *) node;
|
779
779
|
pm_node_list_destroy(parser, &cast->elements);
|
780
780
|
break;
|
781
781
|
}
|
782
|
-
#line 110 "node.c.erb"
|
782
|
+
#line 110 "prism/templates/src/node.c.erb"
|
783
783
|
case PM_KEYWORD_REST_PARAMETER_NODE: {
|
784
784
|
break;
|
785
785
|
}
|
786
|
-
#line 110 "node.c.erb"
|
786
|
+
#line 110 "prism/templates/src/node.c.erb"
|
787
787
|
case PM_LAMBDA_NODE: {
|
788
788
|
pm_lambda_node_t *cast = (pm_lambda_node_t *) node;
|
789
789
|
pm_constant_id_list_free(&cast->locals);
|
@@ -795,70 +795,70 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
795
795
|
}
|
796
796
|
break;
|
797
797
|
}
|
798
|
-
#line 110 "node.c.erb"
|
798
|
+
#line 110 "prism/templates/src/node.c.erb"
|
799
799
|
case PM_LOCAL_VARIABLE_AND_WRITE_NODE: {
|
800
800
|
pm_local_variable_and_write_node_t *cast = (pm_local_variable_and_write_node_t *) node;
|
801
801
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
802
802
|
break;
|
803
803
|
}
|
804
|
-
#line 110 "node.c.erb"
|
804
|
+
#line 110 "prism/templates/src/node.c.erb"
|
805
805
|
case PM_LOCAL_VARIABLE_OPERATOR_WRITE_NODE: {
|
806
806
|
pm_local_variable_operator_write_node_t *cast = (pm_local_variable_operator_write_node_t *) node;
|
807
807
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
808
808
|
break;
|
809
809
|
}
|
810
|
-
#line 110 "node.c.erb"
|
810
|
+
#line 110 "prism/templates/src/node.c.erb"
|
811
811
|
case PM_LOCAL_VARIABLE_OR_WRITE_NODE: {
|
812
812
|
pm_local_variable_or_write_node_t *cast = (pm_local_variable_or_write_node_t *) node;
|
813
813
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
814
814
|
break;
|
815
815
|
}
|
816
|
-
#line 110 "node.c.erb"
|
816
|
+
#line 110 "prism/templates/src/node.c.erb"
|
817
817
|
case PM_LOCAL_VARIABLE_READ_NODE: {
|
818
818
|
break;
|
819
819
|
}
|
820
|
-
#line 110 "node.c.erb"
|
820
|
+
#line 110 "prism/templates/src/node.c.erb"
|
821
821
|
case PM_LOCAL_VARIABLE_TARGET_NODE: {
|
822
822
|
break;
|
823
823
|
}
|
824
|
-
#line 110 "node.c.erb"
|
824
|
+
#line 110 "prism/templates/src/node.c.erb"
|
825
825
|
case PM_LOCAL_VARIABLE_WRITE_NODE: {
|
826
826
|
pm_local_variable_write_node_t *cast = (pm_local_variable_write_node_t *) node;
|
827
827
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
828
828
|
break;
|
829
829
|
}
|
830
|
-
#line 110 "node.c.erb"
|
830
|
+
#line 110 "prism/templates/src/node.c.erb"
|
831
831
|
case PM_MATCH_LAST_LINE_NODE: {
|
832
832
|
pm_match_last_line_node_t *cast = (pm_match_last_line_node_t *) node;
|
833
833
|
pm_string_free(&cast->unescaped);
|
834
834
|
break;
|
835
835
|
}
|
836
|
-
#line 110 "node.c.erb"
|
836
|
+
#line 110 "prism/templates/src/node.c.erb"
|
837
837
|
case PM_MATCH_PREDICATE_NODE: {
|
838
838
|
pm_match_predicate_node_t *cast = (pm_match_predicate_node_t *) node;
|
839
839
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
840
840
|
pm_node_destroy(parser, (pm_node_t *)cast->pattern);
|
841
841
|
break;
|
842
842
|
}
|
843
|
-
#line 110 "node.c.erb"
|
843
|
+
#line 110 "prism/templates/src/node.c.erb"
|
844
844
|
case PM_MATCH_REQUIRED_NODE: {
|
845
845
|
pm_match_required_node_t *cast = (pm_match_required_node_t *) node;
|
846
846
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
847
847
|
pm_node_destroy(parser, (pm_node_t *)cast->pattern);
|
848
848
|
break;
|
849
849
|
}
|
850
|
-
#line 110 "node.c.erb"
|
850
|
+
#line 110 "prism/templates/src/node.c.erb"
|
851
851
|
case PM_MATCH_WRITE_NODE: {
|
852
852
|
pm_match_write_node_t *cast = (pm_match_write_node_t *) node;
|
853
853
|
pm_node_destroy(parser, (pm_node_t *)cast->call);
|
854
854
|
pm_node_list_destroy(parser, &cast->targets);
|
855
855
|
break;
|
856
856
|
}
|
857
|
-
#line 110 "node.c.erb"
|
857
|
+
#line 110 "prism/templates/src/node.c.erb"
|
858
858
|
case PM_MISSING_NODE: {
|
859
859
|
break;
|
860
860
|
}
|
861
|
-
#line 110 "node.c.erb"
|
861
|
+
#line 110 "prism/templates/src/node.c.erb"
|
862
862
|
case PM_MODULE_NODE: {
|
863
863
|
pm_module_node_t *cast = (pm_module_node_t *) node;
|
864
864
|
pm_constant_id_list_free(&cast->locals);
|
@@ -868,7 +868,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
868
868
|
}
|
869
869
|
break;
|
870
870
|
}
|
871
|
-
#line 110 "node.c.erb"
|
871
|
+
#line 110 "prism/templates/src/node.c.erb"
|
872
872
|
case PM_MULTI_TARGET_NODE: {
|
873
873
|
pm_multi_target_node_t *cast = (pm_multi_target_node_t *) node;
|
874
874
|
pm_node_list_destroy(parser, &cast->lefts);
|
@@ -878,7 +878,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
878
878
|
pm_node_list_destroy(parser, &cast->rights);
|
879
879
|
break;
|
880
880
|
}
|
881
|
-
#line 110 "node.c.erb"
|
881
|
+
#line 110 "prism/templates/src/node.c.erb"
|
882
882
|
case PM_MULTI_WRITE_NODE: {
|
883
883
|
pm_multi_write_node_t *cast = (pm_multi_write_node_t *) node;
|
884
884
|
pm_node_list_destroy(parser, &cast->lefts);
|
@@ -889,7 +889,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
889
889
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
890
890
|
break;
|
891
891
|
}
|
892
|
-
#line 110 "node.c.erb"
|
892
|
+
#line 110 "prism/templates/src/node.c.erb"
|
893
893
|
case PM_NEXT_NODE: {
|
894
894
|
pm_next_node_t *cast = (pm_next_node_t *) node;
|
895
895
|
if (cast->arguments != NULL) {
|
@@ -897,42 +897,42 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
897
897
|
}
|
898
898
|
break;
|
899
899
|
}
|
900
|
-
#line 110 "node.c.erb"
|
900
|
+
#line 110 "prism/templates/src/node.c.erb"
|
901
901
|
case PM_NIL_NODE: {
|
902
902
|
break;
|
903
903
|
}
|
904
|
-
#line 110 "node.c.erb"
|
904
|
+
#line 110 "prism/templates/src/node.c.erb"
|
905
905
|
case PM_NO_KEYWORDS_PARAMETER_NODE: {
|
906
906
|
break;
|
907
907
|
}
|
908
|
-
#line 110 "node.c.erb"
|
908
|
+
#line 110 "prism/templates/src/node.c.erb"
|
909
909
|
case PM_NUMBERED_PARAMETERS_NODE: {
|
910
910
|
break;
|
911
911
|
}
|
912
|
-
#line 110 "node.c.erb"
|
912
|
+
#line 110 "prism/templates/src/node.c.erb"
|
913
913
|
case PM_NUMBERED_REFERENCE_READ_NODE: {
|
914
914
|
break;
|
915
915
|
}
|
916
|
-
#line 110 "node.c.erb"
|
916
|
+
#line 110 "prism/templates/src/node.c.erb"
|
917
917
|
case PM_OPTIONAL_KEYWORD_PARAMETER_NODE: {
|
918
918
|
pm_optional_keyword_parameter_node_t *cast = (pm_optional_keyword_parameter_node_t *) node;
|
919
919
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
920
920
|
break;
|
921
921
|
}
|
922
|
-
#line 110 "node.c.erb"
|
922
|
+
#line 110 "prism/templates/src/node.c.erb"
|
923
923
|
case PM_OPTIONAL_PARAMETER_NODE: {
|
924
924
|
pm_optional_parameter_node_t *cast = (pm_optional_parameter_node_t *) node;
|
925
925
|
pm_node_destroy(parser, (pm_node_t *)cast->value);
|
926
926
|
break;
|
927
927
|
}
|
928
|
-
#line 110 "node.c.erb"
|
928
|
+
#line 110 "prism/templates/src/node.c.erb"
|
929
929
|
case PM_OR_NODE: {
|
930
930
|
pm_or_node_t *cast = (pm_or_node_t *) node;
|
931
931
|
pm_node_destroy(parser, (pm_node_t *)cast->left);
|
932
932
|
pm_node_destroy(parser, (pm_node_t *)cast->right);
|
933
933
|
break;
|
934
934
|
}
|
935
|
-
#line 110 "node.c.erb"
|
935
|
+
#line 110 "prism/templates/src/node.c.erb"
|
936
936
|
case PM_PARAMETERS_NODE: {
|
937
937
|
pm_parameters_node_t *cast = (pm_parameters_node_t *) node;
|
938
938
|
pm_node_list_destroy(parser, &cast->requireds);
|
@@ -950,7 +950,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
950
950
|
}
|
951
951
|
break;
|
952
952
|
}
|
953
|
-
#line 110 "node.c.erb"
|
953
|
+
#line 110 "prism/templates/src/node.c.erb"
|
954
954
|
case PM_PARENTHESES_NODE: {
|
955
955
|
pm_parentheses_node_t *cast = (pm_parentheses_node_t *) node;
|
956
956
|
if (cast->body != NULL) {
|
@@ -958,19 +958,19 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
958
958
|
}
|
959
959
|
break;
|
960
960
|
}
|
961
|
-
#line 110 "node.c.erb"
|
961
|
+
#line 110 "prism/templates/src/node.c.erb"
|
962
962
|
case PM_PINNED_EXPRESSION_NODE: {
|
963
963
|
pm_pinned_expression_node_t *cast = (pm_pinned_expression_node_t *) node;
|
964
964
|
pm_node_destroy(parser, (pm_node_t *)cast->expression);
|
965
965
|
break;
|
966
966
|
}
|
967
|
-
#line 110 "node.c.erb"
|
967
|
+
#line 110 "prism/templates/src/node.c.erb"
|
968
968
|
case PM_PINNED_VARIABLE_NODE: {
|
969
969
|
pm_pinned_variable_node_t *cast = (pm_pinned_variable_node_t *) node;
|
970
970
|
pm_node_destroy(parser, (pm_node_t *)cast->variable);
|
971
971
|
break;
|
972
972
|
}
|
973
|
-
#line 110 "node.c.erb"
|
973
|
+
#line 110 "prism/templates/src/node.c.erb"
|
974
974
|
case PM_POST_EXECUTION_NODE: {
|
975
975
|
pm_post_execution_node_t *cast = (pm_post_execution_node_t *) node;
|
976
976
|
if (cast->statements != NULL) {
|
@@ -978,7 +978,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
978
978
|
}
|
979
979
|
break;
|
980
980
|
}
|
981
|
-
#line 110 "node.c.erb"
|
981
|
+
#line 110 "prism/templates/src/node.c.erb"
|
982
982
|
case PM_PRE_EXECUTION_NODE: {
|
983
983
|
pm_pre_execution_node_t *cast = (pm_pre_execution_node_t *) node;
|
984
984
|
if (cast->statements != NULL) {
|
@@ -986,14 +986,14 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
986
986
|
}
|
987
987
|
break;
|
988
988
|
}
|
989
|
-
#line 110 "node.c.erb"
|
989
|
+
#line 110 "prism/templates/src/node.c.erb"
|
990
990
|
case PM_PROGRAM_NODE: {
|
991
991
|
pm_program_node_t *cast = (pm_program_node_t *) node;
|
992
992
|
pm_constant_id_list_free(&cast->locals);
|
993
993
|
pm_node_destroy(parser, (pm_node_t *)cast->statements);
|
994
994
|
break;
|
995
995
|
}
|
996
|
-
#line 110 "node.c.erb"
|
996
|
+
#line 110 "prism/templates/src/node.c.erb"
|
997
997
|
case PM_RANGE_NODE: {
|
998
998
|
pm_range_node_t *cast = (pm_range_node_t *) node;
|
999
999
|
if (cast->left != NULL) {
|
@@ -1004,39 +1004,39 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
1004
1004
|
}
|
1005
1005
|
break;
|
1006
1006
|
}
|
1007
|
-
#line 110 "node.c.erb"
|
1007
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1008
1008
|
case PM_RATIONAL_NODE: {
|
1009
1009
|
pm_rational_node_t *cast = (pm_rational_node_t *) node;
|
1010
1010
|
pm_integer_free(&cast->numerator);
|
1011
1011
|
pm_integer_free(&cast->denominator);
|
1012
1012
|
break;
|
1013
1013
|
}
|
1014
|
-
#line 110 "node.c.erb"
|
1014
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1015
1015
|
case PM_REDO_NODE: {
|
1016
1016
|
break;
|
1017
1017
|
}
|
1018
|
-
#line 110 "node.c.erb"
|
1018
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1019
1019
|
case PM_REGULAR_EXPRESSION_NODE: {
|
1020
1020
|
pm_regular_expression_node_t *cast = (pm_regular_expression_node_t *) node;
|
1021
1021
|
pm_string_free(&cast->unescaped);
|
1022
1022
|
break;
|
1023
1023
|
}
|
1024
|
-
#line 110 "node.c.erb"
|
1024
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1025
1025
|
case PM_REQUIRED_KEYWORD_PARAMETER_NODE: {
|
1026
1026
|
break;
|
1027
1027
|
}
|
1028
|
-
#line 110 "node.c.erb"
|
1028
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1029
1029
|
case PM_REQUIRED_PARAMETER_NODE: {
|
1030
1030
|
break;
|
1031
1031
|
}
|
1032
|
-
#line 110 "node.c.erb"
|
1032
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1033
1033
|
case PM_RESCUE_MODIFIER_NODE: {
|
1034
1034
|
pm_rescue_modifier_node_t *cast = (pm_rescue_modifier_node_t *) node;
|
1035
1035
|
pm_node_destroy(parser, (pm_node_t *)cast->expression);
|
1036
1036
|
pm_node_destroy(parser, (pm_node_t *)cast->rescue_expression);
|
1037
1037
|
break;
|
1038
1038
|
}
|
1039
|
-
#line 110 "node.c.erb"
|
1039
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1040
1040
|
case PM_RESCUE_NODE: {
|
1041
1041
|
pm_rescue_node_t *cast = (pm_rescue_node_t *) node;
|
1042
1042
|
pm_node_list_destroy(parser, &cast->exceptions);
|
@@ -1046,20 +1046,20 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
1046
1046
|
if (cast->statements != NULL) {
|
1047
1047
|
pm_node_destroy(parser, (pm_node_t *)cast->statements);
|
1048
1048
|
}
|
1049
|
-
if (cast->
|
1050
|
-
pm_node_destroy(parser, (pm_node_t *)cast->
|
1049
|
+
if (cast->subsequent != NULL) {
|
1050
|
+
pm_node_destroy(parser, (pm_node_t *)cast->subsequent);
|
1051
1051
|
}
|
1052
1052
|
break;
|
1053
1053
|
}
|
1054
|
-
#line 110 "node.c.erb"
|
1054
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1055
1055
|
case PM_REST_PARAMETER_NODE: {
|
1056
1056
|
break;
|
1057
1057
|
}
|
1058
|
-
#line 110 "node.c.erb"
|
1058
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1059
1059
|
case PM_RETRY_NODE: {
|
1060
1060
|
break;
|
1061
1061
|
}
|
1062
|
-
#line 110 "node.c.erb"
|
1062
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1063
1063
|
case PM_RETURN_NODE: {
|
1064
1064
|
pm_return_node_t *cast = (pm_return_node_t *) node;
|
1065
1065
|
if (cast->arguments != NULL) {
|
@@ -1067,17 +1067,17 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
1067
1067
|
}
|
1068
1068
|
break;
|
1069
1069
|
}
|
1070
|
-
#line 110 "node.c.erb"
|
1070
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1071
1071
|
case PM_SELF_NODE: {
|
1072
1072
|
break;
|
1073
1073
|
}
|
1074
|
-
#line 110 "node.c.erb"
|
1074
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1075
1075
|
case PM_SHAREABLE_CONSTANT_NODE: {
|
1076
1076
|
pm_shareable_constant_node_t *cast = (pm_shareable_constant_node_t *) node;
|
1077
1077
|
pm_node_destroy(parser, (pm_node_t *)cast->write);
|
1078
1078
|
break;
|
1079
1079
|
}
|
1080
|
-
#line 110 "node.c.erb"
|
1080
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1081
1081
|
case PM_SINGLETON_CLASS_NODE: {
|
1082
1082
|
pm_singleton_class_node_t *cast = (pm_singleton_class_node_t *) node;
|
1083
1083
|
pm_constant_id_list_free(&cast->locals);
|
@@ -1087,21 +1087,21 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
1087
1087
|
}
|
1088
1088
|
break;
|
1089
1089
|
}
|
1090
|
-
#line 110 "node.c.erb"
|
1090
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1091
1091
|
case PM_SOURCE_ENCODING_NODE: {
|
1092
1092
|
break;
|
1093
1093
|
}
|
1094
|
-
#line 110 "node.c.erb"
|
1094
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1095
1095
|
case PM_SOURCE_FILE_NODE: {
|
1096
1096
|
pm_source_file_node_t *cast = (pm_source_file_node_t *) node;
|
1097
1097
|
pm_string_free(&cast->filepath);
|
1098
1098
|
break;
|
1099
1099
|
}
|
1100
|
-
#line 110 "node.c.erb"
|
1100
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1101
1101
|
case PM_SOURCE_LINE_NODE: {
|
1102
1102
|
break;
|
1103
1103
|
}
|
1104
|
-
#line 110 "node.c.erb"
|
1104
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1105
1105
|
case PM_SPLAT_NODE: {
|
1106
1106
|
pm_splat_node_t *cast = (pm_splat_node_t *) node;
|
1107
1107
|
if (cast->expression != NULL) {
|
@@ -1109,19 +1109,19 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
1109
1109
|
}
|
1110
1110
|
break;
|
1111
1111
|
}
|
1112
|
-
#line 110 "node.c.erb"
|
1112
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1113
1113
|
case PM_STATEMENTS_NODE: {
|
1114
1114
|
pm_statements_node_t *cast = (pm_statements_node_t *) node;
|
1115
1115
|
pm_node_list_destroy(parser, &cast->body);
|
1116
1116
|
break;
|
1117
1117
|
}
|
1118
|
-
#line 110 "node.c.erb"
|
1118
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1119
1119
|
case PM_STRING_NODE: {
|
1120
1120
|
pm_string_node_t *cast = (pm_string_node_t *) node;
|
1121
1121
|
pm_string_free(&cast->unescaped);
|
1122
1122
|
break;
|
1123
1123
|
}
|
1124
|
-
#line 110 "node.c.erb"
|
1124
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1125
1125
|
case PM_SUPER_NODE: {
|
1126
1126
|
pm_super_node_t *cast = (pm_super_node_t *) node;
|
1127
1127
|
if (cast->arguments != NULL) {
|
@@ -1132,35 +1132,35 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
1132
1132
|
}
|
1133
1133
|
break;
|
1134
1134
|
}
|
1135
|
-
#line 110 "node.c.erb"
|
1135
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1136
1136
|
case PM_SYMBOL_NODE: {
|
1137
1137
|
pm_symbol_node_t *cast = (pm_symbol_node_t *) node;
|
1138
1138
|
pm_string_free(&cast->unescaped);
|
1139
1139
|
break;
|
1140
1140
|
}
|
1141
|
-
#line 110 "node.c.erb"
|
1141
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1142
1142
|
case PM_TRUE_NODE: {
|
1143
1143
|
break;
|
1144
1144
|
}
|
1145
|
-
#line 110 "node.c.erb"
|
1145
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1146
1146
|
case PM_UNDEF_NODE: {
|
1147
1147
|
pm_undef_node_t *cast = (pm_undef_node_t *) node;
|
1148
1148
|
pm_node_list_destroy(parser, &cast->names);
|
1149
1149
|
break;
|
1150
1150
|
}
|
1151
|
-
#line 110 "node.c.erb"
|
1151
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1152
1152
|
case PM_UNLESS_NODE: {
|
1153
1153
|
pm_unless_node_t *cast = (pm_unless_node_t *) node;
|
1154
1154
|
pm_node_destroy(parser, (pm_node_t *)cast->predicate);
|
1155
1155
|
if (cast->statements != NULL) {
|
1156
1156
|
pm_node_destroy(parser, (pm_node_t *)cast->statements);
|
1157
1157
|
}
|
1158
|
-
if (cast->
|
1159
|
-
pm_node_destroy(parser, (pm_node_t *)cast->
|
1158
|
+
if (cast->else_clause != NULL) {
|
1159
|
+
pm_node_destroy(parser, (pm_node_t *)cast->else_clause);
|
1160
1160
|
}
|
1161
1161
|
break;
|
1162
1162
|
}
|
1163
|
-
#line 110 "node.c.erb"
|
1163
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1164
1164
|
case PM_UNTIL_NODE: {
|
1165
1165
|
pm_until_node_t *cast = (pm_until_node_t *) node;
|
1166
1166
|
pm_node_destroy(parser, (pm_node_t *)cast->predicate);
|
@@ -1169,7 +1169,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
1169
1169
|
}
|
1170
1170
|
break;
|
1171
1171
|
}
|
1172
|
-
#line 110 "node.c.erb"
|
1172
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1173
1173
|
case PM_WHEN_NODE: {
|
1174
1174
|
pm_when_node_t *cast = (pm_when_node_t *) node;
|
1175
1175
|
pm_node_list_destroy(parser, &cast->conditions);
|
@@ -1178,7 +1178,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
1178
1178
|
}
|
1179
1179
|
break;
|
1180
1180
|
}
|
1181
|
-
#line 110 "node.c.erb"
|
1181
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1182
1182
|
case PM_WHILE_NODE: {
|
1183
1183
|
pm_while_node_t *cast = (pm_while_node_t *) node;
|
1184
1184
|
pm_node_destroy(parser, (pm_node_t *)cast->predicate);
|
@@ -1187,13 +1187,13 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
1187
1187
|
}
|
1188
1188
|
break;
|
1189
1189
|
}
|
1190
|
-
#line 110 "node.c.erb"
|
1190
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1191
1191
|
case PM_X_STRING_NODE: {
|
1192
1192
|
pm_x_string_node_t *cast = (pm_x_string_node_t *) node;
|
1193
1193
|
pm_string_free(&cast->unescaped);
|
1194
1194
|
break;
|
1195
1195
|
}
|
1196
|
-
#line 110 "node.c.erb"
|
1196
|
+
#line 110 "prism/templates/src/node.c.erb"
|
1197
1197
|
case PM_YIELD_NODE: {
|
1198
1198
|
pm_yield_node_t *cast = (pm_yield_node_t *) node;
|
1199
1199
|
if (cast->arguments != NULL) {
|
@@ -1201,7 +1201,7 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
|
|
1201
1201
|
}
|
1202
1202
|
break;
|
1203
1203
|
}
|
1204
|
-
#line 139 "node.c.erb"
|
1204
|
+
#line 139 "prism/templates/src/node.c.erb"
|
1205
1205
|
default:
|
1206
1206
|
assert(false && "unreachable");
|
1207
1207
|
break;
|
@@ -1831,9 +1831,9 @@ pm_visit_child_nodes(const pm_node_t *node, bool (*visitor)(const pm_node_t *nod
|
|
1831
1831
|
pm_visit_node(conditions->nodes[index], visitor, data);
|
1832
1832
|
}
|
1833
1833
|
|
1834
|
-
// Visit the
|
1835
|
-
if (cast->
|
1836
|
-
pm_visit_node((const pm_node_t *) cast->
|
1834
|
+
// Visit the else_clause field
|
1835
|
+
if (cast->else_clause != NULL) {
|
1836
|
+
pm_visit_node((const pm_node_t *) cast->else_clause, visitor, data);
|
1837
1837
|
}
|
1838
1838
|
|
1839
1839
|
break;
|
@@ -1852,9 +1852,9 @@ pm_visit_child_nodes(const pm_node_t *node, bool (*visitor)(const pm_node_t *nod
|
|
1852
1852
|
pm_visit_node(conditions->nodes[index], visitor, data);
|
1853
1853
|
}
|
1854
1854
|
|
1855
|
-
// Visit the
|
1856
|
-
if (cast->
|
1857
|
-
pm_visit_node((const pm_node_t *) cast->
|
1855
|
+
// Visit the else_clause field
|
1856
|
+
if (cast->else_clause != NULL) {
|
1857
|
+
pm_visit_node((const pm_node_t *) cast->else_clause, visitor, data);
|
1858
1858
|
}
|
1859
1859
|
|
1860
1860
|
break;
|
@@ -2229,9 +2229,9 @@ pm_visit_child_nodes(const pm_node_t *node, bool (*visitor)(const pm_node_t *nod
|
|
2229
2229
|
pm_visit_node((const pm_node_t *) cast->statements, visitor, data);
|
2230
2230
|
}
|
2231
2231
|
|
2232
|
-
// Visit the
|
2233
|
-
if (cast->
|
2234
|
-
pm_visit_node((const pm_node_t *) cast->
|
2232
|
+
// Visit the subsequent field
|
2233
|
+
if (cast->subsequent != NULL) {
|
2234
|
+
pm_visit_node((const pm_node_t *) cast->subsequent, visitor, data);
|
2235
2235
|
}
|
2236
2236
|
|
2237
2237
|
break;
|
@@ -2813,9 +2813,9 @@ pm_visit_child_nodes(const pm_node_t *node, bool (*visitor)(const pm_node_t *nod
|
|
2813
2813
|
pm_visit_node((const pm_node_t *) cast->statements, visitor, data);
|
2814
2814
|
}
|
2815
2815
|
|
2816
|
-
// Visit the
|
2817
|
-
if (cast->
|
2818
|
-
pm_visit_node((const pm_node_t *) cast->
|
2816
|
+
// Visit the subsequent field
|
2817
|
+
if (cast->subsequent != NULL) {
|
2818
|
+
pm_visit_node((const pm_node_t *) cast->subsequent, visitor, data);
|
2819
2819
|
}
|
2820
2820
|
|
2821
2821
|
break;
|
@@ -2927,9 +2927,9 @@ pm_visit_child_nodes(const pm_node_t *node, bool (*visitor)(const pm_node_t *nod
|
|
2927
2927
|
pm_visit_node((const pm_node_t *) cast->statements, visitor, data);
|
2928
2928
|
}
|
2929
2929
|
|
2930
|
-
// Visit the
|
2931
|
-
if (cast->
|
2932
|
-
pm_visit_node((const pm_node_t *) cast->
|
2930
|
+
// Visit the else_clause field
|
2931
|
+
if (cast->else_clause != NULL) {
|
2932
|
+
pm_visit_node((const pm_node_t *) cast->else_clause, visitor, data);
|
2933
2933
|
}
|
2934
2934
|
|
2935
2935
|
break;
|
@@ -3120,9 +3120,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
3120
3120
|
const pm_arguments_node_t *cast = (const pm_arguments_node_t *) node;
|
3121
3121
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
3122
3122
|
|
3123
|
-
// Dump the
|
3123
|
+
// Dump the ArgumentsNodeFlags field
|
3124
3124
|
pm_buffer_append_byte(buffer, ',');
|
3125
|
-
pm_buffer_append_string(buffer, "\"
|
3125
|
+
pm_buffer_append_string(buffer, "\"ArgumentsNodeFlags\":", 21);
|
3126
3126
|
size_t flags = 0;
|
3127
3127
|
pm_buffer_append_byte(buffer, '[');
|
3128
3128
|
if (PM_NODE_FLAG_P(cast, PM_ARGUMENTS_NODE_FLAGS_CONTAINS_KEYWORDS)) {
|
@@ -3135,6 +3135,11 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
3135
3135
|
pm_buffer_append_string(buffer, "\"CONTAINS_KEYWORD_SPLAT\"", 24);
|
3136
3136
|
flags++;
|
3137
3137
|
}
|
3138
|
+
if (PM_NODE_FLAG_P(cast, PM_ARGUMENTS_NODE_FLAGS_CONTAINS_SPLAT)) {
|
3139
|
+
if (flags != 0) pm_buffer_append_byte(buffer, ',');
|
3140
|
+
pm_buffer_append_string(buffer, "\"CONTAINS_SPLAT\"", 16);
|
3141
|
+
flags++;
|
3142
|
+
}
|
3138
3143
|
pm_buffer_append_byte(buffer, ']');
|
3139
3144
|
|
3140
3145
|
// Dump the arguments field
|
@@ -3158,9 +3163,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
3158
3163
|
const pm_array_node_t *cast = (const pm_array_node_t *) node;
|
3159
3164
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
3160
3165
|
|
3161
|
-
// Dump the
|
3166
|
+
// Dump the ArrayNodeFlags field
|
3162
3167
|
pm_buffer_append_byte(buffer, ',');
|
3163
|
-
pm_buffer_append_string(buffer, "\"
|
3168
|
+
pm_buffer_append_string(buffer, "\"ArrayNodeFlags\":", 17);
|
3164
3169
|
size_t flags = 0;
|
3165
3170
|
pm_buffer_append_byte(buffer, '[');
|
3166
3171
|
if (PM_NODE_FLAG_P(cast, PM_ARRAY_NODE_FLAGS_CONTAINS_SPLAT)) {
|
@@ -3429,9 +3434,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
3429
3434
|
const pm_block_local_variable_node_t *cast = (const pm_block_local_variable_node_t *) node;
|
3430
3435
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
3431
3436
|
|
3432
|
-
// Dump the
|
3437
|
+
// Dump the ParameterFlags field
|
3433
3438
|
pm_buffer_append_byte(buffer, ',');
|
3434
|
-
pm_buffer_append_string(buffer, "\"
|
3439
|
+
pm_buffer_append_string(buffer, "\"ParameterFlags\":", 17);
|
3435
3440
|
size_t flags = 0;
|
3436
3441
|
pm_buffer_append_byte(buffer, '[');
|
3437
3442
|
if (PM_NODE_FLAG_P(cast, PM_PARAMETER_FLAGS_REPEATED_PARAMETER)) {
|
@@ -3504,9 +3509,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
3504
3509
|
const pm_block_parameter_node_t *cast = (const pm_block_parameter_node_t *) node;
|
3505
3510
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
3506
3511
|
|
3507
|
-
// Dump the
|
3512
|
+
// Dump the ParameterFlags field
|
3508
3513
|
pm_buffer_append_byte(buffer, ',');
|
3509
|
-
pm_buffer_append_string(buffer, "\"
|
3514
|
+
pm_buffer_append_string(buffer, "\"ParameterFlags\":", 17);
|
3510
3515
|
size_t flags = 0;
|
3511
3516
|
pm_buffer_append_byte(buffer, '[');
|
3512
3517
|
if (PM_NODE_FLAG_P(cast, PM_PARAMETER_FLAGS_REPEATED_PARAMETER)) {
|
@@ -3619,9 +3624,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
3619
3624
|
const pm_call_and_write_node_t *cast = (const pm_call_and_write_node_t *) node;
|
3620
3625
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
3621
3626
|
|
3622
|
-
// Dump the
|
3627
|
+
// Dump the CallNodeFlags field
|
3623
3628
|
pm_buffer_append_byte(buffer, ',');
|
3624
|
-
pm_buffer_append_string(buffer, "\"
|
3629
|
+
pm_buffer_append_string(buffer, "\"CallNodeFlags\":", 16);
|
3625
3630
|
size_t flags = 0;
|
3626
3631
|
pm_buffer_append_byte(buffer, '[');
|
3627
3632
|
if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
|
@@ -3702,9 +3707,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
3702
3707
|
const pm_call_node_t *cast = (const pm_call_node_t *) node;
|
3703
3708
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
3704
3709
|
|
3705
|
-
// Dump the
|
3710
|
+
// Dump the CallNodeFlags field
|
3706
3711
|
pm_buffer_append_byte(buffer, ',');
|
3707
|
-
pm_buffer_append_string(buffer, "\"
|
3712
|
+
pm_buffer_append_string(buffer, "\"CallNodeFlags\":", 16);
|
3708
3713
|
size_t flags = 0;
|
3709
3714
|
pm_buffer_append_byte(buffer, '[');
|
3710
3715
|
if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
|
@@ -3806,9 +3811,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
3806
3811
|
const pm_call_operator_write_node_t *cast = (const pm_call_operator_write_node_t *) node;
|
3807
3812
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
3808
3813
|
|
3809
|
-
// Dump the
|
3814
|
+
// Dump the CallNodeFlags field
|
3810
3815
|
pm_buffer_append_byte(buffer, ',');
|
3811
|
-
pm_buffer_append_string(buffer, "\"
|
3816
|
+
pm_buffer_append_string(buffer, "\"CallNodeFlags\":", 16);
|
3812
3817
|
size_t flags = 0;
|
3813
3818
|
pm_buffer_append_byte(buffer, '[');
|
3814
3819
|
if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
|
@@ -3894,9 +3899,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
3894
3899
|
const pm_call_or_write_node_t *cast = (const pm_call_or_write_node_t *) node;
|
3895
3900
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
3896
3901
|
|
3897
|
-
// Dump the
|
3902
|
+
// Dump the CallNodeFlags field
|
3898
3903
|
pm_buffer_append_byte(buffer, ',');
|
3899
|
-
pm_buffer_append_string(buffer, "\"
|
3904
|
+
pm_buffer_append_string(buffer, "\"CallNodeFlags\":", 16);
|
3900
3905
|
size_t flags = 0;
|
3901
3906
|
pm_buffer_append_byte(buffer, '[');
|
3902
3907
|
if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
|
@@ -3977,9 +3982,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
3977
3982
|
const pm_call_target_node_t *cast = (const pm_call_target_node_t *) node;
|
3978
3983
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
3979
3984
|
|
3980
|
-
// Dump the
|
3985
|
+
// Dump the CallNodeFlags field
|
3981
3986
|
pm_buffer_append_byte(buffer, ',');
|
3982
|
-
pm_buffer_append_string(buffer, "\"
|
3987
|
+
pm_buffer_append_string(buffer, "\"CallNodeFlags\":", 16);
|
3983
3988
|
size_t flags = 0;
|
3984
3989
|
pm_buffer_append_byte(buffer, '[');
|
3985
3990
|
if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
|
@@ -4078,11 +4083,11 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
4078
4083
|
}
|
4079
4084
|
pm_buffer_append_byte(buffer, ']');
|
4080
4085
|
|
4081
|
-
// Dump the
|
4086
|
+
// Dump the else_clause field
|
4082
4087
|
pm_buffer_append_byte(buffer, ',');
|
4083
|
-
pm_buffer_append_string(buffer, "\"
|
4084
|
-
if (cast->
|
4085
|
-
pm_dump_json(buffer, parser, (const pm_node_t *) cast->
|
4088
|
+
pm_buffer_append_string(buffer, "\"else_clause\":", 14);
|
4089
|
+
if (cast->else_clause != NULL) {
|
4090
|
+
pm_dump_json(buffer, parser, (const pm_node_t *) cast->else_clause);
|
4086
4091
|
} else {
|
4087
4092
|
pm_buffer_append_string(buffer, "null", 4);
|
4088
4093
|
}
|
@@ -4127,11 +4132,11 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
4127
4132
|
}
|
4128
4133
|
pm_buffer_append_byte(buffer, ']');
|
4129
4134
|
|
4130
|
-
// Dump the
|
4135
|
+
// Dump the else_clause field
|
4131
4136
|
pm_buffer_append_byte(buffer, ',');
|
4132
|
-
pm_buffer_append_string(buffer, "\"
|
4133
|
-
if (cast->
|
4134
|
-
pm_dump_json(buffer, parser, (const pm_node_t *) cast->
|
4137
|
+
pm_buffer_append_string(buffer, "\"else_clause\":", 14);
|
4138
|
+
if (cast->else_clause != NULL) {
|
4139
|
+
pm_dump_json(buffer, parser, (const pm_node_t *) cast->else_clause);
|
4135
4140
|
} else {
|
4136
4141
|
pm_buffer_append_string(buffer, "null", 4);
|
4137
4142
|
}
|
@@ -5015,9 +5020,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
5015
5020
|
const pm_flip_flop_node_t *cast = (const pm_flip_flop_node_t *) node;
|
5016
5021
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
5017
5022
|
|
5018
|
-
// Dump the
|
5023
|
+
// Dump the RangeFlags field
|
5019
5024
|
pm_buffer_append_byte(buffer, ',');
|
5020
|
-
pm_buffer_append_string(buffer, "\"
|
5025
|
+
pm_buffer_append_string(buffer, "\"RangeFlags\":", 13);
|
5021
5026
|
size_t flags = 0;
|
5022
5027
|
pm_buffer_append_byte(buffer, '[');
|
5023
5028
|
if (PM_NODE_FLAG_P(cast, PM_RANGE_FLAGS_EXCLUDE_END)) {
|
@@ -5430,11 +5435,11 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
5430
5435
|
pm_buffer_append_string(buffer, "null", 4);
|
5431
5436
|
}
|
5432
5437
|
|
5433
|
-
// Dump the
|
5438
|
+
// Dump the subsequent field
|
5434
5439
|
pm_buffer_append_byte(buffer, ',');
|
5435
|
-
pm_buffer_append_string(buffer, "\"
|
5436
|
-
if (cast->
|
5437
|
-
pm_dump_json(buffer, parser, (const pm_node_t *) cast->
|
5440
|
+
pm_buffer_append_string(buffer, "\"subsequent\":", 13);
|
5441
|
+
if (cast->subsequent != NULL) {
|
5442
|
+
pm_dump_json(buffer, parser, (const pm_node_t *) cast->subsequent);
|
5438
5443
|
} else {
|
5439
5444
|
pm_buffer_append_string(buffer, "null", 4);
|
5440
5445
|
}
|
@@ -5531,9 +5536,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
5531
5536
|
const pm_index_and_write_node_t *cast = (const pm_index_and_write_node_t *) node;
|
5532
5537
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
5533
5538
|
|
5534
|
-
// Dump the
|
5539
|
+
// Dump the CallNodeFlags field
|
5535
5540
|
pm_buffer_append_byte(buffer, ',');
|
5536
|
-
pm_buffer_append_string(buffer, "\"
|
5541
|
+
pm_buffer_append_string(buffer, "\"CallNodeFlags\":", 16);
|
5537
5542
|
size_t flags = 0;
|
5538
5543
|
pm_buffer_append_byte(buffer, '[');
|
5539
5544
|
if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
|
@@ -5623,9 +5628,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
5623
5628
|
const pm_index_operator_write_node_t *cast = (const pm_index_operator_write_node_t *) node;
|
5624
5629
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
5625
5630
|
|
5626
|
-
// Dump the
|
5631
|
+
// Dump the CallNodeFlags field
|
5627
5632
|
pm_buffer_append_byte(buffer, ',');
|
5628
|
-
pm_buffer_append_string(buffer, "\"
|
5633
|
+
pm_buffer_append_string(buffer, "\"CallNodeFlags\":", 16);
|
5629
5634
|
size_t flags = 0;
|
5630
5635
|
pm_buffer_append_byte(buffer, '[');
|
5631
5636
|
if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
|
@@ -5720,9 +5725,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
5720
5725
|
const pm_index_or_write_node_t *cast = (const pm_index_or_write_node_t *) node;
|
5721
5726
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
5722
5727
|
|
5723
|
-
// Dump the
|
5728
|
+
// Dump the CallNodeFlags field
|
5724
5729
|
pm_buffer_append_byte(buffer, ',');
|
5725
|
-
pm_buffer_append_string(buffer, "\"
|
5730
|
+
pm_buffer_append_string(buffer, "\"CallNodeFlags\":", 16);
|
5726
5731
|
size_t flags = 0;
|
5727
5732
|
pm_buffer_append_byte(buffer, '[');
|
5728
5733
|
if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
|
@@ -5812,9 +5817,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
5812
5817
|
const pm_index_target_node_t *cast = (const pm_index_target_node_t *) node;
|
5813
5818
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
5814
5819
|
|
5815
|
-
// Dump the
|
5820
|
+
// Dump the CallNodeFlags field
|
5816
5821
|
pm_buffer_append_byte(buffer, ',');
|
5817
|
-
pm_buffer_append_string(buffer, "\"
|
5822
|
+
pm_buffer_append_string(buffer, "\"CallNodeFlags\":", 16);
|
5818
5823
|
size_t flags = 0;
|
5819
5824
|
pm_buffer_append_byte(buffer, '[');
|
5820
5825
|
if (PM_NODE_FLAG_P(cast, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION)) {
|
@@ -6030,9 +6035,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
6030
6035
|
const pm_integer_node_t *cast = (const pm_integer_node_t *) node;
|
6031
6036
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
6032
6037
|
|
6033
|
-
// Dump the
|
6038
|
+
// Dump the IntegerBaseFlags field
|
6034
6039
|
pm_buffer_append_byte(buffer, ',');
|
6035
|
-
pm_buffer_append_string(buffer, "\"
|
6040
|
+
pm_buffer_append_string(buffer, "\"IntegerBaseFlags\":", 19);
|
6036
6041
|
size_t flags = 0;
|
6037
6042
|
pm_buffer_append_byte(buffer, '[');
|
6038
6043
|
if (PM_NODE_FLAG_P(cast, PM_INTEGER_BASE_FLAGS_BINARY)) {
|
@@ -6071,9 +6076,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
6071
6076
|
const pm_interpolated_match_last_line_node_t *cast = (const pm_interpolated_match_last_line_node_t *) node;
|
6072
6077
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
6073
6078
|
|
6074
|
-
// Dump the
|
6079
|
+
// Dump the RegularExpressionFlags field
|
6075
6080
|
pm_buffer_append_byte(buffer, ',');
|
6076
|
-
pm_buffer_append_string(buffer, "\"
|
6081
|
+
pm_buffer_append_string(buffer, "\"RegularExpressionFlags\":", 25);
|
6077
6082
|
size_t flags = 0;
|
6078
6083
|
pm_buffer_append_byte(buffer, '[');
|
6079
6084
|
if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE)) {
|
@@ -6164,9 +6169,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
6164
6169
|
const pm_interpolated_regular_expression_node_t *cast = (const pm_interpolated_regular_expression_node_t *) node;
|
6165
6170
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
6166
6171
|
|
6167
|
-
// Dump the
|
6172
|
+
// Dump the RegularExpressionFlags field
|
6168
6173
|
pm_buffer_append_byte(buffer, ',');
|
6169
|
-
pm_buffer_append_string(buffer, "\"
|
6174
|
+
pm_buffer_append_string(buffer, "\"RegularExpressionFlags\":", 25);
|
6170
6175
|
size_t flags = 0;
|
6171
6176
|
pm_buffer_append_byte(buffer, '[');
|
6172
6177
|
if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE)) {
|
@@ -6257,9 +6262,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
6257
6262
|
const pm_interpolated_string_node_t *cast = (const pm_interpolated_string_node_t *) node;
|
6258
6263
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
6259
6264
|
|
6260
|
-
// Dump the
|
6265
|
+
// Dump the InterpolatedStringNodeFlags field
|
6261
6266
|
pm_buffer_append_byte(buffer, ',');
|
6262
|
-
pm_buffer_append_string(buffer, "\"
|
6267
|
+
pm_buffer_append_string(buffer, "\"InterpolatedStringNodeFlags\":", 30);
|
6263
6268
|
size_t flags = 0;
|
6264
6269
|
pm_buffer_append_byte(buffer, '[');
|
6265
6270
|
if (PM_NODE_FLAG_P(cast, PM_INTERPOLATED_STRING_NODE_FLAGS_FROZEN)) {
|
@@ -6401,9 +6406,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
6401
6406
|
const pm_keyword_hash_node_t *cast = (const pm_keyword_hash_node_t *) node;
|
6402
6407
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
6403
6408
|
|
6404
|
-
// Dump the
|
6409
|
+
// Dump the KeywordHashNodeFlags field
|
6405
6410
|
pm_buffer_append_byte(buffer, ',');
|
6406
|
-
pm_buffer_append_string(buffer, "\"
|
6411
|
+
pm_buffer_append_string(buffer, "\"KeywordHashNodeFlags\":", 23);
|
6407
6412
|
size_t flags = 0;
|
6408
6413
|
pm_buffer_append_byte(buffer, '[');
|
6409
6414
|
if (PM_NODE_FLAG_P(cast, PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS)) {
|
@@ -6434,9 +6439,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
6434
6439
|
const pm_keyword_rest_parameter_node_t *cast = (const pm_keyword_rest_parameter_node_t *) node;
|
6435
6440
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
6436
6441
|
|
6437
|
-
// Dump the
|
6442
|
+
// Dump the ParameterFlags field
|
6438
6443
|
pm_buffer_append_byte(buffer, ',');
|
6439
|
-
pm_buffer_append_string(buffer, "\"
|
6444
|
+
pm_buffer_append_string(buffer, "\"ParameterFlags\":", 17);
|
6440
6445
|
size_t flags = 0;
|
6441
6446
|
pm_buffer_append_byte(buffer, '[');
|
6442
6447
|
if (PM_NODE_FLAG_P(cast, PM_PARAMETER_FLAGS_REPEATED_PARAMETER)) {
|
@@ -6711,9 +6716,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
6711
6716
|
const pm_match_last_line_node_t *cast = (const pm_match_last_line_node_t *) node;
|
6712
6717
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
6713
6718
|
|
6714
|
-
// Dump the
|
6719
|
+
// Dump the RegularExpressionFlags field
|
6715
6720
|
pm_buffer_append_byte(buffer, ',');
|
6716
|
-
pm_buffer_append_string(buffer, "\"
|
6721
|
+
pm_buffer_append_string(buffer, "\"RegularExpressionFlags\":", 25);
|
6717
6722
|
size_t flags = 0;
|
6718
6723
|
pm_buffer_append_byte(buffer, '[');
|
6719
6724
|
if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE)) {
|
@@ -7147,9 +7152,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
7147
7152
|
const pm_optional_keyword_parameter_node_t *cast = (const pm_optional_keyword_parameter_node_t *) node;
|
7148
7153
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
7149
7154
|
|
7150
|
-
// Dump the
|
7155
|
+
// Dump the ParameterFlags field
|
7151
7156
|
pm_buffer_append_byte(buffer, ',');
|
7152
|
-
pm_buffer_append_string(buffer, "\"
|
7157
|
+
pm_buffer_append_string(buffer, "\"ParameterFlags\":", 17);
|
7153
7158
|
size_t flags = 0;
|
7154
7159
|
pm_buffer_append_byte(buffer, '[');
|
7155
7160
|
if (PM_NODE_FLAG_P(cast, PM_PARAMETER_FLAGS_REPEATED_PARAMETER)) {
|
@@ -7183,9 +7188,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
7183
7188
|
const pm_optional_parameter_node_t *cast = (const pm_optional_parameter_node_t *) node;
|
7184
7189
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
7185
7190
|
|
7186
|
-
// Dump the
|
7191
|
+
// Dump the ParameterFlags field
|
7187
7192
|
pm_buffer_append_byte(buffer, ',');
|
7188
|
-
pm_buffer_append_string(buffer, "\"
|
7193
|
+
pm_buffer_append_string(buffer, "\"ParameterFlags\":", 17);
|
7189
7194
|
size_t flags = 0;
|
7190
7195
|
pm_buffer_append_byte(buffer, '[');
|
7191
7196
|
if (PM_NODE_FLAG_P(cast, PM_PARAMETER_FLAGS_REPEATED_PARAMETER)) {
|
@@ -7500,9 +7505,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
7500
7505
|
const pm_range_node_t *cast = (const pm_range_node_t *) node;
|
7501
7506
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
7502
7507
|
|
7503
|
-
// Dump the
|
7508
|
+
// Dump the RangeFlags field
|
7504
7509
|
pm_buffer_append_byte(buffer, ',');
|
7505
|
-
pm_buffer_append_string(buffer, "\"
|
7510
|
+
pm_buffer_append_string(buffer, "\"RangeFlags\":", 13);
|
7506
7511
|
size_t flags = 0;
|
7507
7512
|
pm_buffer_append_byte(buffer, '[');
|
7508
7513
|
if (PM_NODE_FLAG_P(cast, PM_RANGE_FLAGS_EXCLUDE_END)) {
|
@@ -7544,9 +7549,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
7544
7549
|
const pm_rational_node_t *cast = (const pm_rational_node_t *) node;
|
7545
7550
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
7546
7551
|
|
7547
|
-
// Dump the
|
7552
|
+
// Dump the IntegerBaseFlags field
|
7548
7553
|
pm_buffer_append_byte(buffer, ',');
|
7549
|
-
pm_buffer_append_string(buffer, "\"
|
7554
|
+
pm_buffer_append_string(buffer, "\"IntegerBaseFlags\":", 19);
|
7550
7555
|
size_t flags = 0;
|
7551
7556
|
pm_buffer_append_byte(buffer, '[');
|
7552
7557
|
if (PM_NODE_FLAG_P(cast, PM_INTEGER_BASE_FLAGS_BINARY)) {
|
@@ -7599,9 +7604,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
7599
7604
|
const pm_regular_expression_node_t *cast = (const pm_regular_expression_node_t *) node;
|
7600
7605
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
7601
7606
|
|
7602
|
-
// Dump the
|
7607
|
+
// Dump the RegularExpressionFlags field
|
7603
7608
|
pm_buffer_append_byte(buffer, ',');
|
7604
|
-
pm_buffer_append_string(buffer, "\"
|
7609
|
+
pm_buffer_append_string(buffer, "\"RegularExpressionFlags\":", 25);
|
7605
7610
|
size_t flags = 0;
|
7606
7611
|
pm_buffer_append_byte(buffer, '[');
|
7607
7612
|
if (PM_NODE_FLAG_P(cast, PM_REGULAR_EXPRESSION_FLAGS_IGNORE_CASE)) {
|
@@ -7693,9 +7698,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
7693
7698
|
const pm_required_keyword_parameter_node_t *cast = (const pm_required_keyword_parameter_node_t *) node;
|
7694
7699
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
7695
7700
|
|
7696
|
-
// Dump the
|
7701
|
+
// Dump the ParameterFlags field
|
7697
7702
|
pm_buffer_append_byte(buffer, ',');
|
7698
|
-
pm_buffer_append_string(buffer, "\"
|
7703
|
+
pm_buffer_append_string(buffer, "\"ParameterFlags\":", 17);
|
7699
7704
|
size_t flags = 0;
|
7700
7705
|
pm_buffer_append_byte(buffer, '[');
|
7701
7706
|
if (PM_NODE_FLAG_P(cast, PM_PARAMETER_FLAGS_REPEATED_PARAMETER)) {
|
@@ -7724,9 +7729,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
7724
7729
|
const pm_required_parameter_node_t *cast = (const pm_required_parameter_node_t *) node;
|
7725
7730
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
7726
7731
|
|
7727
|
-
// Dump the
|
7732
|
+
// Dump the ParameterFlags field
|
7728
7733
|
pm_buffer_append_byte(buffer, ',');
|
7729
|
-
pm_buffer_append_string(buffer, "\"
|
7734
|
+
pm_buffer_append_string(buffer, "\"ParameterFlags\":", 17);
|
7730
7735
|
size_t flags = 0;
|
7731
7736
|
pm_buffer_append_byte(buffer, '[');
|
7732
7737
|
if (PM_NODE_FLAG_P(cast, PM_PARAMETER_FLAGS_REPEATED_PARAMETER)) {
|
@@ -7818,11 +7823,11 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
7818
7823
|
pm_buffer_append_string(buffer, "null", 4);
|
7819
7824
|
}
|
7820
7825
|
|
7821
|
-
// Dump the
|
7826
|
+
// Dump the subsequent field
|
7822
7827
|
pm_buffer_append_byte(buffer, ',');
|
7823
|
-
pm_buffer_append_string(buffer, "\"
|
7824
|
-
if (cast->
|
7825
|
-
pm_dump_json(buffer, parser, (const pm_node_t *) cast->
|
7828
|
+
pm_buffer_append_string(buffer, "\"subsequent\":", 13);
|
7829
|
+
if (cast->subsequent != NULL) {
|
7830
|
+
pm_dump_json(buffer, parser, (const pm_node_t *) cast->subsequent);
|
7826
7831
|
} else {
|
7827
7832
|
pm_buffer_append_string(buffer, "null", 4);
|
7828
7833
|
}
|
@@ -7836,9 +7841,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
7836
7841
|
const pm_rest_parameter_node_t *cast = (const pm_rest_parameter_node_t *) node;
|
7837
7842
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
7838
7843
|
|
7839
|
-
// Dump the
|
7844
|
+
// Dump the ParameterFlags field
|
7840
7845
|
pm_buffer_append_byte(buffer, ',');
|
7841
|
-
pm_buffer_append_string(buffer, "\"
|
7846
|
+
pm_buffer_append_string(buffer, "\"ParameterFlags\":", 17);
|
7842
7847
|
size_t flags = 0;
|
7843
7848
|
pm_buffer_append_byte(buffer, '[');
|
7844
7849
|
if (PM_NODE_FLAG_P(cast, PM_PARAMETER_FLAGS_REPEATED_PARAMETER)) {
|
@@ -7889,18 +7894,6 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
7889
7894
|
const pm_return_node_t *cast = (const pm_return_node_t *) node;
|
7890
7895
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
7891
7896
|
|
7892
|
-
// Dump the flags field
|
7893
|
-
pm_buffer_append_byte(buffer, ',');
|
7894
|
-
pm_buffer_append_string(buffer, "\"flags\":", 8);
|
7895
|
-
size_t flags = 0;
|
7896
|
-
pm_buffer_append_byte(buffer, '[');
|
7897
|
-
if (PM_NODE_FLAG_P(cast, PM_RETURN_NODE_FLAGS_REDUNDANT)) {
|
7898
|
-
if (flags != 0) pm_buffer_append_byte(buffer, ',');
|
7899
|
-
pm_buffer_append_string(buffer, "\"REDUNDANT\"", 11);
|
7900
|
-
flags++;
|
7901
|
-
}
|
7902
|
-
pm_buffer_append_byte(buffer, ']');
|
7903
|
-
|
7904
7897
|
// Dump the keyword_loc field
|
7905
7898
|
pm_buffer_append_byte(buffer, ',');
|
7906
7899
|
pm_buffer_append_string(buffer, "\"keyword_loc\":", 14);
|
@@ -7933,9 +7926,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
7933
7926
|
const pm_shareable_constant_node_t *cast = (const pm_shareable_constant_node_t *) node;
|
7934
7927
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
7935
7928
|
|
7936
|
-
// Dump the
|
7929
|
+
// Dump the ShareableConstantNodeFlags field
|
7937
7930
|
pm_buffer_append_byte(buffer, ',');
|
7938
|
-
pm_buffer_append_string(buffer, "\"
|
7931
|
+
pm_buffer_append_string(buffer, "\"ShareableConstantNodeFlags\":", 29);
|
7939
7932
|
size_t flags = 0;
|
7940
7933
|
pm_buffer_append_byte(buffer, '[');
|
7941
7934
|
if (PM_NODE_FLAG_P(cast, PM_SHAREABLE_CONSTANT_NODE_FLAGS_LITERAL)) {
|
@@ -8028,9 +8021,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
8028
8021
|
const pm_source_file_node_t *cast = (const pm_source_file_node_t *) node;
|
8029
8022
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
8030
8023
|
|
8031
|
-
// Dump the
|
8024
|
+
// Dump the StringFlags field
|
8032
8025
|
pm_buffer_append_byte(buffer, ',');
|
8033
|
-
pm_buffer_append_string(buffer, "\"
|
8026
|
+
pm_buffer_append_string(buffer, "\"StringFlags\":", 14);
|
8034
8027
|
size_t flags = 0;
|
8035
8028
|
pm_buffer_append_byte(buffer, '[');
|
8036
8029
|
if (PM_NODE_FLAG_P(cast, PM_STRING_FLAGS_FORCED_UTF8_ENCODING)) {
|
@@ -8125,9 +8118,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
8125
8118
|
const pm_string_node_t *cast = (const pm_string_node_t *) node;
|
8126
8119
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
8127
8120
|
|
8128
|
-
// Dump the
|
8121
|
+
// Dump the StringFlags field
|
8129
8122
|
pm_buffer_append_byte(buffer, ',');
|
8130
|
-
pm_buffer_append_string(buffer, "\"
|
8123
|
+
pm_buffer_append_string(buffer, "\"StringFlags\":", 14);
|
8131
8124
|
size_t flags = 0;
|
8132
8125
|
pm_buffer_append_byte(buffer, '[');
|
8133
8126
|
if (PM_NODE_FLAG_P(cast, PM_STRING_FLAGS_FORCED_UTF8_ENCODING)) {
|
@@ -8242,9 +8235,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
8242
8235
|
const pm_symbol_node_t *cast = (const pm_symbol_node_t *) node;
|
8243
8236
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
8244
8237
|
|
8245
|
-
// Dump the
|
8238
|
+
// Dump the SymbolFlags field
|
8246
8239
|
pm_buffer_append_byte(buffer, ',');
|
8247
|
-
pm_buffer_append_string(buffer, "\"
|
8240
|
+
pm_buffer_append_string(buffer, "\"SymbolFlags\":", 14);
|
8248
8241
|
size_t flags = 0;
|
8249
8242
|
pm_buffer_append_byte(buffer, '[');
|
8250
8243
|
if (PM_NODE_FLAG_P(cast, PM_SYMBOL_FLAGS_FORCED_UTF8_ENCODING)) {
|
@@ -8371,11 +8364,11 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
8371
8364
|
pm_buffer_append_string(buffer, "null", 4);
|
8372
8365
|
}
|
8373
8366
|
|
8374
|
-
// Dump the
|
8367
|
+
// Dump the else_clause field
|
8375
8368
|
pm_buffer_append_byte(buffer, ',');
|
8376
|
-
pm_buffer_append_string(buffer, "\"
|
8377
|
-
if (cast->
|
8378
|
-
pm_dump_json(buffer, parser, (const pm_node_t *) cast->
|
8369
|
+
pm_buffer_append_string(buffer, "\"else_clause\":", 14);
|
8370
|
+
if (cast->else_clause != NULL) {
|
8371
|
+
pm_dump_json(buffer, parser, (const pm_node_t *) cast->else_clause);
|
8379
8372
|
} else {
|
8380
8373
|
pm_buffer_append_string(buffer, "null", 4);
|
8381
8374
|
}
|
@@ -8398,9 +8391,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
8398
8391
|
const pm_until_node_t *cast = (const pm_until_node_t *) node;
|
8399
8392
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
8400
8393
|
|
8401
|
-
// Dump the
|
8394
|
+
// Dump the LoopFlags field
|
8402
8395
|
pm_buffer_append_byte(buffer, ',');
|
8403
|
-
pm_buffer_append_string(buffer, "\"
|
8396
|
+
pm_buffer_append_string(buffer, "\"LoopFlags\":", 12);
|
8404
8397
|
size_t flags = 0;
|
8405
8398
|
pm_buffer_append_byte(buffer, '[');
|
8406
8399
|
if (PM_NODE_FLAG_P(cast, PM_LOOP_FLAGS_BEGIN_MODIFIER)) {
|
@@ -8491,9 +8484,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
8491
8484
|
const pm_while_node_t *cast = (const pm_while_node_t *) node;
|
8492
8485
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
8493
8486
|
|
8494
|
-
// Dump the
|
8487
|
+
// Dump the LoopFlags field
|
8495
8488
|
pm_buffer_append_byte(buffer, ',');
|
8496
|
-
pm_buffer_append_string(buffer, "\"
|
8489
|
+
pm_buffer_append_string(buffer, "\"LoopFlags\":", 12);
|
8497
8490
|
size_t flags = 0;
|
8498
8491
|
pm_buffer_append_byte(buffer, '[');
|
8499
8492
|
if (PM_NODE_FLAG_P(cast, PM_LOOP_FLAGS_BEGIN_MODIFIER)) {
|
@@ -8540,9 +8533,9 @@ pm_dump_json(pm_buffer_t *buffer, const pm_parser_t *parser, const pm_node_t *no
|
|
8540
8533
|
const pm_x_string_node_t *cast = (const pm_x_string_node_t *) node;
|
8541
8534
|
pm_dump_json_location(buffer, parser, &cast->base.location);
|
8542
8535
|
|
8543
|
-
// Dump the
|
8536
|
+
// Dump the EncodingFlags field
|
8544
8537
|
pm_buffer_append_byte(buffer, ',');
|
8545
|
-
pm_buffer_append_string(buffer, "\"
|
8538
|
+
pm_buffer_append_string(buffer, "\"EncodingFlags\":", 16);
|
8546
8539
|
size_t flags = 0;
|
8547
8540
|
pm_buffer_append_byte(buffer, '[');
|
8548
8541
|
if (PM_NODE_FLAG_P(cast, PM_ENCODING_FLAGS_FORCED_UTF8_ENCODING)) {
|