@mintplayer/polyglot-target-csharp 0.1.0 → 0.2.1
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 +45 -37
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/polyglot-target-csharp",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "MintPlayer Polyglot C# / .NET 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
|
@@ -176,8 +176,8 @@
|
|
|
176
176
|
"with": "@"
|
|
177
177
|
},
|
|
178
178
|
"reserved": [
|
|
179
|
-
"
|
|
180
|
-
"
|
|
179
|
+
"PolyglotProgram",
|
|
180
|
+
"PolyglotExtensions",
|
|
181
181
|
"Main",
|
|
182
182
|
"lhs",
|
|
183
183
|
"__opt*",
|
|
@@ -279,7 +279,7 @@
|
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
281
|
"tmpl": [
|
|
282
|
-
"
|
|
282
|
+
"PolyglotProgram.",
|
|
283
283
|
{
|
|
284
284
|
"fn": "ident",
|
|
285
285
|
"args": [
|
|
@@ -572,13 +572,36 @@
|
|
|
572
572
|
]
|
|
573
573
|
},
|
|
574
574
|
"hole": {
|
|
575
|
-
"
|
|
576
|
-
"
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
575
|
+
"case": {
|
|
576
|
+
"when": [
|
|
577
|
+
[
|
|
578
|
+
{
|
|
579
|
+
"eq": [
|
|
580
|
+
"item.typeIsBool",
|
|
581
|
+
"true"
|
|
582
|
+
]
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
"tmpl": [
|
|
586
|
+
"{(",
|
|
587
|
+
{
|
|
588
|
+
"emit": "item"
|
|
589
|
+
},
|
|
590
|
+
" ? \"true\" : \"false\")}"
|
|
591
|
+
]
|
|
592
|
+
}
|
|
593
|
+
]
|
|
594
|
+
],
|
|
595
|
+
"else": {
|
|
596
|
+
"tmpl": [
|
|
597
|
+
"{",
|
|
598
|
+
{
|
|
599
|
+
"emit": "item"
|
|
600
|
+
},
|
|
601
|
+
"}"
|
|
602
|
+
]
|
|
603
|
+
}
|
|
604
|
+
}
|
|
582
605
|
}
|
|
583
606
|
}
|
|
584
607
|
},
|
|
@@ -1713,6 +1736,12 @@
|
|
|
1713
1736
|
},
|
|
1714
1737
|
"Program": {
|
|
1715
1738
|
"seq": [
|
|
1739
|
+
{
|
|
1740
|
+
"line": "#nullable enable"
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
"line": ""
|
|
1744
|
+
},
|
|
1716
1745
|
{
|
|
1717
1746
|
"mapMembers": "module.enums",
|
|
1718
1747
|
"rule": "EnumDecl"
|
|
@@ -1747,7 +1776,7 @@
|
|
|
1747
1776
|
},
|
|
1748
1777
|
{
|
|
1749
1778
|
"block": {
|
|
1750
|
-
"head": "static class
|
|
1779
|
+
"head": "static class PolyglotExtensions",
|
|
1751
1780
|
"body": [
|
|
1752
1781
|
{
|
|
1753
1782
|
"mapMembers": "module.extensions",
|
|
@@ -1817,7 +1846,7 @@
|
|
|
1817
1846
|
},
|
|
1818
1847
|
{
|
|
1819
1848
|
"block": {
|
|
1820
|
-
"head": "static class
|
|
1849
|
+
"head": "static class PolyglotProgram",
|
|
1821
1850
|
"body": [
|
|
1822
1851
|
{
|
|
1823
1852
|
"mapDecl": "module.globals",
|
|
@@ -2612,19 +2641,9 @@
|
|
|
2612
2641
|
],
|
|
2613
2642
|
[
|
|
2614
2643
|
{
|
|
2615
|
-
"
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
"type.nullable",
|
|
2619
|
-
"true"
|
|
2620
|
-
]
|
|
2621
|
-
},
|
|
2622
|
-
{
|
|
2623
|
-
"eq": [
|
|
2624
|
-
"type.isValueType",
|
|
2625
|
-
"true"
|
|
2626
|
-
]
|
|
2627
|
-
}
|
|
2644
|
+
"eq": [
|
|
2645
|
+
"type.nullable",
|
|
2646
|
+
"true"
|
|
2628
2647
|
]
|
|
2629
2648
|
},
|
|
2630
2649
|
{
|
|
@@ -2636,17 +2655,6 @@
|
|
|
2636
2655
|
]
|
|
2637
2656
|
}
|
|
2638
2657
|
],
|
|
2639
|
-
[
|
|
2640
|
-
{
|
|
2641
|
-
"eq": [
|
|
2642
|
-
"type.nullable",
|
|
2643
|
-
"true"
|
|
2644
|
-
]
|
|
2645
|
-
},
|
|
2646
|
-
{
|
|
2647
|
-
"type": "type.base"
|
|
2648
|
-
}
|
|
2649
|
-
],
|
|
2650
2658
|
[
|
|
2651
2659
|
{
|
|
2652
2660
|
"has": "type.scalar"
|
|
@@ -2727,7 +2735,7 @@
|
|
|
2727
2735
|
"List.removeAt": "$this.RemoveAt($0)"
|
|
2728
2736
|
},
|
|
2729
2737
|
"std.io": {
|
|
2730
|
-
"print": "global::System.Console.WriteLine(x is bool __pb ? (__pb ? \"true\" : \"false\") : (object)x)",
|
|
2738
|
+
"print": "global::System.Console.WriteLine(x is bool __pb ? (__pb ? \"true\" : \"false\") : (object?)x)",
|
|
2731
2739
|
"readText": "global::System.IO.File.ReadAllText(path)",
|
|
2732
2740
|
"writeText": "global::System.IO.File.WriteAllText(path, content)",
|
|
2733
2741
|
"appendText": "global::System.IO.File.AppendAllText(path, content)",
|