prism 0.18.0 → 0.19.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 +2 -1
- data/config.yml +188 -55
- data/docs/building.md +9 -2
- data/docs/configuration.md +10 -9
- data/docs/encoding.md +24 -56
- data/docs/local_variable_depth.md +229 -0
- data/docs/ruby_api.md +2 -0
- data/docs/serialization.md +18 -13
- data/ext/prism/api_node.c +337 -195
- data/ext/prism/extconf.rb +13 -7
- data/ext/prism/extension.c +96 -32
- data/ext/prism/extension.h +1 -1
- data/include/prism/ast.h +340 -137
- data/include/prism/defines.h +17 -0
- data/include/prism/diagnostic.h +11 -5
- data/include/prism/encoding.h +248 -0
- data/include/prism/options.h +2 -2
- data/include/prism/parser.h +62 -42
- data/include/prism/regexp.h +2 -2
- data/include/prism/util/pm_buffer.h +9 -1
- data/include/prism/util/pm_memchr.h +2 -2
- data/include/prism/util/pm_strpbrk.h +3 -3
- data/include/prism/version.h +2 -2
- data/include/prism.h +13 -15
- data/lib/prism/compiler.rb +12 -0
- data/lib/prism/debug.rb +9 -4
- data/lib/prism/desugar_compiler.rb +3 -3
- data/lib/prism/dispatcher.rb +56 -0
- data/lib/prism/dot_visitor.rb +476 -198
- data/lib/prism/dsl.rb +66 -46
- data/lib/prism/ffi.rb +16 -3
- data/lib/prism/lex_compat.rb +19 -9
- data/lib/prism/mutation_compiler.rb +20 -0
- data/lib/prism/node.rb +1173 -450
- data/lib/prism/node_ext.rb +41 -16
- data/lib/prism/parse_result.rb +12 -15
- data/lib/prism/ripper_compat.rb +49 -34
- data/lib/prism/serialize.rb +242 -212
- data/lib/prism/visitor.rb +12 -0
- data/lib/prism.rb +20 -4
- data/prism.gemspec +4 -10
- data/rbi/prism.rbi +605 -230
- data/rbi/prism_static.rbi +3 -0
- data/sig/prism.rbs +379 -124
- data/sig/prism_static.rbs +1 -0
- data/src/diagnostic.c +228 -222
- data/src/encoding.c +5137 -0
- data/src/node.c +66 -0
- data/src/options.c +21 -2
- data/src/prettyprint.c +806 -406
- data/src/prism.c +1092 -700
- data/src/regexp.c +3 -3
- data/src/serialize.c +227 -157
- data/src/util/pm_buffer.c +10 -1
- data/src/util/pm_memchr.c +1 -1
- data/src/util/pm_strpbrk.c +4 -4
- metadata +5 -11
- data/include/prism/enc/pm_encoding.h +0 -227
- data/src/enc/pm_big5.c +0 -116
- data/src/enc/pm_cp51932.c +0 -57
- data/src/enc/pm_euc_jp.c +0 -69
- data/src/enc/pm_gbk.c +0 -65
- data/src/enc/pm_shift_jis.c +0 -57
- data/src/enc/pm_tables.c +0 -2073
- data/src/enc/pm_unicode.c +0 -2369
- data/src/enc/pm_windows_31j.c +0 -57
data/ext/prism/api_node.c
CHANGED
@@ -35,6 +35,7 @@ static VALUE rb_cPrismCallAndWriteNode;
|
|
35
35
|
static VALUE rb_cPrismCallNode;
|
36
36
|
static VALUE rb_cPrismCallOperatorWriteNode;
|
37
37
|
static VALUE rb_cPrismCallOrWriteNode;
|
38
|
+
static VALUE rb_cPrismCallTargetNode;
|
38
39
|
static VALUE rb_cPrismCapturePatternNode;
|
39
40
|
static VALUE rb_cPrismCaseMatchNode;
|
40
41
|
static VALUE rb_cPrismCaseNode;
|
@@ -82,10 +83,12 @@ static VALUE rb_cPrismHashPatternNode;
|
|
82
83
|
static VALUE rb_cPrismIfNode;
|
83
84
|
static VALUE rb_cPrismImaginaryNode;
|
84
85
|
static VALUE rb_cPrismImplicitNode;
|
86
|
+
static VALUE rb_cPrismImplicitRestNode;
|
85
87
|
static VALUE rb_cPrismInNode;
|
86
88
|
static VALUE rb_cPrismIndexAndWriteNode;
|
87
89
|
static VALUE rb_cPrismIndexOperatorWriteNode;
|
88
90
|
static VALUE rb_cPrismIndexOrWriteNode;
|
91
|
+
static VALUE rb_cPrismIndexTargetNode;
|
89
92
|
static VALUE rb_cPrismInstanceVariableAndWriteNode;
|
90
93
|
static VALUE rb_cPrismInstanceVariableOperatorWriteNode;
|
91
94
|
static VALUE rb_cPrismInstanceVariableOrWriteNode;
|
@@ -118,6 +121,7 @@ static VALUE rb_cPrismMultiWriteNode;
|
|
118
121
|
static VALUE rb_cPrismNextNode;
|
119
122
|
static VALUE rb_cPrismNilNode;
|
120
123
|
static VALUE rb_cPrismNoKeywordsParameterNode;
|
124
|
+
static VALUE rb_cPrismNumberedParametersNode;
|
121
125
|
static VALUE rb_cPrismNumberedReferenceReadNode;
|
122
126
|
static VALUE rb_cPrismOptionalKeywordParameterNode;
|
123
127
|
static VALUE rb_cPrismOptionalParameterNode;
|
@@ -194,7 +198,7 @@ pm_source_new(pm_parser_t *parser, rb_encoding *encoding) {
|
|
194
198
|
rb_ary_push(offsets, INT2FIX(parser->newline_list.offsets[index]));
|
195
199
|
}
|
196
200
|
|
197
|
-
VALUE source_argv[] = { source,
|
201
|
+
VALUE source_argv[] = { source, LONG2NUM(parser->start_line), offsets };
|
198
202
|
return rb_class_new_instance(3, source_argv, rb_cPrismSource);
|
199
203
|
}
|
200
204
|
|
@@ -396,6 +400,12 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
396
400
|
pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
|
397
401
|
break;
|
398
402
|
}
|
403
|
+
#line 118 "api_node.c.erb"
|
404
|
+
case PM_CALL_TARGET_NODE: {
|
405
|
+
pm_call_target_node_t *cast = (pm_call_target_node_t *) node;
|
406
|
+
pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
|
407
|
+
break;
|
408
|
+
}
|
399
409
|
#line 118 "api_node.c.erb"
|
400
410
|
case PM_CAPTURE_PATTERN_NODE: {
|
401
411
|
pm_capture_pattern_node_t *cast = (pm_capture_pattern_node_t *) node;
|
@@ -687,6 +697,14 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
687
697
|
pm_node_stack_push(&node_stack, (pm_node_t *) cast->value);
|
688
698
|
break;
|
689
699
|
}
|
700
|
+
#line 118 "api_node.c.erb"
|
701
|
+
case PM_INDEX_TARGET_NODE: {
|
702
|
+
pm_index_target_node_t *cast = (pm_index_target_node_t *) node;
|
703
|
+
pm_node_stack_push(&node_stack, (pm_node_t *) cast->receiver);
|
704
|
+
pm_node_stack_push(&node_stack, (pm_node_t *) cast->arguments);
|
705
|
+
pm_node_stack_push(&node_stack, (pm_node_t *) cast->block);
|
706
|
+
break;
|
707
|
+
}
|
690
708
|
#line 118 "api_node.c.erb"
|
691
709
|
case PM_INSTANCE_VARIABLE_AND_WRITE_NODE: {
|
692
710
|
pm_instance_variable_and_write_node_t *cast = (pm_instance_variable_and_write_node_t *) node;
|
@@ -1141,17 +1159,17 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
1141
1159
|
pm_arguments_node_t *cast = (pm_arguments_node_t *) node;
|
1142
1160
|
VALUE argv[3];
|
1143
1161
|
|
1162
|
+
// flags
|
1163
|
+
#line 192 "api_node.c.erb"
|
1164
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
1165
|
+
|
1144
1166
|
// arguments
|
1145
1167
|
#line 158 "api_node.c.erb"
|
1146
|
-
argv[
|
1168
|
+
argv[1] = rb_ary_new_capa(cast->arguments.size);
|
1147
1169
|
for (size_t index = 0; index < cast->arguments.size; index++) {
|
1148
|
-
rb_ary_push(argv[
|
1170
|
+
rb_ary_push(argv[1], rb_ary_pop(value_stack));
|
1149
1171
|
}
|
1150
1172
|
|
1151
|
-
// flags
|
1152
|
-
#line 189 "api_node.c.erb"
|
1153
|
-
argv[1] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
1154
|
-
|
1155
1173
|
// location
|
1156
1174
|
argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
|
1157
1175
|
|
@@ -1161,27 +1179,31 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
1161
1179
|
#line 144 "api_node.c.erb"
|
1162
1180
|
case PM_ARRAY_NODE: {
|
1163
1181
|
pm_array_node_t *cast = (pm_array_node_t *) node;
|
1164
|
-
VALUE argv[
|
1182
|
+
VALUE argv[5];
|
1183
|
+
|
1184
|
+
// flags
|
1185
|
+
#line 192 "api_node.c.erb"
|
1186
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
1165
1187
|
|
1166
1188
|
// elements
|
1167
1189
|
#line 158 "api_node.c.erb"
|
1168
|
-
argv[
|
1190
|
+
argv[1] = rb_ary_new_capa(cast->elements.size);
|
1169
1191
|
for (size_t index = 0; index < cast->elements.size; index++) {
|
1170
|
-
rb_ary_push(argv[
|
1192
|
+
rb_ary_push(argv[1], rb_ary_pop(value_stack));
|
1171
1193
|
}
|
1172
1194
|
|
1173
1195
|
// opening_loc
|
1174
1196
|
#line 183 "api_node.c.erb"
|
1175
|
-
argv[
|
1197
|
+
argv[2] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
|
1176
1198
|
|
1177
1199
|
// closing_loc
|
1178
1200
|
#line 183 "api_node.c.erb"
|
1179
|
-
argv[
|
1201
|
+
argv[3] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
|
1180
1202
|
|
1181
1203
|
// location
|
1182
|
-
argv[
|
1204
|
+
argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
|
1183
1205
|
|
1184
|
-
rb_ary_push(value_stack, rb_class_new_instance(
|
1206
|
+
rb_ary_push(value_stack, rb_class_new_instance(5, argv, rb_cPrismArrayNode));
|
1185
1207
|
break;
|
1186
1208
|
}
|
1187
1209
|
#line 144 "api_node.c.erb"
|
@@ -1356,7 +1378,7 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
1356
1378
|
#line 144 "api_node.c.erb"
|
1357
1379
|
case PM_BLOCK_NODE: {
|
1358
1380
|
pm_block_node_t *cast = (pm_block_node_t *) node;
|
1359
|
-
VALUE argv[
|
1381
|
+
VALUE argv[7];
|
1360
1382
|
|
1361
1383
|
// locals
|
1362
1384
|
#line 173 "api_node.c.erb"
|
@@ -1366,26 +1388,30 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
1366
1388
|
rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
|
1367
1389
|
}
|
1368
1390
|
|
1391
|
+
// locals_body_index
|
1392
|
+
#line 189 "api_node.c.erb"
|
1393
|
+
argv[1] = ULONG2NUM(cast->locals_body_index);
|
1394
|
+
|
1369
1395
|
// parameters
|
1370
1396
|
#line 155 "api_node.c.erb"
|
1371
|
-
argv[
|
1397
|
+
argv[2] = rb_ary_pop(value_stack);
|
1372
1398
|
|
1373
1399
|
// body
|
1374
1400
|
#line 155 "api_node.c.erb"
|
1375
|
-
argv[
|
1401
|
+
argv[3] = rb_ary_pop(value_stack);
|
1376
1402
|
|
1377
1403
|
// opening_loc
|
1378
1404
|
#line 180 "api_node.c.erb"
|
1379
|
-
argv[
|
1405
|
+
argv[4] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
|
1380
1406
|
|
1381
1407
|
// closing_loc
|
1382
1408
|
#line 180 "api_node.c.erb"
|
1383
|
-
argv[
|
1409
|
+
argv[5] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
|
1384
1410
|
|
1385
1411
|
// location
|
1386
|
-
argv[
|
1412
|
+
argv[6] = pm_location_new(parser, node->location.start, node->location.end, source);
|
1387
1413
|
|
1388
|
-
rb_ary_push(value_stack, rb_class_new_instance(
|
1414
|
+
rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismBlockNode));
|
1389
1415
|
break;
|
1390
1416
|
}
|
1391
1417
|
#line 144 "api_node.c.erb"
|
@@ -1464,21 +1490,21 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
1464
1490
|
pm_call_and_write_node_t *cast = (pm_call_and_write_node_t *) node;
|
1465
1491
|
VALUE argv[9];
|
1466
1492
|
|
1493
|
+
// flags
|
1494
|
+
#line 192 "api_node.c.erb"
|
1495
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
1496
|
+
|
1467
1497
|
// receiver
|
1468
1498
|
#line 155 "api_node.c.erb"
|
1469
|
-
argv[
|
1499
|
+
argv[1] = rb_ary_pop(value_stack);
|
1470
1500
|
|
1471
1501
|
// call_operator_loc
|
1472
1502
|
#line 183 "api_node.c.erb"
|
1473
|
-
argv[
|
1503
|
+
argv[2] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source);
|
1474
1504
|
|
1475
1505
|
// message_loc
|
1476
1506
|
#line 183 "api_node.c.erb"
|
1477
|
-
argv[
|
1478
|
-
|
1479
|
-
// flags
|
1480
|
-
#line 189 "api_node.c.erb"
|
1481
|
-
argv[3] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
1507
|
+
argv[3] = cast->message_loc.start == NULL ? Qnil : pm_location_new(parser, cast->message_loc.start, cast->message_loc.end, source);
|
1482
1508
|
|
1483
1509
|
// read_name
|
1484
1510
|
#line 167 "api_node.c.erb"
|
@@ -1509,42 +1535,42 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
1509
1535
|
pm_call_node_t *cast = (pm_call_node_t *) node;
|
1510
1536
|
VALUE argv[10];
|
1511
1537
|
|
1538
|
+
// flags
|
1539
|
+
#line 192 "api_node.c.erb"
|
1540
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
1541
|
+
|
1512
1542
|
// receiver
|
1513
1543
|
#line 155 "api_node.c.erb"
|
1514
|
-
argv[
|
1544
|
+
argv[1] = rb_ary_pop(value_stack);
|
1515
1545
|
|
1516
1546
|
// call_operator_loc
|
1517
1547
|
#line 183 "api_node.c.erb"
|
1518
|
-
argv[
|
1548
|
+
argv[2] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source);
|
1549
|
+
|
1550
|
+
// name
|
1551
|
+
#line 167 "api_node.c.erb"
|
1552
|
+
assert(cast->name != 0);
|
1553
|
+
argv[3] = rb_id2sym(constants[cast->name - 1]);
|
1519
1554
|
|
1520
1555
|
// message_loc
|
1521
1556
|
#line 183 "api_node.c.erb"
|
1522
|
-
argv[
|
1557
|
+
argv[4] = cast->message_loc.start == NULL ? Qnil : pm_location_new(parser, cast->message_loc.start, cast->message_loc.end, source);
|
1523
1558
|
|
1524
1559
|
// opening_loc
|
1525
1560
|
#line 183 "api_node.c.erb"
|
1526
|
-
argv[
|
1561
|
+
argv[5] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
|
1527
1562
|
|
1528
1563
|
// arguments
|
1529
1564
|
#line 155 "api_node.c.erb"
|
1530
|
-
argv[
|
1565
|
+
argv[6] = rb_ary_pop(value_stack);
|
1531
1566
|
|
1532
1567
|
// closing_loc
|
1533
1568
|
#line 183 "api_node.c.erb"
|
1534
|
-
argv[
|
1569
|
+
argv[7] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
|
1535
1570
|
|
1536
1571
|
// block
|
1537
1572
|
#line 155 "api_node.c.erb"
|
1538
|
-
argv[
|
1539
|
-
|
1540
|
-
// flags
|
1541
|
-
#line 189 "api_node.c.erb"
|
1542
|
-
argv[7] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
1543
|
-
|
1544
|
-
// name
|
1545
|
-
#line 167 "api_node.c.erb"
|
1546
|
-
assert(cast->name != 0);
|
1547
|
-
argv[8] = rb_id2sym(constants[cast->name - 1]);
|
1573
|
+
argv[8] = rb_ary_pop(value_stack);
|
1548
1574
|
|
1549
1575
|
// location
|
1550
1576
|
argv[9] = pm_location_new(parser, node->location.start, node->location.end, source);
|
@@ -1557,21 +1583,21 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
1557
1583
|
pm_call_operator_write_node_t *cast = (pm_call_operator_write_node_t *) node;
|
1558
1584
|
VALUE argv[10];
|
1559
1585
|
|
1586
|
+
// flags
|
1587
|
+
#line 192 "api_node.c.erb"
|
1588
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
1589
|
+
|
1560
1590
|
// receiver
|
1561
1591
|
#line 155 "api_node.c.erb"
|
1562
|
-
argv[
|
1592
|
+
argv[1] = rb_ary_pop(value_stack);
|
1563
1593
|
|
1564
1594
|
// call_operator_loc
|
1565
1595
|
#line 183 "api_node.c.erb"
|
1566
|
-
argv[
|
1596
|
+
argv[2] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source);
|
1567
1597
|
|
1568
1598
|
// message_loc
|
1569
1599
|
#line 183 "api_node.c.erb"
|
1570
|
-
argv[
|
1571
|
-
|
1572
|
-
// flags
|
1573
|
-
#line 189 "api_node.c.erb"
|
1574
|
-
argv[3] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
1600
|
+
argv[3] = cast->message_loc.start == NULL ? Qnil : pm_location_new(parser, cast->message_loc.start, cast->message_loc.end, source);
|
1575
1601
|
|
1576
1602
|
// read_name
|
1577
1603
|
#line 167 "api_node.c.erb"
|
@@ -1607,21 +1633,21 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
1607
1633
|
pm_call_or_write_node_t *cast = (pm_call_or_write_node_t *) node;
|
1608
1634
|
VALUE argv[9];
|
1609
1635
|
|
1636
|
+
// flags
|
1637
|
+
#line 192 "api_node.c.erb"
|
1638
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
1639
|
+
|
1610
1640
|
// receiver
|
1611
1641
|
#line 155 "api_node.c.erb"
|
1612
|
-
argv[
|
1642
|
+
argv[1] = rb_ary_pop(value_stack);
|
1613
1643
|
|
1614
1644
|
// call_operator_loc
|
1615
1645
|
#line 183 "api_node.c.erb"
|
1616
|
-
argv[
|
1646
|
+
argv[2] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source);
|
1617
1647
|
|
1618
1648
|
// message_loc
|
1619
1649
|
#line 183 "api_node.c.erb"
|
1620
|
-
argv[
|
1621
|
-
|
1622
|
-
// flags
|
1623
|
-
#line 189 "api_node.c.erb"
|
1624
|
-
argv[3] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
1650
|
+
argv[3] = cast->message_loc.start == NULL ? Qnil : pm_location_new(parser, cast->message_loc.start, cast->message_loc.end, source);
|
1625
1651
|
|
1626
1652
|
// read_name
|
1627
1653
|
#line 167 "api_node.c.erb"
|
@@ -1647,6 +1673,38 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
1647
1673
|
rb_ary_push(value_stack, rb_class_new_instance(9, argv, rb_cPrismCallOrWriteNode));
|
1648
1674
|
break;
|
1649
1675
|
}
|
1676
|
+
#line 144 "api_node.c.erb"
|
1677
|
+
case PM_CALL_TARGET_NODE: {
|
1678
|
+
pm_call_target_node_t *cast = (pm_call_target_node_t *) node;
|
1679
|
+
VALUE argv[6];
|
1680
|
+
|
1681
|
+
// flags
|
1682
|
+
#line 192 "api_node.c.erb"
|
1683
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
1684
|
+
|
1685
|
+
// receiver
|
1686
|
+
#line 155 "api_node.c.erb"
|
1687
|
+
argv[1] = rb_ary_pop(value_stack);
|
1688
|
+
|
1689
|
+
// call_operator_loc
|
1690
|
+
#line 180 "api_node.c.erb"
|
1691
|
+
argv[2] = pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source);
|
1692
|
+
|
1693
|
+
// name
|
1694
|
+
#line 167 "api_node.c.erb"
|
1695
|
+
assert(cast->name != 0);
|
1696
|
+
argv[3] = rb_id2sym(constants[cast->name - 1]);
|
1697
|
+
|
1698
|
+
// message_loc
|
1699
|
+
#line 180 "api_node.c.erb"
|
1700
|
+
argv[4] = pm_location_new(parser, cast->message_loc.start, cast->message_loc.end, source);
|
1701
|
+
|
1702
|
+
// location
|
1703
|
+
argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
|
1704
|
+
|
1705
|
+
rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismCallTargetNode));
|
1706
|
+
break;
|
1707
|
+
}
|
1650
1708
|
#line 144 "api_node.c.erb"
|
1651
1709
|
case PM_CAPTURE_PATTERN_NODE: {
|
1652
1710
|
pm_capture_pattern_node_t *cast = (pm_capture_pattern_node_t *) node;
|
@@ -2230,7 +2288,7 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
2230
2288
|
#line 144 "api_node.c.erb"
|
2231
2289
|
case PM_DEF_NODE: {
|
2232
2290
|
pm_def_node_t *cast = (pm_def_node_t *) node;
|
2233
|
-
VALUE argv[
|
2291
|
+
VALUE argv[14];
|
2234
2292
|
|
2235
2293
|
// name
|
2236
2294
|
#line 167 "api_node.c.erb"
|
@@ -2261,34 +2319,38 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
2261
2319
|
rb_ary_push(argv[5], rb_id2sym(constants[cast->locals.ids[index] - 1]));
|
2262
2320
|
}
|
2263
2321
|
|
2322
|
+
// locals_body_index
|
2323
|
+
#line 189 "api_node.c.erb"
|
2324
|
+
argv[6] = ULONG2NUM(cast->locals_body_index);
|
2325
|
+
|
2264
2326
|
// def_keyword_loc
|
2265
2327
|
#line 180 "api_node.c.erb"
|
2266
|
-
argv[
|
2328
|
+
argv[7] = pm_location_new(parser, cast->def_keyword_loc.start, cast->def_keyword_loc.end, source);
|
2267
2329
|
|
2268
2330
|
// operator_loc
|
2269
2331
|
#line 183 "api_node.c.erb"
|
2270
|
-
argv[
|
2332
|
+
argv[8] = cast->operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
|
2271
2333
|
|
2272
2334
|
// lparen_loc
|
2273
2335
|
#line 183 "api_node.c.erb"
|
2274
|
-
argv[
|
2336
|
+
argv[9] = cast->lparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->lparen_loc.start, cast->lparen_loc.end, source);
|
2275
2337
|
|
2276
2338
|
// rparen_loc
|
2277
2339
|
#line 183 "api_node.c.erb"
|
2278
|
-
argv[
|
2340
|
+
argv[10] = cast->rparen_loc.start == NULL ? Qnil : pm_location_new(parser, cast->rparen_loc.start, cast->rparen_loc.end, source);
|
2279
2341
|
|
2280
2342
|
// equal_loc
|
2281
2343
|
#line 183 "api_node.c.erb"
|
2282
|
-
argv[
|
2344
|
+
argv[11] = cast->equal_loc.start == NULL ? Qnil : pm_location_new(parser, cast->equal_loc.start, cast->equal_loc.end, source);
|
2283
2345
|
|
2284
2346
|
// end_keyword_loc
|
2285
2347
|
#line 183 "api_node.c.erb"
|
2286
|
-
argv[
|
2348
|
+
argv[12] = cast->end_keyword_loc.start == NULL ? Qnil : pm_location_new(parser, cast->end_keyword_loc.start, cast->end_keyword_loc.end, source);
|
2287
2349
|
|
2288
2350
|
// location
|
2289
|
-
argv[
|
2351
|
+
argv[13] = pm_location_new(parser, node->location.start, node->location.end, source);
|
2290
2352
|
|
2291
|
-
rb_ary_push(value_stack, rb_class_new_instance(
|
2353
|
+
rb_ary_push(value_stack, rb_class_new_instance(14, argv, rb_cPrismDefNode));
|
2292
2354
|
break;
|
2293
2355
|
}
|
2294
2356
|
#line 144 "api_node.c.erb"
|
@@ -2459,21 +2521,21 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
2459
2521
|
pm_flip_flop_node_t *cast = (pm_flip_flop_node_t *) node;
|
2460
2522
|
VALUE argv[5];
|
2461
2523
|
|
2524
|
+
// flags
|
2525
|
+
#line 192 "api_node.c.erb"
|
2526
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
2527
|
+
|
2462
2528
|
// left
|
2463
2529
|
#line 155 "api_node.c.erb"
|
2464
|
-
argv[
|
2530
|
+
argv[1] = rb_ary_pop(value_stack);
|
2465
2531
|
|
2466
2532
|
// right
|
2467
2533
|
#line 155 "api_node.c.erb"
|
2468
|
-
argv[
|
2534
|
+
argv[2] = rb_ary_pop(value_stack);
|
2469
2535
|
|
2470
2536
|
// operator_loc
|
2471
2537
|
#line 180 "api_node.c.erb"
|
2472
|
-
argv[
|
2473
|
-
|
2474
|
-
// flags
|
2475
|
-
#line 189 "api_node.c.erb"
|
2476
|
-
argv[3] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
2538
|
+
argv[3] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
|
2477
2539
|
|
2478
2540
|
// location
|
2479
2541
|
argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
|
@@ -2836,6 +2898,16 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
2836
2898
|
rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismImplicitNode));
|
2837
2899
|
break;
|
2838
2900
|
}
|
2901
|
+
#line 144 "api_node.c.erb"
|
2902
|
+
case PM_IMPLICIT_REST_NODE: {
|
2903
|
+
VALUE argv[1];
|
2904
|
+
|
2905
|
+
// location
|
2906
|
+
argv[0] = pm_location_new(parser, node->location.start, node->location.end, source);
|
2907
|
+
|
2908
|
+
rb_ary_push(value_stack, rb_class_new_instance(1, argv, rb_cPrismImplicitRestNode));
|
2909
|
+
break;
|
2910
|
+
}
|
2839
2911
|
#line 144 "api_node.c.erb"
|
2840
2912
|
case PM_IN_NODE: {
|
2841
2913
|
pm_in_node_t *cast = (pm_in_node_t *) node;
|
@@ -2868,33 +2940,33 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
2868
2940
|
pm_index_and_write_node_t *cast = (pm_index_and_write_node_t *) node;
|
2869
2941
|
VALUE argv[10];
|
2870
2942
|
|
2943
|
+
// flags
|
2944
|
+
#line 192 "api_node.c.erb"
|
2945
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
2946
|
+
|
2871
2947
|
// receiver
|
2872
2948
|
#line 155 "api_node.c.erb"
|
2873
|
-
argv[
|
2949
|
+
argv[1] = rb_ary_pop(value_stack);
|
2874
2950
|
|
2875
2951
|
// call_operator_loc
|
2876
2952
|
#line 183 "api_node.c.erb"
|
2877
|
-
argv[
|
2953
|
+
argv[2] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source);
|
2878
2954
|
|
2879
2955
|
// opening_loc
|
2880
2956
|
#line 180 "api_node.c.erb"
|
2881
|
-
argv[
|
2957
|
+
argv[3] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
|
2882
2958
|
|
2883
2959
|
// arguments
|
2884
2960
|
#line 155 "api_node.c.erb"
|
2885
|
-
argv[
|
2961
|
+
argv[4] = rb_ary_pop(value_stack);
|
2886
2962
|
|
2887
2963
|
// closing_loc
|
2888
2964
|
#line 180 "api_node.c.erb"
|
2889
|
-
argv[
|
2965
|
+
argv[5] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
|
2890
2966
|
|
2891
2967
|
// block
|
2892
2968
|
#line 155 "api_node.c.erb"
|
2893
|
-
argv[
|
2894
|
-
|
2895
|
-
// flags
|
2896
|
-
#line 189 "api_node.c.erb"
|
2897
|
-
argv[6] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
2969
|
+
argv[6] = rb_ary_pop(value_stack);
|
2898
2970
|
|
2899
2971
|
// operator_loc
|
2900
2972
|
#line 180 "api_node.c.erb"
|
@@ -2915,33 +2987,33 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
2915
2987
|
pm_index_operator_write_node_t *cast = (pm_index_operator_write_node_t *) node;
|
2916
2988
|
VALUE argv[11];
|
2917
2989
|
|
2990
|
+
// flags
|
2991
|
+
#line 192 "api_node.c.erb"
|
2992
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
2993
|
+
|
2918
2994
|
// receiver
|
2919
2995
|
#line 155 "api_node.c.erb"
|
2920
|
-
argv[
|
2996
|
+
argv[1] = rb_ary_pop(value_stack);
|
2921
2997
|
|
2922
2998
|
// call_operator_loc
|
2923
2999
|
#line 183 "api_node.c.erb"
|
2924
|
-
argv[
|
3000
|
+
argv[2] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source);
|
2925
3001
|
|
2926
3002
|
// opening_loc
|
2927
3003
|
#line 180 "api_node.c.erb"
|
2928
|
-
argv[
|
3004
|
+
argv[3] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
|
2929
3005
|
|
2930
3006
|
// arguments
|
2931
3007
|
#line 155 "api_node.c.erb"
|
2932
|
-
argv[
|
3008
|
+
argv[4] = rb_ary_pop(value_stack);
|
2933
3009
|
|
2934
3010
|
// closing_loc
|
2935
3011
|
#line 180 "api_node.c.erb"
|
2936
|
-
argv[
|
3012
|
+
argv[5] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
|
2937
3013
|
|
2938
3014
|
// block
|
2939
3015
|
#line 155 "api_node.c.erb"
|
2940
|
-
argv[
|
2941
|
-
|
2942
|
-
// flags
|
2943
|
-
#line 189 "api_node.c.erb"
|
2944
|
-
argv[6] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
3016
|
+
argv[6] = rb_ary_pop(value_stack);
|
2945
3017
|
|
2946
3018
|
// operator
|
2947
3019
|
#line 167 "api_node.c.erb"
|
@@ -2967,33 +3039,33 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
2967
3039
|
pm_index_or_write_node_t *cast = (pm_index_or_write_node_t *) node;
|
2968
3040
|
VALUE argv[10];
|
2969
3041
|
|
3042
|
+
// flags
|
3043
|
+
#line 192 "api_node.c.erb"
|
3044
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
3045
|
+
|
2970
3046
|
// receiver
|
2971
3047
|
#line 155 "api_node.c.erb"
|
2972
|
-
argv[
|
3048
|
+
argv[1] = rb_ary_pop(value_stack);
|
2973
3049
|
|
2974
3050
|
// call_operator_loc
|
2975
3051
|
#line 183 "api_node.c.erb"
|
2976
|
-
argv[
|
3052
|
+
argv[2] = cast->call_operator_loc.start == NULL ? Qnil : pm_location_new(parser, cast->call_operator_loc.start, cast->call_operator_loc.end, source);
|
2977
3053
|
|
2978
3054
|
// opening_loc
|
2979
3055
|
#line 180 "api_node.c.erb"
|
2980
|
-
argv[
|
3056
|
+
argv[3] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
|
2981
3057
|
|
2982
3058
|
// arguments
|
2983
3059
|
#line 155 "api_node.c.erb"
|
2984
|
-
argv[
|
3060
|
+
argv[4] = rb_ary_pop(value_stack);
|
2985
3061
|
|
2986
3062
|
// closing_loc
|
2987
3063
|
#line 180 "api_node.c.erb"
|
2988
|
-
argv[
|
3064
|
+
argv[5] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
|
2989
3065
|
|
2990
3066
|
// block
|
2991
3067
|
#line 155 "api_node.c.erb"
|
2992
|
-
argv[
|
2993
|
-
|
2994
|
-
// flags
|
2995
|
-
#line 189 "api_node.c.erb"
|
2996
|
-
argv[6] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
3068
|
+
argv[6] = rb_ary_pop(value_stack);
|
2997
3069
|
|
2998
3070
|
// operator_loc
|
2999
3071
|
#line 180 "api_node.c.erb"
|
@@ -3009,6 +3081,41 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
3009
3081
|
rb_ary_push(value_stack, rb_class_new_instance(10, argv, rb_cPrismIndexOrWriteNode));
|
3010
3082
|
break;
|
3011
3083
|
}
|
3084
|
+
#line 144 "api_node.c.erb"
|
3085
|
+
case PM_INDEX_TARGET_NODE: {
|
3086
|
+
pm_index_target_node_t *cast = (pm_index_target_node_t *) node;
|
3087
|
+
VALUE argv[7];
|
3088
|
+
|
3089
|
+
// flags
|
3090
|
+
#line 192 "api_node.c.erb"
|
3091
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
3092
|
+
|
3093
|
+
// receiver
|
3094
|
+
#line 155 "api_node.c.erb"
|
3095
|
+
argv[1] = rb_ary_pop(value_stack);
|
3096
|
+
|
3097
|
+
// opening_loc
|
3098
|
+
#line 180 "api_node.c.erb"
|
3099
|
+
argv[2] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
|
3100
|
+
|
3101
|
+
// arguments
|
3102
|
+
#line 155 "api_node.c.erb"
|
3103
|
+
argv[3] = rb_ary_pop(value_stack);
|
3104
|
+
|
3105
|
+
// closing_loc
|
3106
|
+
#line 180 "api_node.c.erb"
|
3107
|
+
argv[4] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
|
3108
|
+
|
3109
|
+
// block
|
3110
|
+
#line 155 "api_node.c.erb"
|
3111
|
+
argv[5] = rb_ary_pop(value_stack);
|
3112
|
+
|
3113
|
+
// location
|
3114
|
+
argv[6] = pm_location_new(parser, node->location.start, node->location.end, source);
|
3115
|
+
|
3116
|
+
rb_ary_push(value_stack, rb_class_new_instance(7, argv, rb_cPrismIndexTargetNode));
|
3117
|
+
break;
|
3118
|
+
}
|
3012
3119
|
#line 144 "api_node.c.erb"
|
3013
3120
|
case PM_INSTANCE_VARIABLE_AND_WRITE_NODE: {
|
3014
3121
|
pm_instance_variable_and_write_node_t *cast = (pm_instance_variable_and_write_node_t *) node;
|
@@ -3163,7 +3270,7 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
3163
3270
|
VALUE argv[2];
|
3164
3271
|
|
3165
3272
|
// flags
|
3166
|
-
#line
|
3273
|
+
#line 192 "api_node.c.erb"
|
3167
3274
|
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
3168
3275
|
|
3169
3276
|
// location
|
@@ -3177,24 +3284,24 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
3177
3284
|
pm_interpolated_match_last_line_node_t *cast = (pm_interpolated_match_last_line_node_t *) node;
|
3178
3285
|
VALUE argv[5];
|
3179
3286
|
|
3287
|
+
// flags
|
3288
|
+
#line 192 "api_node.c.erb"
|
3289
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
3290
|
+
|
3180
3291
|
// opening_loc
|
3181
3292
|
#line 180 "api_node.c.erb"
|
3182
|
-
argv[
|
3293
|
+
argv[1] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
|
3183
3294
|
|
3184
3295
|
// parts
|
3185
3296
|
#line 158 "api_node.c.erb"
|
3186
|
-
argv[
|
3297
|
+
argv[2] = rb_ary_new_capa(cast->parts.size);
|
3187
3298
|
for (size_t index = 0; index < cast->parts.size; index++) {
|
3188
|
-
rb_ary_push(argv[
|
3299
|
+
rb_ary_push(argv[2], rb_ary_pop(value_stack));
|
3189
3300
|
}
|
3190
3301
|
|
3191
3302
|
// closing_loc
|
3192
3303
|
#line 180 "api_node.c.erb"
|
3193
|
-
argv[
|
3194
|
-
|
3195
|
-
// flags
|
3196
|
-
#line 189 "api_node.c.erb"
|
3197
|
-
argv[3] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
3304
|
+
argv[3] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
|
3198
3305
|
|
3199
3306
|
// location
|
3200
3307
|
argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
|
@@ -3207,24 +3314,24 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
3207
3314
|
pm_interpolated_regular_expression_node_t *cast = (pm_interpolated_regular_expression_node_t *) node;
|
3208
3315
|
VALUE argv[5];
|
3209
3316
|
|
3317
|
+
// flags
|
3318
|
+
#line 192 "api_node.c.erb"
|
3319
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
3320
|
+
|
3210
3321
|
// opening_loc
|
3211
3322
|
#line 180 "api_node.c.erb"
|
3212
|
-
argv[
|
3323
|
+
argv[1] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
|
3213
3324
|
|
3214
3325
|
// parts
|
3215
3326
|
#line 158 "api_node.c.erb"
|
3216
|
-
argv[
|
3327
|
+
argv[2] = rb_ary_new_capa(cast->parts.size);
|
3217
3328
|
for (size_t index = 0; index < cast->parts.size; index++) {
|
3218
|
-
rb_ary_push(argv[
|
3329
|
+
rb_ary_push(argv[2], rb_ary_pop(value_stack));
|
3219
3330
|
}
|
3220
3331
|
|
3221
3332
|
// closing_loc
|
3222
3333
|
#line 180 "api_node.c.erb"
|
3223
|
-
argv[
|
3224
|
-
|
3225
|
-
// flags
|
3226
|
-
#line 189 "api_node.c.erb"
|
3227
|
-
argv[3] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
3334
|
+
argv[3] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
|
3228
3335
|
|
3229
3336
|
// location
|
3230
3337
|
argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
|
@@ -3313,19 +3420,23 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
3313
3420
|
#line 144 "api_node.c.erb"
|
3314
3421
|
case PM_KEYWORD_HASH_NODE: {
|
3315
3422
|
pm_keyword_hash_node_t *cast = (pm_keyword_hash_node_t *) node;
|
3316
|
-
VALUE argv[
|
3423
|
+
VALUE argv[3];
|
3424
|
+
|
3425
|
+
// flags
|
3426
|
+
#line 192 "api_node.c.erb"
|
3427
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
3317
3428
|
|
3318
3429
|
// elements
|
3319
3430
|
#line 158 "api_node.c.erb"
|
3320
|
-
argv[
|
3431
|
+
argv[1] = rb_ary_new_capa(cast->elements.size);
|
3321
3432
|
for (size_t index = 0; index < cast->elements.size; index++) {
|
3322
|
-
rb_ary_push(argv[
|
3433
|
+
rb_ary_push(argv[1], rb_ary_pop(value_stack));
|
3323
3434
|
}
|
3324
3435
|
|
3325
3436
|
// location
|
3326
|
-
argv[
|
3437
|
+
argv[2] = pm_location_new(parser, node->location.start, node->location.end, source);
|
3327
3438
|
|
3328
|
-
rb_ary_push(value_stack, rb_class_new_instance(
|
3439
|
+
rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismKeywordHashNode));
|
3329
3440
|
break;
|
3330
3441
|
}
|
3331
3442
|
#line 144 "api_node.c.erb"
|
@@ -3353,7 +3464,7 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
3353
3464
|
#line 144 "api_node.c.erb"
|
3354
3465
|
case PM_LAMBDA_NODE: {
|
3355
3466
|
pm_lambda_node_t *cast = (pm_lambda_node_t *) node;
|
3356
|
-
VALUE argv[
|
3467
|
+
VALUE argv[8];
|
3357
3468
|
|
3358
3469
|
// locals
|
3359
3470
|
#line 173 "api_node.c.erb"
|
@@ -3363,30 +3474,34 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
3363
3474
|
rb_ary_push(argv[0], rb_id2sym(constants[cast->locals.ids[index] - 1]));
|
3364
3475
|
}
|
3365
3476
|
|
3477
|
+
// locals_body_index
|
3478
|
+
#line 189 "api_node.c.erb"
|
3479
|
+
argv[1] = ULONG2NUM(cast->locals_body_index);
|
3480
|
+
|
3366
3481
|
// operator_loc
|
3367
3482
|
#line 180 "api_node.c.erb"
|
3368
|
-
argv[
|
3483
|
+
argv[2] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
|
3369
3484
|
|
3370
3485
|
// opening_loc
|
3371
3486
|
#line 180 "api_node.c.erb"
|
3372
|
-
argv[
|
3487
|
+
argv[3] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
|
3373
3488
|
|
3374
3489
|
// closing_loc
|
3375
3490
|
#line 180 "api_node.c.erb"
|
3376
|
-
argv[
|
3491
|
+
argv[4] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
|
3377
3492
|
|
3378
3493
|
// parameters
|
3379
3494
|
#line 155 "api_node.c.erb"
|
3380
|
-
argv[
|
3495
|
+
argv[5] = rb_ary_pop(value_stack);
|
3381
3496
|
|
3382
3497
|
// body
|
3383
3498
|
#line 155 "api_node.c.erb"
|
3384
|
-
argv[
|
3499
|
+
argv[6] = rb_ary_pop(value_stack);
|
3385
3500
|
|
3386
3501
|
// location
|
3387
|
-
argv[
|
3502
|
+
argv[7] = pm_location_new(parser, node->location.start, node->location.end, source);
|
3388
3503
|
|
3389
|
-
rb_ary_push(value_stack, rb_class_new_instance(
|
3504
|
+
rb_ary_push(value_stack, rb_class_new_instance(8, argv, rb_cPrismLambdaNode));
|
3390
3505
|
break;
|
3391
3506
|
}
|
3392
3507
|
#line 144 "api_node.c.erb"
|
@@ -3412,7 +3527,7 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
3412
3527
|
argv[3] = rb_id2sym(constants[cast->name - 1]);
|
3413
3528
|
|
3414
3529
|
// depth
|
3415
|
-
#line
|
3530
|
+
#line 189 "api_node.c.erb"
|
3416
3531
|
argv[4] = ULONG2NUM(cast->depth);
|
3417
3532
|
|
3418
3533
|
// location
|
@@ -3449,7 +3564,7 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
3449
3564
|
argv[4] = rb_id2sym(constants[cast->operator - 1]);
|
3450
3565
|
|
3451
3566
|
// depth
|
3452
|
-
#line
|
3567
|
+
#line 189 "api_node.c.erb"
|
3453
3568
|
argv[5] = ULONG2NUM(cast->depth);
|
3454
3569
|
|
3455
3570
|
// location
|
@@ -3481,7 +3596,7 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
3481
3596
|
argv[3] = rb_id2sym(constants[cast->name - 1]);
|
3482
3597
|
|
3483
3598
|
// depth
|
3484
|
-
#line
|
3599
|
+
#line 189 "api_node.c.erb"
|
3485
3600
|
argv[4] = ULONG2NUM(cast->depth);
|
3486
3601
|
|
3487
3602
|
// location
|
@@ -3501,7 +3616,7 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
3501
3616
|
argv[0] = rb_id2sym(constants[cast->name - 1]);
|
3502
3617
|
|
3503
3618
|
// depth
|
3504
|
-
#line
|
3619
|
+
#line 189 "api_node.c.erb"
|
3505
3620
|
argv[1] = ULONG2NUM(cast->depth);
|
3506
3621
|
|
3507
3622
|
// location
|
@@ -3521,7 +3636,7 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
3521
3636
|
argv[0] = rb_id2sym(constants[cast->name - 1]);
|
3522
3637
|
|
3523
3638
|
// depth
|
3524
|
-
#line
|
3639
|
+
#line 189 "api_node.c.erb"
|
3525
3640
|
argv[1] = ULONG2NUM(cast->depth);
|
3526
3641
|
|
3527
3642
|
// location
|
@@ -3541,7 +3656,7 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
3541
3656
|
argv[0] = rb_id2sym(constants[cast->name - 1]);
|
3542
3657
|
|
3543
3658
|
// depth
|
3544
|
-
#line
|
3659
|
+
#line 189 "api_node.c.erb"
|
3545
3660
|
argv[1] = ULONG2NUM(cast->depth);
|
3546
3661
|
|
3547
3662
|
// name_loc
|
@@ -3567,25 +3682,25 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
3567
3682
|
pm_match_last_line_node_t *cast = (pm_match_last_line_node_t *) node;
|
3568
3683
|
VALUE argv[6];
|
3569
3684
|
|
3685
|
+
// flags
|
3686
|
+
#line 192 "api_node.c.erb"
|
3687
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
3688
|
+
|
3570
3689
|
// opening_loc
|
3571
3690
|
#line 180 "api_node.c.erb"
|
3572
|
-
argv[
|
3691
|
+
argv[1] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
|
3573
3692
|
|
3574
3693
|
// content_loc
|
3575
3694
|
#line 180 "api_node.c.erb"
|
3576
|
-
argv[
|
3695
|
+
argv[2] = pm_location_new(parser, cast->content_loc.start, cast->content_loc.end, source);
|
3577
3696
|
|
3578
3697
|
// closing_loc
|
3579
3698
|
#line 180 "api_node.c.erb"
|
3580
|
-
argv[
|
3699
|
+
argv[3] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
|
3581
3700
|
|
3582
3701
|
// unescaped
|
3583
3702
|
#line 164 "api_node.c.erb"
|
3584
|
-
argv[
|
3585
|
-
|
3586
|
-
// flags
|
3587
|
-
#line 189 "api_node.c.erb"
|
3588
|
-
argv[4] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
3703
|
+
argv[4] = pm_string_new(&cast->unescaped, encoding);
|
3589
3704
|
|
3590
3705
|
// location
|
3591
3706
|
argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
|
@@ -3841,13 +3956,28 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
3841
3956
|
rb_ary_push(value_stack, rb_class_new_instance(3, argv, rb_cPrismNoKeywordsParameterNode));
|
3842
3957
|
break;
|
3843
3958
|
}
|
3959
|
+
#line 144 "api_node.c.erb"
|
3960
|
+
case PM_NUMBERED_PARAMETERS_NODE: {
|
3961
|
+
pm_numbered_parameters_node_t *cast = (pm_numbered_parameters_node_t *) node;
|
3962
|
+
VALUE argv[2];
|
3963
|
+
|
3964
|
+
// maximum
|
3965
|
+
#line 186 "api_node.c.erb"
|
3966
|
+
argv[0] = UINT2NUM(cast->maximum);
|
3967
|
+
|
3968
|
+
// location
|
3969
|
+
argv[1] = pm_location_new(parser, node->location.start, node->location.end, source);
|
3970
|
+
|
3971
|
+
rb_ary_push(value_stack, rb_class_new_instance(2, argv, rb_cPrismNumberedParametersNode));
|
3972
|
+
break;
|
3973
|
+
}
|
3844
3974
|
#line 144 "api_node.c.erb"
|
3845
3975
|
case PM_NUMBERED_REFERENCE_READ_NODE: {
|
3846
3976
|
pm_numbered_reference_read_node_t *cast = (pm_numbered_reference_read_node_t *) node;
|
3847
3977
|
VALUE argv[2];
|
3848
3978
|
|
3849
3979
|
// number
|
3850
|
-
#line
|
3980
|
+
#line 189 "api_node.c.erb"
|
3851
3981
|
argv[0] = ULONG2NUM(cast->number);
|
3852
3982
|
|
3853
3983
|
// location
|
@@ -4133,21 +4263,21 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
4133
4263
|
pm_range_node_t *cast = (pm_range_node_t *) node;
|
4134
4264
|
VALUE argv[5];
|
4135
4265
|
|
4266
|
+
// flags
|
4267
|
+
#line 192 "api_node.c.erb"
|
4268
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
4269
|
+
|
4136
4270
|
// left
|
4137
4271
|
#line 155 "api_node.c.erb"
|
4138
|
-
argv[
|
4272
|
+
argv[1] = rb_ary_pop(value_stack);
|
4139
4273
|
|
4140
4274
|
// right
|
4141
4275
|
#line 155 "api_node.c.erb"
|
4142
|
-
argv[
|
4276
|
+
argv[2] = rb_ary_pop(value_stack);
|
4143
4277
|
|
4144
4278
|
// operator_loc
|
4145
4279
|
#line 180 "api_node.c.erb"
|
4146
|
-
argv[
|
4147
|
-
|
4148
|
-
// flags
|
4149
|
-
#line 189 "api_node.c.erb"
|
4150
|
-
argv[3] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
4280
|
+
argv[3] = pm_location_new(parser, cast->operator_loc.start, cast->operator_loc.end, source);
|
4151
4281
|
|
4152
4282
|
// location
|
4153
4283
|
argv[4] = pm_location_new(parser, node->location.start, node->location.end, source);
|
@@ -4184,25 +4314,25 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
4184
4314
|
pm_regular_expression_node_t *cast = (pm_regular_expression_node_t *) node;
|
4185
4315
|
VALUE argv[6];
|
4186
4316
|
|
4317
|
+
// flags
|
4318
|
+
#line 192 "api_node.c.erb"
|
4319
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
4320
|
+
|
4187
4321
|
// opening_loc
|
4188
4322
|
#line 180 "api_node.c.erb"
|
4189
|
-
argv[
|
4323
|
+
argv[1] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
|
4190
4324
|
|
4191
4325
|
// content_loc
|
4192
4326
|
#line 180 "api_node.c.erb"
|
4193
|
-
argv[
|
4327
|
+
argv[2] = pm_location_new(parser, cast->content_loc.start, cast->content_loc.end, source);
|
4194
4328
|
|
4195
4329
|
// closing_loc
|
4196
4330
|
#line 180 "api_node.c.erb"
|
4197
|
-
argv[
|
4331
|
+
argv[3] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
|
4198
4332
|
|
4199
4333
|
// unescaped
|
4200
4334
|
#line 164 "api_node.c.erb"
|
4201
|
-
argv[
|
4202
|
-
|
4203
|
-
// flags
|
4204
|
-
#line 189 "api_node.c.erb"
|
4205
|
-
argv[4] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
4335
|
+
argv[4] = pm_string_new(&cast->unescaped, encoding);
|
4206
4336
|
|
4207
4337
|
// location
|
4208
4338
|
argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
|
@@ -4485,7 +4615,7 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
4485
4615
|
VALUE argv[6];
|
4486
4616
|
|
4487
4617
|
// flags
|
4488
|
-
#line
|
4618
|
+
#line 192 "api_node.c.erb"
|
4489
4619
|
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
4490
4620
|
|
4491
4621
|
// opening_loc
|
@@ -4544,28 +4674,32 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
4544
4674
|
#line 144 "api_node.c.erb"
|
4545
4675
|
case PM_SYMBOL_NODE: {
|
4546
4676
|
pm_symbol_node_t *cast = (pm_symbol_node_t *) node;
|
4547
|
-
VALUE argv[
|
4677
|
+
VALUE argv[6];
|
4678
|
+
|
4679
|
+
// flags
|
4680
|
+
#line 192 "api_node.c.erb"
|
4681
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
4548
4682
|
|
4549
4683
|
// opening_loc
|
4550
4684
|
#line 183 "api_node.c.erb"
|
4551
|
-
argv[
|
4685
|
+
argv[1] = cast->opening_loc.start == NULL ? Qnil : pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
|
4552
4686
|
|
4553
4687
|
// value_loc
|
4554
4688
|
#line 183 "api_node.c.erb"
|
4555
|
-
argv[
|
4689
|
+
argv[2] = cast->value_loc.start == NULL ? Qnil : pm_location_new(parser, cast->value_loc.start, cast->value_loc.end, source);
|
4556
4690
|
|
4557
4691
|
// closing_loc
|
4558
4692
|
#line 183 "api_node.c.erb"
|
4559
|
-
argv[
|
4693
|
+
argv[3] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
|
4560
4694
|
|
4561
4695
|
// unescaped
|
4562
4696
|
#line 164 "api_node.c.erb"
|
4563
|
-
argv[
|
4697
|
+
argv[4] = pm_string_new(&cast->unescaped, encoding);
|
4564
4698
|
|
4565
4699
|
// location
|
4566
|
-
argv[
|
4700
|
+
argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
|
4567
4701
|
|
4568
|
-
rb_ary_push(value_stack, rb_class_new_instance(
|
4702
|
+
rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismSymbolNode));
|
4569
4703
|
break;
|
4570
4704
|
}
|
4571
4705
|
#line 144 "api_node.c.erb"
|
@@ -4640,25 +4774,25 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
4640
4774
|
pm_until_node_t *cast = (pm_until_node_t *) node;
|
4641
4775
|
VALUE argv[6];
|
4642
4776
|
|
4777
|
+
// flags
|
4778
|
+
#line 192 "api_node.c.erb"
|
4779
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
4780
|
+
|
4643
4781
|
// keyword_loc
|
4644
4782
|
#line 180 "api_node.c.erb"
|
4645
|
-
argv[
|
4783
|
+
argv[1] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
|
4646
4784
|
|
4647
4785
|
// closing_loc
|
4648
4786
|
#line 183 "api_node.c.erb"
|
4649
|
-
argv[
|
4787
|
+
argv[2] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
|
4650
4788
|
|
4651
4789
|
// predicate
|
4652
4790
|
#line 155 "api_node.c.erb"
|
4653
|
-
argv[
|
4791
|
+
argv[3] = rb_ary_pop(value_stack);
|
4654
4792
|
|
4655
4793
|
// statements
|
4656
4794
|
#line 155 "api_node.c.erb"
|
4657
|
-
argv[
|
4658
|
-
|
4659
|
-
// flags
|
4660
|
-
#line 189 "api_node.c.erb"
|
4661
|
-
argv[4] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
4795
|
+
argv[4] = rb_ary_pop(value_stack);
|
4662
4796
|
|
4663
4797
|
// location
|
4664
4798
|
argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
|
@@ -4697,25 +4831,25 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
4697
4831
|
pm_while_node_t *cast = (pm_while_node_t *) node;
|
4698
4832
|
VALUE argv[6];
|
4699
4833
|
|
4834
|
+
// flags
|
4835
|
+
#line 192 "api_node.c.erb"
|
4836
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
4837
|
+
|
4700
4838
|
// keyword_loc
|
4701
4839
|
#line 180 "api_node.c.erb"
|
4702
|
-
argv[
|
4840
|
+
argv[1] = pm_location_new(parser, cast->keyword_loc.start, cast->keyword_loc.end, source);
|
4703
4841
|
|
4704
4842
|
// closing_loc
|
4705
4843
|
#line 183 "api_node.c.erb"
|
4706
|
-
argv[
|
4844
|
+
argv[2] = cast->closing_loc.start == NULL ? Qnil : pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
|
4707
4845
|
|
4708
4846
|
// predicate
|
4709
4847
|
#line 155 "api_node.c.erb"
|
4710
|
-
argv[
|
4848
|
+
argv[3] = rb_ary_pop(value_stack);
|
4711
4849
|
|
4712
4850
|
// statements
|
4713
4851
|
#line 155 "api_node.c.erb"
|
4714
|
-
argv[
|
4715
|
-
|
4716
|
-
// flags
|
4717
|
-
#line 189 "api_node.c.erb"
|
4718
|
-
argv[4] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
4852
|
+
argv[4] = rb_ary_pop(value_stack);
|
4719
4853
|
|
4720
4854
|
// location
|
4721
4855
|
argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
|
@@ -4726,28 +4860,32 @@ pm_ast_new(pm_parser_t *parser, pm_node_t *node, rb_encoding *encoding) {
|
|
4726
4860
|
#line 144 "api_node.c.erb"
|
4727
4861
|
case PM_X_STRING_NODE: {
|
4728
4862
|
pm_x_string_node_t *cast = (pm_x_string_node_t *) node;
|
4729
|
-
VALUE argv[
|
4863
|
+
VALUE argv[6];
|
4864
|
+
|
4865
|
+
// flags
|
4866
|
+
#line 192 "api_node.c.erb"
|
4867
|
+
argv[0] = ULONG2NUM(node->flags & ~PM_NODE_FLAG_COMMON_MASK);
|
4730
4868
|
|
4731
4869
|
// opening_loc
|
4732
4870
|
#line 180 "api_node.c.erb"
|
4733
|
-
argv[
|
4871
|
+
argv[1] = pm_location_new(parser, cast->opening_loc.start, cast->opening_loc.end, source);
|
4734
4872
|
|
4735
4873
|
// content_loc
|
4736
4874
|
#line 180 "api_node.c.erb"
|
4737
|
-
argv[
|
4875
|
+
argv[2] = pm_location_new(parser, cast->content_loc.start, cast->content_loc.end, source);
|
4738
4876
|
|
4739
4877
|
// closing_loc
|
4740
4878
|
#line 180 "api_node.c.erb"
|
4741
|
-
argv[
|
4879
|
+
argv[3] = pm_location_new(parser, cast->closing_loc.start, cast->closing_loc.end, source);
|
4742
4880
|
|
4743
4881
|
// unescaped
|
4744
4882
|
#line 164 "api_node.c.erb"
|
4745
|
-
argv[
|
4883
|
+
argv[4] = pm_string_new(&cast->unescaped, encoding);
|
4746
4884
|
|
4747
4885
|
// location
|
4748
|
-
argv[
|
4886
|
+
argv[5] = pm_location_new(parser, node->location.start, node->location.end, source);
|
4749
4887
|
|
4750
|
-
rb_ary_push(value_stack, rb_class_new_instance(
|
4888
|
+
rb_ary_push(value_stack, rb_class_new_instance(6, argv, rb_cPrismXStringNode));
|
4751
4889
|
break;
|
4752
4890
|
}
|
4753
4891
|
#line 144 "api_node.c.erb"
|
@@ -4811,6 +4949,7 @@ Init_prism_api_node(void) {
|
|
4811
4949
|
rb_cPrismCallNode = rb_define_class_under(rb_cPrism, "CallNode", rb_cPrismNode);
|
4812
4950
|
rb_cPrismCallOperatorWriteNode = rb_define_class_under(rb_cPrism, "CallOperatorWriteNode", rb_cPrismNode);
|
4813
4951
|
rb_cPrismCallOrWriteNode = rb_define_class_under(rb_cPrism, "CallOrWriteNode", rb_cPrismNode);
|
4952
|
+
rb_cPrismCallTargetNode = rb_define_class_under(rb_cPrism, "CallTargetNode", rb_cPrismNode);
|
4814
4953
|
rb_cPrismCapturePatternNode = rb_define_class_under(rb_cPrism, "CapturePatternNode", rb_cPrismNode);
|
4815
4954
|
rb_cPrismCaseMatchNode = rb_define_class_under(rb_cPrism, "CaseMatchNode", rb_cPrismNode);
|
4816
4955
|
rb_cPrismCaseNode = rb_define_class_under(rb_cPrism, "CaseNode", rb_cPrismNode);
|
@@ -4858,10 +4997,12 @@ Init_prism_api_node(void) {
|
|
4858
4997
|
rb_cPrismIfNode = rb_define_class_under(rb_cPrism, "IfNode", rb_cPrismNode);
|
4859
4998
|
rb_cPrismImaginaryNode = rb_define_class_under(rb_cPrism, "ImaginaryNode", rb_cPrismNode);
|
4860
4999
|
rb_cPrismImplicitNode = rb_define_class_under(rb_cPrism, "ImplicitNode", rb_cPrismNode);
|
5000
|
+
rb_cPrismImplicitRestNode = rb_define_class_under(rb_cPrism, "ImplicitRestNode", rb_cPrismNode);
|
4861
5001
|
rb_cPrismInNode = rb_define_class_under(rb_cPrism, "InNode", rb_cPrismNode);
|
4862
5002
|
rb_cPrismIndexAndWriteNode = rb_define_class_under(rb_cPrism, "IndexAndWriteNode", rb_cPrismNode);
|
4863
5003
|
rb_cPrismIndexOperatorWriteNode = rb_define_class_under(rb_cPrism, "IndexOperatorWriteNode", rb_cPrismNode);
|
4864
5004
|
rb_cPrismIndexOrWriteNode = rb_define_class_under(rb_cPrism, "IndexOrWriteNode", rb_cPrismNode);
|
5005
|
+
rb_cPrismIndexTargetNode = rb_define_class_under(rb_cPrism, "IndexTargetNode", rb_cPrismNode);
|
4865
5006
|
rb_cPrismInstanceVariableAndWriteNode = rb_define_class_under(rb_cPrism, "InstanceVariableAndWriteNode", rb_cPrismNode);
|
4866
5007
|
rb_cPrismInstanceVariableOperatorWriteNode = rb_define_class_under(rb_cPrism, "InstanceVariableOperatorWriteNode", rb_cPrismNode);
|
4867
5008
|
rb_cPrismInstanceVariableOrWriteNode = rb_define_class_under(rb_cPrism, "InstanceVariableOrWriteNode", rb_cPrismNode);
|
@@ -4894,6 +5035,7 @@ Init_prism_api_node(void) {
|
|
4894
5035
|
rb_cPrismNextNode = rb_define_class_under(rb_cPrism, "NextNode", rb_cPrismNode);
|
4895
5036
|
rb_cPrismNilNode = rb_define_class_under(rb_cPrism, "NilNode", rb_cPrismNode);
|
4896
5037
|
rb_cPrismNoKeywordsParameterNode = rb_define_class_under(rb_cPrism, "NoKeywordsParameterNode", rb_cPrismNode);
|
5038
|
+
rb_cPrismNumberedParametersNode = rb_define_class_under(rb_cPrism, "NumberedParametersNode", rb_cPrismNode);
|
4897
5039
|
rb_cPrismNumberedReferenceReadNode = rb_define_class_under(rb_cPrism, "NumberedReferenceReadNode", rb_cPrismNode);
|
4898
5040
|
rb_cPrismOptionalKeywordParameterNode = rb_define_class_under(rb_cPrism, "OptionalKeywordParameterNode", rb_cPrismNode);
|
4899
5041
|
rb_cPrismOptionalParameterNode = rb_define_class_under(rb_cPrism, "OptionalParameterNode", rb_cPrismNode);
|