@mintplayer/polyglot-target-csharp 0.2.1 → 0.3.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintplayer/polyglot-target-csharp",
3
- "version": "0.2.1",
3
+ "version": "0.3.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",
@@ -47,6 +47,10 @@
47
47
  "mutable": "var $x",
48
48
  "const": "var $x"
49
49
  },
50
+ "localDeclTyped": {
51
+ "mutable": "$T $x",
52
+ "const": "$T $x"
53
+ },
50
54
  "yield": {
51
55
  "value": "yield return $x;",
52
56
  "empty": "yield break;"
@@ -928,6 +932,7 @@
928
932
  "EnumDecl": {
929
933
  "line": {
930
934
  "tmpl": [
935
+ { "fn": "access" },
931
936
  "enum ",
932
937
  {
933
938
  "fn": "ident",
@@ -1362,6 +1367,7 @@
1362
1367
  },
1363
1368
  "csRecordHead": {
1364
1369
  "tmpl": [
1370
+ { "fn": "access" },
1365
1371
  "record ",
1366
1372
  {
1367
1373
  "fn": "ident",
@@ -1776,7 +1782,7 @@
1776
1782
  },
1777
1783
  {
1778
1784
  "block": {
1779
- "head": "static class PolyglotExtensions",
1785
+ "head": { "tmpl": [ { "fn": "access" }, "static ", { "case": { "when": [ [ { "eq": [ "module.linked", "true" ] }, "partial " ] ], "else": "" } }, "class PolyglotExtensions" ] },
1780
1786
  "body": [
1781
1787
  {
1782
1788
  "mapMembers": "module.extensions",
@@ -1846,7 +1852,7 @@
1846
1852
  },
1847
1853
  {
1848
1854
  "block": {
1849
- "head": "static class PolyglotProgram",
1855
+ "head": { "tmpl": [ { "fn": "access" }, "static ", { "case": { "when": [ [ { "eq": [ "module.linked", "true" ] }, "partial " ] ], "else": "" } }, "class PolyglotProgram" ] },
1850
1856
  "body": [
1851
1857
  {
1852
1858
  "mapDecl": "module.globals",
@@ -2119,6 +2125,7 @@
2119
2125
  },
2120
2126
  "csClassHead": {
2121
2127
  "tmpl": [
2128
+ { "fn": "access" },
2122
2129
  "class ",
2123
2130
  {
2124
2131
  "fn": "ident",
@@ -2341,6 +2348,7 @@
2341
2348
  "block": {
2342
2349
  "head": {
2343
2350
  "tmpl": [
2351
+ { "fn": "access" },
2344
2352
  "interface ",
2345
2353
  {
2346
2354
  "fn": "ident",
@@ -2467,6 +2475,7 @@
2467
2475
  {
2468
2476
  "line": {
2469
2477
  "tmpl": [
2478
+ { "fn": "access" },
2470
2479
  "abstract record ",
2471
2480
  {
2472
2481
  "fn": "ident",
@@ -2488,6 +2497,7 @@
2488
2497
  "each": {
2489
2498
  "line": {
2490
2499
  "tmpl": [
2500
+ { "fn": "access" },
2491
2501
  "sealed record ",
2492
2502
  {
2493
2503
  "fn": "ident",
@@ -2747,6 +2757,22 @@
2747
2757
  "Math.E": "global::System.Math.E",
2748
2758
  "Math.sqrt": "global::System.Math.Sqrt($0)",
2749
2759
  "Math.ln": "global::System.Math.Log($0)",
2760
+ "Math.log": "global::System.Math.Log($0)",
2761
+ "Math.log2": "global::System.Math.Log2($0)",
2762
+ "Math.log10": "global::System.Math.Log10($0)",
2763
+ "Math.exp": "global::System.Math.Exp($0)",
2764
+ "Math.pow": "global::System.Math.Pow($0, $1)",
2765
+ "Math.sin": "global::System.Math.Sin($0)",
2766
+ "Math.cos": "global::System.Math.Cos($0)",
2767
+ "Math.tan": "global::System.Math.Tan($0)",
2768
+ "Math.asin": "global::System.Math.Asin($0)",
2769
+ "Math.acos": "global::System.Math.Acos($0)",
2770
+ "Math.atan": "global::System.Math.Atan($0)",
2771
+ "Math.atan2": "global::System.Math.Atan2($0, $1)",
2772
+ "Math.sinh": "global::System.Math.Sinh($0)",
2773
+ "Math.cosh": "global::System.Math.Cosh($0)",
2774
+ "Math.tanh": "global::System.Math.Tanh($0)",
2775
+ "Math.trunc": "global::System.Math.Truncate($0)",
2750
2776
  "Math.floor": "global::System.Math.Floor($0)",
2751
2777
  "Math.ceil": "global::System.Math.Ceiling($0)",
2752
2778
  "Math.min": "global::System.Math.Min($0, $1)",