@mintplayer/polyglot-target-php 0.9.5 → 0.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/polyglot-plugin.json +500 -105
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/polyglot-target-php",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"description": "MintPlayer Polyglot PHP target — a pure-JSON language plugin (spec + emission rules + capabilities + std bindings) for the polyglot transpiler.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"polyglot",
|
package/polyglot-plugin.json
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"interfaces": "native",
|
|
12
12
|
"blockLambdas": "native",
|
|
13
13
|
"extensionMethods": "emulated",
|
|
14
|
-
"operatorOverloading": false
|
|
14
|
+
"operatorOverloading": false,
|
|
15
|
+
"propertySetters": false
|
|
15
16
|
},
|
|
16
17
|
"spec": {
|
|
17
18
|
"name": "php",
|
|
@@ -151,9 +152,26 @@
|
|
|
151
152
|
},
|
|
152
153
|
"reserved": [
|
|
153
154
|
"__e",
|
|
155
|
+
"__handled",
|
|
156
|
+
"__pgm*",
|
|
154
157
|
"__opt*",
|
|
155
158
|
"__w*"
|
|
156
|
-
]
|
|
159
|
+
],
|
|
160
|
+
"functionBuiltins": {
|
|
161
|
+
"suffix": "_pg",
|
|
162
|
+
"names": [
|
|
163
|
+
"abs", "array_filter", "array_keys", "array_map", "array_merge",
|
|
164
|
+
"array_pop", "array_push", "array_reverse", "array_shift", "array_slice",
|
|
165
|
+
"array_splice", "array_values", "assert", "ceil", "compact", "cos", "count",
|
|
166
|
+
"current", "date", "die", "each", "end", "eval", "exit",
|
|
167
|
+
"exp", "explode", "extract", "filter", "floatval", "floor", "gettype",
|
|
168
|
+
"header", "implode", "in_array", "intval", "is_array", "join", "key",
|
|
169
|
+
"log", "map", "max", "min", "next", "number_format", "ord", "pow",
|
|
170
|
+
"prev", "printf", "range", "reduce", "reset", "round", "settype",
|
|
171
|
+
"sin", "sleep", "sort", "split", "sprintf", "sqrt", "str_split", "strlen",
|
|
172
|
+
"strval", "substr", "tan", "time", "trim"
|
|
173
|
+
]
|
|
174
|
+
}
|
|
157
175
|
},
|
|
158
176
|
"preludes": {}
|
|
159
177
|
},
|
|
@@ -299,22 +317,48 @@
|
|
|
299
317
|
"tmpl": [
|
|
300
318
|
{
|
|
301
319
|
"case": {
|
|
302
|
-
"when": [
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
320
|
+
"when": [
|
|
321
|
+
[
|
|
322
|
+
{ "eq": ["node.isFree", "true"] },
|
|
323
|
+
{
|
|
324
|
+
"fn": "mangleName",
|
|
325
|
+
"args": [
|
|
326
|
+
{
|
|
327
|
+
"fn": "ident",
|
|
328
|
+
"args": [
|
|
329
|
+
{
|
|
330
|
+
"fn": "identFn",
|
|
331
|
+
"args": [
|
|
332
|
+
{
|
|
333
|
+
"get": "node.mangledCallee"
|
|
334
|
+
}
|
|
335
|
+
]
|
|
336
|
+
}
|
|
337
|
+
]
|
|
338
|
+
}
|
|
339
|
+
]
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
],
|
|
343
|
+
"else": {
|
|
344
|
+
"tmpl": [
|
|
345
|
+
"$",
|
|
312
346
|
{
|
|
313
|
-
"
|
|
347
|
+
"fn": "mangleName",
|
|
348
|
+
"args": [
|
|
349
|
+
{
|
|
350
|
+
"fn": "ident",
|
|
351
|
+
"args": [
|
|
352
|
+
{
|
|
353
|
+
"get": "node.mangledCallee"
|
|
354
|
+
}
|
|
355
|
+
]
|
|
356
|
+
}
|
|
357
|
+
]
|
|
314
358
|
}
|
|
315
359
|
]
|
|
316
360
|
}
|
|
317
|
-
|
|
361
|
+
}
|
|
318
362
|
},
|
|
319
363
|
"(",
|
|
320
364
|
{
|
|
@@ -517,7 +561,8 @@
|
|
|
517
561
|
},
|
|
518
562
|
"->get(",
|
|
519
563
|
{
|
|
520
|
-
"
|
|
564
|
+
"map": "node.indices",
|
|
565
|
+
"sep": ", "
|
|
521
566
|
},
|
|
522
567
|
")"
|
|
523
568
|
]
|
|
@@ -539,6 +584,55 @@
|
|
|
539
584
|
}
|
|
540
585
|
}
|
|
541
586
|
},
|
|
587
|
+
"IndexAssign": {
|
|
588
|
+
"line": {
|
|
589
|
+
"tmpl": [
|
|
590
|
+
{
|
|
591
|
+
"emitChild": "stmt.receiver",
|
|
592
|
+
"side": "recv"
|
|
593
|
+
},
|
|
594
|
+
"->set(",
|
|
595
|
+
{
|
|
596
|
+
"map": "stmt.indices",
|
|
597
|
+
"sep": ", "
|
|
598
|
+
},
|
|
599
|
+
", ",
|
|
600
|
+
{
|
|
601
|
+
"emit": "stmt.value"
|
|
602
|
+
},
|
|
603
|
+
");"
|
|
604
|
+
]
|
|
605
|
+
}
|
|
606
|
+
},
|
|
607
|
+
"TupleLet": {
|
|
608
|
+
"line": {
|
|
609
|
+
"tmpl": [
|
|
610
|
+
"[",
|
|
611
|
+
{
|
|
612
|
+
"map": "stmt.names",
|
|
613
|
+
"sep": ", ",
|
|
614
|
+
"item": {
|
|
615
|
+
"tmpl": [
|
|
616
|
+
"$",
|
|
617
|
+
{
|
|
618
|
+
"fn": "ident",
|
|
619
|
+
"args": [
|
|
620
|
+
{
|
|
621
|
+
"get": "item"
|
|
622
|
+
}
|
|
623
|
+
]
|
|
624
|
+
}
|
|
625
|
+
]
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
"] = ",
|
|
629
|
+
{
|
|
630
|
+
"emit": "stmt.init"
|
|
631
|
+
},
|
|
632
|
+
";"
|
|
633
|
+
]
|
|
634
|
+
}
|
|
635
|
+
},
|
|
542
636
|
"Cond": {
|
|
543
637
|
"tmpl": [
|
|
544
638
|
"(",
|
|
@@ -1192,93 +1286,221 @@
|
|
|
1192
1286
|
}
|
|
1193
1287
|
},
|
|
1194
1288
|
{
|
|
1195
|
-
"
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
"head": {
|
|
1199
|
-
"tmpl": [
|
|
1200
|
-
"catch (",
|
|
1201
|
-
{
|
|
1202
|
-
"case": {
|
|
1203
|
-
"when": [
|
|
1204
|
-
[
|
|
1205
|
-
{
|
|
1206
|
-
"eq": [
|
|
1207
|
-
"item.hasType",
|
|
1208
|
-
"true"
|
|
1209
|
-
]
|
|
1210
|
-
},
|
|
1211
|
-
{
|
|
1212
|
-
"type": "item.type"
|
|
1213
|
-
}
|
|
1214
|
-
]
|
|
1215
|
-
],
|
|
1216
|
-
"else": "\\Throwable"
|
|
1217
|
-
}
|
|
1218
|
-
},
|
|
1219
|
-
" $__e)"
|
|
1220
|
-
]
|
|
1221
|
-
},
|
|
1222
|
-
"body": [
|
|
1289
|
+
"case": {
|
|
1290
|
+
"when": [
|
|
1291
|
+
[
|
|
1223
1292
|
{
|
|
1224
|
-
"
|
|
1225
|
-
"
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1293
|
+
"eq": [
|
|
1294
|
+
"stmt.catchesHaveGuard",
|
|
1295
|
+
"true"
|
|
1296
|
+
]
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
"block": {
|
|
1300
|
+
"head": "catch (\\Throwable $__e)",
|
|
1301
|
+
"body": [
|
|
1302
|
+
{
|
|
1303
|
+
"line": "$__handled = false;"
|
|
1304
|
+
},
|
|
1305
|
+
{
|
|
1306
|
+
"mapDecl": "stmt.catches",
|
|
1307
|
+
"each": {
|
|
1308
|
+
"block": {
|
|
1309
|
+
"head": {
|
|
1310
|
+
"tmpl": [
|
|
1311
|
+
"if (!$__handled",
|
|
1312
|
+
{
|
|
1313
|
+
"case": {
|
|
1314
|
+
"when": [
|
|
1315
|
+
[
|
|
1316
|
+
{
|
|
1317
|
+
"eq": [
|
|
1318
|
+
"item.hasType",
|
|
1319
|
+
"true"
|
|
1320
|
+
]
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
"tmpl": [
|
|
1324
|
+
" && $__e instanceof ",
|
|
1325
|
+
{
|
|
1326
|
+
"type": "item.type"
|
|
1327
|
+
}
|
|
1328
|
+
]
|
|
1329
|
+
}
|
|
1330
|
+
]
|
|
1331
|
+
]
|
|
1332
|
+
}
|
|
1333
|
+
},
|
|
1334
|
+
")"
|
|
1335
|
+
]
|
|
1336
|
+
},
|
|
1337
|
+
"body": [
|
|
1237
1338
|
{
|
|
1238
|
-
"
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1339
|
+
"case": {
|
|
1340
|
+
"when": [
|
|
1341
|
+
[
|
|
1342
|
+
{
|
|
1343
|
+
"eq": [
|
|
1344
|
+
"item.hasBinding",
|
|
1345
|
+
"true"
|
|
1346
|
+
]
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"line": {
|
|
1350
|
+
"tmpl": [
|
|
1351
|
+
"$",
|
|
1352
|
+
{
|
|
1353
|
+
"fn": "ident",
|
|
1354
|
+
"args": [
|
|
1355
|
+
{
|
|
1356
|
+
"get": "item.binding"
|
|
1357
|
+
}
|
|
1358
|
+
]
|
|
1359
|
+
},
|
|
1360
|
+
" = $__e;"
|
|
1361
|
+
]
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
]
|
|
1365
|
+
]
|
|
1366
|
+
}
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
"case": {
|
|
1370
|
+
"when": [
|
|
1371
|
+
[
|
|
1372
|
+
{
|
|
1373
|
+
"eq": [
|
|
1374
|
+
"item.hasGuard",
|
|
1375
|
+
"true"
|
|
1376
|
+
]
|
|
1377
|
+
},
|
|
1378
|
+
{
|
|
1379
|
+
"block": {
|
|
1380
|
+
"head": {
|
|
1381
|
+
"tmpl": [
|
|
1382
|
+
"if (",
|
|
1383
|
+
{
|
|
1384
|
+
"emit": "item.guard"
|
|
1385
|
+
},
|
|
1386
|
+
")"
|
|
1387
|
+
]
|
|
1388
|
+
},
|
|
1389
|
+
"body": [
|
|
1390
|
+
{
|
|
1391
|
+
"line": "$__handled = true;"
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
"stmts": "item.body"
|
|
1395
|
+
}
|
|
1396
|
+
]
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
]
|
|
1400
|
+
],
|
|
1401
|
+
"else": {
|
|
1402
|
+
"seq": [
|
|
1403
|
+
{
|
|
1404
|
+
"line": "$__handled = true;"
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
"stmts": "item.body"
|
|
1408
|
+
}
|
|
1409
|
+
]
|
|
1242
1410
|
}
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
]
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
"case": {
|
|
1419
|
+
"when": [
|
|
1420
|
+
[
|
|
1421
|
+
{
|
|
1422
|
+
"eq": [
|
|
1423
|
+
"stmt.hasCatchAll",
|
|
1424
|
+
"false"
|
|
1243
1425
|
]
|
|
1244
1426
|
},
|
|
1245
|
-
|
|
1427
|
+
{
|
|
1428
|
+
"line": "if (!$__handled) { throw $__e; }"
|
|
1429
|
+
}
|
|
1246
1430
|
]
|
|
1247
|
-
|
|
1431
|
+
]
|
|
1248
1432
|
}
|
|
1249
|
-
|
|
1433
|
+
}
|
|
1250
1434
|
]
|
|
1251
1435
|
}
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
{
|
|
1264
|
-
"
|
|
1265
|
-
|
|
1266
|
-
"if (!(",
|
|
1436
|
+
}
|
|
1437
|
+
]
|
|
1438
|
+
],
|
|
1439
|
+
"else": {
|
|
1440
|
+
"mapDecl": "stmt.catches",
|
|
1441
|
+
"each": {
|
|
1442
|
+
"block": {
|
|
1443
|
+
"head": {
|
|
1444
|
+
"tmpl": [
|
|
1445
|
+
"catch (",
|
|
1446
|
+
{
|
|
1447
|
+
"case": {
|
|
1448
|
+
"when": [
|
|
1449
|
+
[
|
|
1267
1450
|
{
|
|
1268
|
-
"
|
|
1451
|
+
"eq": [
|
|
1452
|
+
"item.hasType",
|
|
1453
|
+
"true"
|
|
1454
|
+
]
|
|
1269
1455
|
},
|
|
1270
|
-
|
|
1456
|
+
{
|
|
1457
|
+
"type": "item.type"
|
|
1458
|
+
}
|
|
1271
1459
|
]
|
|
1272
|
-
|
|
1460
|
+
],
|
|
1461
|
+
"else": "\\Throwable"
|
|
1273
1462
|
}
|
|
1274
|
-
|
|
1463
|
+
},
|
|
1464
|
+
" $__e)"
|
|
1275
1465
|
]
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1466
|
+
},
|
|
1467
|
+
"body": [
|
|
1468
|
+
{
|
|
1469
|
+
"case": {
|
|
1470
|
+
"when": [
|
|
1471
|
+
[
|
|
1472
|
+
{
|
|
1473
|
+
"eq": [
|
|
1474
|
+
"item.hasBinding",
|
|
1475
|
+
"true"
|
|
1476
|
+
]
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
"line": {
|
|
1480
|
+
"tmpl": [
|
|
1481
|
+
"$",
|
|
1482
|
+
{
|
|
1483
|
+
"fn": "ident",
|
|
1484
|
+
"args": [
|
|
1485
|
+
{
|
|
1486
|
+
"get": "item.binding"
|
|
1487
|
+
}
|
|
1488
|
+
]
|
|
1489
|
+
},
|
|
1490
|
+
" = $__e;"
|
|
1491
|
+
]
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
]
|
|
1495
|
+
]
|
|
1496
|
+
}
|
|
1497
|
+
},
|
|
1498
|
+
{
|
|
1499
|
+
"stmts": "item.body"
|
|
1500
|
+
}
|
|
1501
|
+
]
|
|
1280
1502
|
}
|
|
1281
|
-
|
|
1503
|
+
}
|
|
1282
1504
|
}
|
|
1283
1505
|
}
|
|
1284
1506
|
},
|
|
@@ -1387,6 +1609,23 @@
|
|
|
1387
1609
|
"phpArmValue": {
|
|
1388
1610
|
"case": {
|
|
1389
1611
|
"when": [
|
|
1612
|
+
[
|
|
1613
|
+
{
|
|
1614
|
+
"eq": [
|
|
1615
|
+
"item.pattern.kind",
|
|
1616
|
+
"typeTest"
|
|
1617
|
+
]
|
|
1618
|
+
},
|
|
1619
|
+
{
|
|
1620
|
+
"tmpl": [
|
|
1621
|
+
"(fn($",
|
|
1622
|
+
{ "fn": "ident", "args": [ { "get": "item.pattern.binding" } ] },
|
|
1623
|
+
") => ",
|
|
1624
|
+
{ "emit": "item.body" },
|
|
1625
|
+
")($_m)"
|
|
1626
|
+
]
|
|
1627
|
+
}
|
|
1628
|
+
],
|
|
1390
1629
|
[
|
|
1391
1630
|
{
|
|
1392
1631
|
"eq": [
|
|
@@ -1439,17 +1678,54 @@
|
|
|
1439
1678
|
"map": "item.pattern.binders",
|
|
1440
1679
|
"sep": ", ",
|
|
1441
1680
|
"item": {
|
|
1442
|
-
"
|
|
1443
|
-
"
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1681
|
+
"case": {
|
|
1682
|
+
"when": [
|
|
1683
|
+
[
|
|
1684
|
+
{
|
|
1685
|
+
"or": [
|
|
1686
|
+
{
|
|
1687
|
+
"eq": [
|
|
1688
|
+
"item.isLiteral",
|
|
1689
|
+
"true"
|
|
1690
|
+
]
|
|
1691
|
+
},
|
|
1692
|
+
{
|
|
1693
|
+
"eq": [
|
|
1694
|
+
"item.isWildcard",
|
|
1695
|
+
"true"
|
|
1696
|
+
]
|
|
1697
|
+
}
|
|
1698
|
+
]
|
|
1699
|
+
},
|
|
1447
1700
|
{
|
|
1448
|
-
"
|
|
1701
|
+
"tmpl": [
|
|
1702
|
+
"$__pgm_",
|
|
1703
|
+
{
|
|
1704
|
+
"fn": "ident",
|
|
1705
|
+
"args": [
|
|
1706
|
+
{
|
|
1707
|
+
"get": "item.field"
|
|
1708
|
+
}
|
|
1709
|
+
]
|
|
1710
|
+
}
|
|
1711
|
+
]
|
|
1712
|
+
}
|
|
1713
|
+
]
|
|
1714
|
+
],
|
|
1715
|
+
"else": {
|
|
1716
|
+
"tmpl": [
|
|
1717
|
+
"$",
|
|
1718
|
+
{
|
|
1719
|
+
"fn": "ident",
|
|
1720
|
+
"args": [
|
|
1721
|
+
{
|
|
1722
|
+
"get": "item.binding"
|
|
1723
|
+
}
|
|
1724
|
+
]
|
|
1449
1725
|
}
|
|
1450
1726
|
]
|
|
1451
1727
|
}
|
|
1452
|
-
|
|
1728
|
+
}
|
|
1453
1729
|
}
|
|
1454
1730
|
},
|
|
1455
1731
|
") => ",
|
|
@@ -1488,6 +1764,23 @@
|
|
|
1488
1764
|
"phpArmGuard": {
|
|
1489
1765
|
"case": {
|
|
1490
1766
|
"when": [
|
|
1767
|
+
[
|
|
1768
|
+
{
|
|
1769
|
+
"eq": [
|
|
1770
|
+
"item.pattern.kind",
|
|
1771
|
+
"typeTest"
|
|
1772
|
+
]
|
|
1773
|
+
},
|
|
1774
|
+
{
|
|
1775
|
+
"tmpl": [
|
|
1776
|
+
"(fn($",
|
|
1777
|
+
{ "fn": "ident", "args": [ { "get": "item.pattern.binding" } ] },
|
|
1778
|
+
") => ",
|
|
1779
|
+
{ "emit": "item.guard" },
|
|
1780
|
+
")($_m)"
|
|
1781
|
+
]
|
|
1782
|
+
}
|
|
1783
|
+
],
|
|
1491
1784
|
[
|
|
1492
1785
|
{
|
|
1493
1786
|
"eq": [
|
|
@@ -1540,17 +1833,54 @@
|
|
|
1540
1833
|
"map": "item.pattern.binders",
|
|
1541
1834
|
"sep": ", ",
|
|
1542
1835
|
"item": {
|
|
1543
|
-
"
|
|
1544
|
-
"
|
|
1545
|
-
|
|
1546
|
-
"fn": "ident",
|
|
1547
|
-
"args": [
|
|
1836
|
+
"case": {
|
|
1837
|
+
"when": [
|
|
1838
|
+
[
|
|
1548
1839
|
{
|
|
1549
|
-
"
|
|
1840
|
+
"or": [
|
|
1841
|
+
{
|
|
1842
|
+
"eq": [
|
|
1843
|
+
"item.isLiteral",
|
|
1844
|
+
"true"
|
|
1845
|
+
]
|
|
1846
|
+
},
|
|
1847
|
+
{
|
|
1848
|
+
"eq": [
|
|
1849
|
+
"item.isWildcard",
|
|
1850
|
+
"true"
|
|
1851
|
+
]
|
|
1852
|
+
}
|
|
1853
|
+
]
|
|
1854
|
+
},
|
|
1855
|
+
{
|
|
1856
|
+
"tmpl": [
|
|
1857
|
+
"$__pgm_",
|
|
1858
|
+
{
|
|
1859
|
+
"fn": "ident",
|
|
1860
|
+
"args": [
|
|
1861
|
+
{
|
|
1862
|
+
"get": "item.field"
|
|
1863
|
+
}
|
|
1864
|
+
]
|
|
1865
|
+
}
|
|
1866
|
+
]
|
|
1867
|
+
}
|
|
1868
|
+
]
|
|
1869
|
+
],
|
|
1870
|
+
"else": {
|
|
1871
|
+
"tmpl": [
|
|
1872
|
+
"$",
|
|
1873
|
+
{
|
|
1874
|
+
"fn": "ident",
|
|
1875
|
+
"args": [
|
|
1876
|
+
{
|
|
1877
|
+
"get": "item.binding"
|
|
1878
|
+
}
|
|
1879
|
+
]
|
|
1550
1880
|
}
|
|
1551
1881
|
]
|
|
1552
1882
|
}
|
|
1553
|
-
|
|
1883
|
+
}
|
|
1554
1884
|
}
|
|
1555
1885
|
},
|
|
1556
1886
|
") => ",
|
|
@@ -1589,6 +1919,20 @@
|
|
|
1589
1919
|
"phpArmBase": {
|
|
1590
1920
|
"case": {
|
|
1591
1921
|
"when": [
|
|
1922
|
+
[
|
|
1923
|
+
{
|
|
1924
|
+
"eq": [
|
|
1925
|
+
"item.pattern.kind",
|
|
1926
|
+
"typeTest"
|
|
1927
|
+
]
|
|
1928
|
+
},
|
|
1929
|
+
{
|
|
1930
|
+
"tmpl": [
|
|
1931
|
+
"$_m instanceof ",
|
|
1932
|
+
{ "type": "item.pattern.testType" }
|
|
1933
|
+
]
|
|
1934
|
+
}
|
|
1935
|
+
],
|
|
1592
1936
|
[
|
|
1593
1937
|
{
|
|
1594
1938
|
"eq": [
|
|
@@ -1642,6 +1986,42 @@
|
|
|
1642
1986
|
"get": "item.pattern.ctorCase"
|
|
1643
1987
|
}
|
|
1644
1988
|
]
|
|
1989
|
+
},
|
|
1990
|
+
{
|
|
1991
|
+
"map": "item.pattern.binders",
|
|
1992
|
+
"sep": "",
|
|
1993
|
+
"item": {
|
|
1994
|
+
"case": {
|
|
1995
|
+
"when": [
|
|
1996
|
+
[
|
|
1997
|
+
{
|
|
1998
|
+
"eq": [
|
|
1999
|
+
"item.isLiteral",
|
|
2000
|
+
"true"
|
|
2001
|
+
]
|
|
2002
|
+
},
|
|
2003
|
+
{
|
|
2004
|
+
"tmpl": [
|
|
2005
|
+
" && $_m[",
|
|
2006
|
+
{
|
|
2007
|
+
"fn": "escapeString",
|
|
2008
|
+
"args": [
|
|
2009
|
+
{
|
|
2010
|
+
"get": "item.field"
|
|
2011
|
+
}
|
|
2012
|
+
]
|
|
2013
|
+
},
|
|
2014
|
+
"] === ",
|
|
2015
|
+
{
|
|
2016
|
+
"emit": "item.literal"
|
|
2017
|
+
}
|
|
2018
|
+
]
|
|
2019
|
+
}
|
|
2020
|
+
]
|
|
2021
|
+
],
|
|
2022
|
+
"else": ""
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
1645
2025
|
}
|
|
1646
2026
|
]
|
|
1647
2027
|
}
|
|
@@ -2035,7 +2415,12 @@
|
|
|
2035
2415
|
"fn": "ident",
|
|
2036
2416
|
"args": [
|
|
2037
2417
|
{
|
|
2038
|
-
"
|
|
2418
|
+
"fn": "identFn",
|
|
2419
|
+
"args": [
|
|
2420
|
+
{
|
|
2421
|
+
"get": "decl.emitName"
|
|
2422
|
+
}
|
|
2423
|
+
]
|
|
2039
2424
|
}
|
|
2040
2425
|
]
|
|
2041
2426
|
}
|
|
@@ -2701,9 +3086,19 @@
|
|
|
2701
3086
|
"when": [
|
|
2702
3087
|
[
|
|
2703
3088
|
{
|
|
2704
|
-
"
|
|
2705
|
-
|
|
2706
|
-
|
|
3089
|
+
"and": [
|
|
3090
|
+
{
|
|
3091
|
+
"eq": [
|
|
3092
|
+
"decl.hasSuper",
|
|
3093
|
+
"true"
|
|
3094
|
+
]
|
|
3095
|
+
},
|
|
3096
|
+
{
|
|
3097
|
+
"eq": [
|
|
3098
|
+
"decl.baseHasInit",
|
|
3099
|
+
"true"
|
|
3100
|
+
]
|
|
3101
|
+
}
|
|
2707
3102
|
]
|
|
2708
3103
|
},
|
|
2709
3104
|
{
|