@mintplayer/polyglot-target-csharp 0.5.3 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/polyglot-plugin.json +48 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/polyglot-target-csharp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
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
|
@@ -433,18 +433,46 @@
|
|
|
433
433
|
}
|
|
434
434
|
},
|
|
435
435
|
"ListLit": {
|
|
436
|
-
"
|
|
437
|
-
"
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
436
|
+
"case": {
|
|
437
|
+
"when": [
|
|
438
|
+
[
|
|
439
|
+
{
|
|
440
|
+
"eq": [
|
|
441
|
+
"node.isArray",
|
|
442
|
+
"true"
|
|
443
|
+
]
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"tmpl": [
|
|
447
|
+
"new ",
|
|
448
|
+
{
|
|
449
|
+
"type": "node.elem"
|
|
450
|
+
},
|
|
451
|
+
"[] { ",
|
|
452
|
+
{
|
|
453
|
+
"map": "node.elements",
|
|
454
|
+
"sep": ", "
|
|
455
|
+
},
|
|
456
|
+
" }"
|
|
457
|
+
]
|
|
458
|
+
}
|
|
459
|
+
]
|
|
460
|
+
],
|
|
461
|
+
"else": {
|
|
462
|
+
"tmpl": [
|
|
463
|
+
"new global::System.Collections.Generic.List<",
|
|
464
|
+
{
|
|
465
|
+
"type": "node.elem"
|
|
466
|
+
},
|
|
467
|
+
"> { ",
|
|
468
|
+
{
|
|
469
|
+
"map": "node.elements",
|
|
470
|
+
"sep": ", "
|
|
471
|
+
},
|
|
472
|
+
" }"
|
|
473
|
+
]
|
|
474
|
+
}
|
|
475
|
+
}
|
|
448
476
|
},
|
|
449
477
|
"New": {
|
|
450
478
|
"tmpl": [
|
|
@@ -2772,12 +2800,17 @@
|
|
|
2772
2800
|
"Math.sinh": "global::System.Math.Sinh($0)",
|
|
2773
2801
|
"Math.cosh": "global::System.Math.Cosh($0)",
|
|
2774
2802
|
"Math.tanh": "global::System.Math.Tanh($0)",
|
|
2803
|
+
"Math.asinh": "global::System.Math.Asinh($0)",
|
|
2804
|
+
"Math.acosh": "global::System.Math.Acosh($0)",
|
|
2805
|
+
"Math.atanh": "global::System.Math.Atanh($0)",
|
|
2775
2806
|
"Math.trunc": "global::System.Math.Truncate($0)",
|
|
2776
2807
|
"Math.floor": "global::System.Math.Floor($0)",
|
|
2777
2808
|
"Math.ceil": "global::System.Math.Ceiling($0)",
|
|
2778
2809
|
"Math.min": "global::System.Math.Min($0, $1)",
|
|
2779
2810
|
"Math.max": "global::System.Math.Max($0, $1)",
|
|
2780
2811
|
"Math.abs": "global::System.Math.Abs($0)",
|
|
2812
|
+
"Math.sign": "((global::System.Func<$T, $T>)(a => a > 0 ? ($T)1 : a < 0 ? ($T)(-1) : a - a))($0)",
|
|
2813
|
+
"Math.clamp": "((global::System.Func<$T, $T, $T, $T>)((x, lo, hi) => x < lo ? lo : (x > hi ? hi : x)))($0, $1, $2)",
|
|
2781
2814
|
"Math.round": "(($T) global::System.Math.Round($0))"
|
|
2782
2815
|
},
|
|
2783
2816
|
"std.strings": {
|
|
@@ -2794,6 +2827,9 @@
|
|
|
2794
2827
|
"Error.init": "new $T($0)",
|
|
2795
2828
|
"Error.message": "$this.Message",
|
|
2796
2829
|
"Iterable.type": "global::System.Collections.Generic.IEnumerable<$0>",
|
|
2830
|
+
"Array.type": "$0[]",
|
|
2831
|
+
"Array.init": "global::System.Array.Empty<$0>()",
|
|
2832
|
+
"Array.count": "$this.Length",
|
|
2797
2833
|
"i8.parse": "sbyte.Parse($0)",
|
|
2798
2834
|
"i16.parse": "short.Parse($0)",
|
|
2799
2835
|
"i32.parse": "int.Parse($0)",
|