@mintplayer/polyglot-target-csharp 0.10.1 → 0.10.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/polyglot-plugin.json +596 -161
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintplayer/polyglot-target-csharp",
3
- "version": "0.10.1",
3
+ "version": "0.10.3",
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",
@@ -1,7 +1,30 @@
1
1
  {
2
- "schema": 1,
2
+ "schema": 2,
3
3
  "name": "csharp",
4
4
  "sharedPreludeFile": true,
5
+ "options": {
6
+ "namespace": {
7
+ "default": "",
8
+ "pattern": "^([A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*)?$",
9
+ "scope": "closure"
10
+ },
11
+ "class": {
12
+ "default": "PolyglotProgram",
13
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
14
+ "scope": "closure",
15
+ "reserve": true
16
+ },
17
+ "access": {
18
+ "default": "",
19
+ "pattern": "^(public|internal)?$",
20
+ "scope": "closure"
21
+ },
22
+ "entryPoint": {
23
+ "default": "true",
24
+ "pattern": "^(true|false)$",
25
+ "scope": "closure"
26
+ }
27
+ },
5
28
  "originMapping": {
6
29
  "style": "directive",
7
30
  "line": "#line $n \"$f\"",
@@ -40,17 +63,43 @@
40
63
  "u16": "(ushort)($x)"
41
64
  },
42
65
  "wrapAtom": {
43
- "recv": [
44
- "binary",
45
- "unary",
46
- "cast"
47
- ],
48
- "unary": [
49
- "binary"
66
+ "recvPrimary": [
67
+ "var",
68
+ "this",
69
+ "call",
70
+ "methodCall",
71
+ "member",
72
+ "index",
73
+ "str",
74
+ "char",
75
+ "bool",
76
+ "null",
77
+ "extern",
78
+ "nullAssert",
79
+ "int",
80
+ "float",
81
+ "listLit",
82
+ "tuple",
83
+ "new",
84
+ "makeCase",
85
+ "interp"
50
86
  ]
51
87
  },
52
88
  "rethrow": "throw;",
89
+ "preludes": {
90
+ "pgStrInt": " internal static string Str(sbyte x) => x.ToString(global::System.Globalization.CultureInfo.InvariantCulture);\n internal static string Str(byte x) => x.ToString(global::System.Globalization.CultureInfo.InvariantCulture);\n internal static string Str(short x) => x.ToString(global::System.Globalization.CultureInfo.InvariantCulture);\n internal static string Str(ushort x) => x.ToString(global::System.Globalization.CultureInfo.InvariantCulture);\n internal static string Str(int x) => x.ToString(global::System.Globalization.CultureInfo.InvariantCulture);\n internal static string Str(uint x) => x.ToString(global::System.Globalization.CultureInfo.InvariantCulture);\n internal static string Str(long x) => x.ToString(global::System.Globalization.CultureInfo.InvariantCulture);\n internal static string Str(ulong x) => x.ToString(global::System.Globalization.CultureInfo.InvariantCulture);\n",
91
+ "pgStrFloat": " // f32 text is the f32's exact value widened to f64, printed under the f64 rule.\n internal static string Str(float x) => Str((double)x);\n // ECMAScript Number::toString: exact shortest digits (Burger-Dybvig over BigInteger, ties to even), then\n // the ECMAScript layout. Never \"R\": its digits are wrong on .NET Framework and on some .NET 10 patches.\n internal static string Str(double x)\n {\n if (double.IsNaN(x)) return \"NaN\";\n if (double.IsPositiveInfinity(x)) return \"Infinity\";\n if (double.IsNegativeInfinity(x)) return \"-Infinity\";\n if (x == 0) return \"0\";\n bool neg = x < 0;\n if (neg) x = -x;\n long bits = global::System.BitConverter.DoubleToInt64Bits(x);\n int be = (int)((bits >> 52) & 0x7FF);\n long f = bits & 0xFFFFFFFFFFFFFL;\n int e;\n if (be == 0) e = -1074; else { f |= 1L << 52; e = be - 1075; }\n bool even = (f & 1) == 0;\n bool asym = f == (1L << 52) && be > 1;\n global::System.Numerics.BigInteger r, s, mp, mm;\n if (e >= 0)\n {\n global::System.Numerics.BigInteger b = global::System.Numerics.BigInteger.One << e;\n if (!asym) { r = f * b * 2; s = 2; mp = b; mm = b; }\n else { r = f * b * 4; s = 4; mp = b * 2; mm = b; }\n }\n else\n {\n if (!asym) { r = (global::System.Numerics.BigInteger)f * 2; s = global::System.Numerics.BigInteger.One << (1 - e); mp = 1; mm = 1; }\n else { r = (global::System.Numerics.BigInteger)f * 4; s = global::System.Numerics.BigInteger.One << (2 - e); mp = 2; mm = 1; }\n }\n int k = (int)global::System.Math.Ceiling(global::System.Math.Log10(x) - 1e-10);\n if (k >= 0) s *= global::System.Numerics.BigInteger.Pow(10, k);\n else { global::System.Numerics.BigInteger p = global::System.Numerics.BigInteger.Pow(10, -k); r *= p; mp *= p; mm *= p; }\n while (even ? r + mp >= s : r + mp > s) { s *= 10; k++; }\n while (even ? (r + mp) * 10 < s : (r + mp) * 10 <= s) { r *= 10; mp *= 10; mm *= 10; k--; }\n global::System.Text.StringBuilder dg = new global::System.Text.StringBuilder(20);\n while (true)\n {\n r *= 10; mp *= 10; mm *= 10;\n int d = (int)global::System.Numerics.BigInteger.DivRem(r, s, out r);\n bool low = even ? r <= mm : r < mm;\n bool high = even ? r + mp >= s : r + mp > s;\n if (!low && !high) { dg.Append((char)('0' + d)); continue; }\n if (low && high) { int c = (r * 2).CompareTo(s); if (c > 0 || (c == 0 && (d & 1) == 1)) d++; }\n else if (high) d++;\n dg.Append((char)('0' + d));\n break;\n }\n string digits = dg.ToString();\n int n = k, len = digits.Length;\n global::System.Text.StringBuilder sb = new global::System.Text.StringBuilder(32);\n if (neg) sb.Append('-');\n if (len <= n && n <= 21) { sb.Append(digits); sb.Append('0', n - len); }\n else if (0 < n && n <= 21) { sb.Append(digits, 0, n); sb.Append('.'); sb.Append(digits, n, len - n); }\n else if (-6 < n && n <= 0) { sb.Append(\"0.\"); sb.Append('0', -n); sb.Append(digits); }\n else\n {\n sb.Append(digits[0]);\n if (len > 1) { sb.Append('.'); sb.Append(digits, 1, len - 1); }\n sb.Append('e'); sb.Append(n - 1 >= 0 ? '+' : '-');\n sb.Append(global::System.Math.Abs(n - 1).ToString(global::System.Globalization.CultureInfo.InvariantCulture));\n }\n return sb.ToString();\n }\n",
92
+ "pgShow": " // The one stringification rule for a value whose static type is not known here (print, a T-typed hole).\n internal static string Show(object? x) => x switch\n {\n null => \"null\",\n bool b => b ? \"true\" : \"false\",\n string s => s,\n double d => Str(d),\n float f => Str(f),\n int i => Str(i),\n long l => Str(l),\n sbyte i8 => Str(i8),\n byte u8 => Str(u8),\n short i16 => Str(i16),\n ushort u16 => Str(u16),\n uint u32 => Str(u32),\n ulong u64 => Str(u64),\n global::System.IFormattable fm => fm.ToString(null, global::System.Globalization.CultureInfo.InvariantCulture),\n _ => x.ToString() ?? \"\",\n };\n",
93
+ "pgAscii": " // ASCII-only case mapping: every other character is kept as is (System.Text.Ascii stops at the first one).\n internal static string UpperAscii(string s)\n {\n char[]? buf = null;\n for (int i = 0; i < s.Length; i++)\n if (s[i] >= 'a' && s[i] <= 'z') { buf ??= s.ToCharArray(); buf[i] = (char)(s[i] - 32); }\n return buf == null ? s : new string(buf);\n }\n internal static string LowerAscii(string s)\n {\n char[]? buf = null;\n for (int i = 0; i < s.Length; i++)\n if (s[i] >= 'A' && s[i] <= 'Z') { buf ??= s.ToCharArray(); buf[i] = (char)(s[i] + 32); }\n return buf == null ? s : new string(buf);\n }\n"
94
+ },
53
95
  "tables": {
96
+ "rangeWideType": {
97
+ "i8": "long", "i16": "long", "i32": "long", "u8": "long", "u16": "long", "u32": "long",
98
+ "i64": "global::System.Int128", "u64": "global::System.UInt128"
99
+ },
100
+ "floatSuffix": {
101
+ "f32": "f"
102
+ },
54
103
  "localDecl": {
55
104
  "mutable": "var $x",
56
105
  "const": "var $x"
@@ -89,22 +138,47 @@
89
138
  "constArrayClose": "}",
90
139
  "linksWithoutImports": true,
91
140
  "forbidsShadowedLocals": true,
92
- "escapes": {
141
+ "nativeCompoundAssign": true,
142
+ "nativeCoalesceAssign": true,
143
+ "assignmentOrder": "targetFirst",
144
+ "exprStmt": { "discardPrefix": "_ = " },
145
+ "literals": {
146
+ "string": {
147
+ "quote": "\"",
148
+ "map": {
149
+ "\\": "\\\\",
150
+ "\"": "\\\"",
151
+ "\n": "\\n",
152
+ "\t": "\\t",
153
+ "\r": "\\r"
154
+ },
155
+ "codepoint": "\\u$H4",
156
+ "astral": "\\U$H8"
157
+ },
93
158
  "interp": {
94
- "\"": "\\\"",
95
- "\\": "\\\\",
96
- "\n": "\\n",
97
- "\t": "\\t",
98
- "\r": "\\r",
99
- "{": "{{",
100
- "}": "}}"
159
+ "quote": "\"",
160
+ "map": {
161
+ "\\": "\\\\",
162
+ "\"": "\\\"",
163
+ "\n": "\\n",
164
+ "\t": "\\t",
165
+ "\r": "\\r",
166
+ "{": "{{",
167
+ "}": "}}"
168
+ },
169
+ "codepoint": "\\u$H4",
170
+ "astral": "\\U$H8"
101
171
  },
102
172
  "char": {
103
- "'": "\\'",
104
- "\\": "\\\\",
105
- "\n": "\\n",
106
- "\t": "\\t",
107
- "\r": "\\r"
173
+ "quote": "'",
174
+ "map": {
175
+ "\\": "\\\\",
176
+ "'": "\\'",
177
+ "\n": "\\n",
178
+ "\t": "\\t",
179
+ "\r": "\\r"
180
+ },
181
+ "codepoint": "\\u$H4"
108
182
  }
109
183
  },
110
184
  "identifiers": {
@@ -191,14 +265,19 @@
191
265
  "strategy": "prefix",
192
266
  "with": "@"
193
267
  },
268
+ "mangle": {
269
+ "replace": "$",
270
+ "with": "__"
271
+ },
194
272
  "reserved": [
195
- "PolyglotProgram",
196
273
  "PolyglotExtensions",
274
+ "__PgRt",
197
275
  "Main",
198
276
  "lhs",
199
277
  "__opt*",
200
278
  "__w*"
201
- ]
279
+ ],
280
+ "renames": { "_": "__u" }
202
281
  }
203
282
  },
204
283
  "rules": {
@@ -218,7 +297,20 @@
218
297
  ]
219
298
  },
220
299
  "Float": {
221
- "get": "node.text"
300
+ "tmpl": [
301
+ {
302
+ "get": "node.text"
303
+ },
304
+ {
305
+ "fn": "table",
306
+ "args": [
307
+ "floatSuffix",
308
+ {
309
+ "get": "node.type"
310
+ }
311
+ ]
312
+ }
313
+ ]
222
314
  },
223
315
  "Bool": {
224
316
  "case": {
@@ -244,8 +336,9 @@
244
336
  "get": "spec.nullLit"
245
337
  },
246
338
  "Str": {
247
- "fn": "escapeString",
339
+ "fn": "quoted",
248
340
  "args": [
341
+ "string",
249
342
  {
250
343
  "get": "node.value"
251
344
  }
@@ -286,6 +379,18 @@
286
379
  {
287
380
  "case": {
288
381
  "when": [
382
+ [
383
+ { "eq": ["node.calleeKind", "lambda"] },
384
+ { "tmpl": [ "((", { "type": "node.calleeType" }, ")", { "emitChild": "node.calleeExpr", "side": "recv" }, ")" ] }
385
+ ],
386
+ [
387
+ { "has": "node.hasCalleeExpr" },
388
+ { "emitChild": "node.calleeExpr", "side": "recv" }
389
+ ],
390
+ [
391
+ { "has": "node.linkCallee" },
392
+ { "tmpl": [ { "get": "option.class" }, ".", { "fn": "mangleName", "args": [ { "fn": "ident", "args": [ { "get": "node.linkCallee" } ] } ] } ] }
393
+ ],
289
394
  [
290
395
  {
291
396
  "eq": [
@@ -295,7 +400,8 @@
295
400
  },
296
401
  {
297
402
  "tmpl": [
298
- "PolyglotProgram.",
403
+ { "get": "option.class" },
404
+ ".",
299
405
  {
300
406
  "fn": "ident",
301
407
  "args": [
@@ -318,12 +424,12 @@
318
424
  }
319
425
  }
320
426
  },
321
- "(",
322
427
  {
323
- "map": "node.args",
324
- "sep": ", "
325
- },
326
- ")"
428
+ "case": {
429
+ "when": [[ { "eq": ["node.isRef", "true"] }, "" ]],
430
+ "else": { "tmpl": [ { "call": "typeArgsSuffix" }, "(", { "map": "node.args", "sep": ", " }, ")" ] }
431
+ }
432
+ }
327
433
  ]
328
434
  },
329
435
  "Member": {
@@ -647,6 +753,25 @@
647
753
  { "type": "node.castType" }
648
754
  ]
649
755
  },
756
+ "NullAssert": {
757
+ "case": {
758
+ "when": [
759
+ [
760
+ { "eq": ["node.isFail", "true"] },
761
+ { "tmpl": ["throw new global::System.NullReferenceException(", { "fn": "quoted", "args": ["string", { "get": "node.message" }] }, ")"] }
762
+ ]
763
+ ],
764
+ "else": {
765
+ "tmpl": [
766
+ "(",
767
+ { "emitChild": "node.operand", "side": "recv" },
768
+ " ?? throw new global::System.NullReferenceException(",
769
+ { "fn": "quoted", "args": ["string", { "get": "node.message" }] },
770
+ "))"
771
+ ]
772
+ }
773
+ }
774
+ },
650
775
  "Unary": {
651
776
  "tmpl": [
652
777
  {
@@ -666,7 +791,7 @@
666
791
  "lits": "node.chunks",
667
792
  "holes": "node.holes",
668
793
  "lit": {
669
- "fn": "escape",
794
+ "fn": "literal",
670
795
  "args": [
671
796
  "interp",
672
797
  {
@@ -693,15 +818,50 @@
693
818
  " ? \"true\" : \"false\")}"
694
819
  ]
695
820
  }
821
+ ],
822
+ [
823
+ { "eq": ["item.typeIsInt", "true"] },
824
+ {
825
+ "tmpl": [
826
+ { "fn": "require", "args": ["pgStrInt"] },
827
+ "{__PgRt.Str(",
828
+ { "emit": "item" },
829
+ ")}"
830
+ ]
831
+ }
832
+ ],
833
+ [
834
+ { "eq": ["item.typeIsFloat", "true"] },
835
+ {
836
+ "tmpl": [
837
+ { "fn": "require", "args": ["pgStrFloat"] },
838
+ "{__PgRt.Str(",
839
+ { "emit": "item" },
840
+ ")}"
841
+ ]
842
+ }
843
+ ],
844
+ [
845
+ { "or": [{ "eq": ["item.typeIsString", "true"] }, { "eq": ["item.typeIsChar", "true"] }] },
846
+ {
847
+ "tmpl": [
848
+ "{",
849
+ { "fn": "parenIfContains", "args": [":", { "emit": "item" }] },
850
+ "}"
851
+ ]
852
+ }
696
853
  ]
697
854
  ],
698
855
  "else": {
699
856
  "tmpl": [
700
- "{",
857
+ { "fn": "require", "args": ["pgShow"] },
858
+ { "fn": "require", "args": ["pgStrInt"] },
859
+ { "fn": "require", "args": ["pgStrFloat"] },
860
+ "{__PgRt.Show(",
701
861
  {
702
862
  "emit": "item"
703
863
  },
704
- "}"
864
+ ")}"
705
865
  ]
706
866
  }
707
867
  }
@@ -715,7 +875,7 @@
715
875
  "tmpl": [
716
876
  "'",
717
877
  {
718
- "fn": "escape",
878
+ "fn": "literal",
719
879
  "args": [
720
880
  "char",
721
881
  {
@@ -1127,7 +1287,7 @@
1127
1287
  "EnumDecl": {
1128
1288
  "line": {
1129
1289
  "tmpl": [
1130
- { "fn": "access" },
1290
+ { "call": "csAccess" },
1131
1291
  "enum ",
1132
1292
  {
1133
1293
  "fn": "ident",
@@ -1326,6 +1486,7 @@
1326
1486
  {
1327
1487
  "case": {
1328
1488
  "when": [
1489
+ [ { "eq": [ "decl.isAbstract", "true" ] }, "abstract " ],
1329
1490
  [
1330
1491
  {
1331
1492
  "eq": [
@@ -1384,12 +1545,22 @@
1384
1545
  },
1385
1546
  " ",
1386
1547
  {
1387
- "fn": "ident",
1388
- "args": [
1389
- {
1390
- "get": "decl.name"
1548
+ "case": {
1549
+ "when": [
1550
+ [
1551
+ { "has": "decl.linkName" },
1552
+ { "fn": "mangle", "args": [ { "fn": "ident", "args": [ { "get": "decl.linkName" } ] } ] }
1553
+ ]
1554
+ ],
1555
+ "else": {
1556
+ "fn": "ident",
1557
+ "args": [
1558
+ {
1559
+ "get": "decl.name"
1560
+ }
1561
+ ]
1391
1562
  }
1392
- ]
1563
+ }
1393
1564
  },
1394
1565
  {
1395
1566
  "fn": "generics"
@@ -1434,6 +1605,7 @@
1434
1605
  "line": {
1435
1606
  "tmpl": [
1436
1607
  "public ",
1608
+ { "case": { "when": [ [ { "eq": [ "decl.isStatic", "true" ] }, "static " ] ] } },
1437
1609
  {
1438
1610
  "type": "decl.returnType"
1439
1611
  },
@@ -1557,6 +1729,7 @@
1557
1729
  "line": {
1558
1730
  "tmpl": [
1559
1731
  "public ",
1732
+ { "case": { "when": [ [ { "eq": [ "decl.isStatic", "true" ] }, "static " ] ] } },
1560
1733
  {
1561
1734
  "type": "decl.returnType"
1562
1735
  },
@@ -1585,6 +1758,7 @@
1585
1758
  "line": {
1586
1759
  "tmpl": [
1587
1760
  "public ",
1761
+ { "case": { "when": [ [ { "eq": [ "decl.isStatic", "true" ] }, "static " ] ] } },
1588
1762
  {
1589
1763
  "type": "decl.returnType"
1590
1764
  },
@@ -1715,19 +1889,24 @@
1715
1889
  {
1716
1890
  "indent": [
1717
1891
  {
1718
- "line": {
1719
- "tmpl": [
1720
- "var ",
1721
- {
1722
- "fn": "ident",
1723
- "args": [
1892
+ "case": {
1893
+ "when": [ [ { "eq": [ "decl.setterValueParam", "value" ] }, "" ] ],
1894
+ "else": {
1895
+ "line": {
1896
+ "tmpl": [
1897
+ "var ",
1724
1898
  {
1725
- "get": "decl.setterValueParam"
1726
- }
1899
+ "fn": "ident",
1900
+ "args": [
1901
+ {
1902
+ "get": "decl.setterValueParam"
1903
+ }
1904
+ ]
1905
+ },
1906
+ " = value;"
1727
1907
  ]
1728
- },
1729
- " = value;"
1730
- ]
1908
+ }
1909
+ }
1731
1910
  }
1732
1911
  },
1733
1912
  {
@@ -1855,17 +2034,31 @@
1855
2034
  "tmpl": [
1856
2035
  "public virtual bool Equals(",
1857
2036
  {
1858
- "map": "decl.params",
1859
- "sep": ", ",
1860
- "item": {
1861
- "call": "csParam"
1862
- }
2037
+ "type": "decl.params.0.type"
2038
+ },
2039
+ "? ",
2040
+ {
2041
+ "fn": "ident",
2042
+ "args": [
2043
+ {
2044
+ "get": "decl.params.0.name"
2045
+ }
2046
+ ]
1863
2047
  },
1864
2048
  ") => ",
2049
+ {
2050
+ "fn": "ident",
2051
+ "args": [
2052
+ {
2053
+ "get": "decl.params.0.name"
2054
+ }
2055
+ ]
2056
+ },
2057
+ " is not null && (",
1865
2058
  {
1866
2059
  "emit": "decl.exprBody"
1867
2060
  },
1868
- ";"
2061
+ ");"
1869
2062
  ]
1870
2063
  }
1871
2064
  }
@@ -1877,16 +2070,37 @@
1877
2070
  "tmpl": [
1878
2071
  "public virtual bool Equals(",
1879
2072
  {
1880
- "map": "decl.params",
1881
- "sep": ", ",
1882
- "item": {
1883
- "call": "csParam"
1884
- }
2073
+ "type": "decl.params.0.type"
2074
+ },
2075
+ "? ",
2076
+ {
2077
+ "fn": "ident",
2078
+ "args": [
2079
+ {
2080
+ "get": "decl.params.0.name"
2081
+ }
2082
+ ]
1885
2083
  },
1886
2084
  ")"
1887
2085
  ]
1888
2086
  },
1889
2087
  "body": [
2088
+ {
2089
+ "line": {
2090
+ "tmpl": [
2091
+ "if (",
2092
+ {
2093
+ "fn": "ident",
2094
+ "args": [
2095
+ {
2096
+ "get": "decl.params.0.name"
2097
+ }
2098
+ ]
2099
+ },
2100
+ " is null) return false;"
2101
+ ]
2102
+ }
2103
+ },
1890
2104
  {
1891
2105
  "stmts": "decl.body"
1892
2106
  }
@@ -1919,7 +2133,7 @@
1919
2133
  }
1920
2134
  ]
1921
2135
  },
1922
- " a, ",
2136
+ "? a, ",
1923
2137
  {
1924
2138
  "fn": "ident",
1925
2139
  "args": [
@@ -1928,7 +2142,7 @@
1928
2142
  }
1929
2143
  ]
1930
2144
  },
1931
- " b) => a is null || b is null ? ReferenceEquals(a, b) : a.Equals(b);"
2145
+ "? b) => a is null || b is null ? ReferenceEquals(a, b) : a.Equals(b);"
1932
2146
  ]
1933
2147
  }
1934
2148
  },
@@ -1944,7 +2158,7 @@
1944
2158
  }
1945
2159
  ]
1946
2160
  },
1947
- " a, ",
2161
+ "? a, ",
1948
2162
  {
1949
2163
  "fn": "ident",
1950
2164
  "args": [
@@ -1953,7 +2167,7 @@
1953
2167
  }
1954
2168
  ]
1955
2169
  },
1956
- " b) => !(a == b);"
2170
+ "? b) => !(a == b);"
1957
2171
  ]
1958
2172
  }
1959
2173
  },
@@ -1972,9 +2186,6 @@
1972
2186
  " __o && this.Equals(__o);"
1973
2187
  ]
1974
2188
  }
1975
- },
1976
- {
1977
- "line": "public override int GetHashCode() => 0;"
1978
2189
  }
1979
2190
  ]
1980
2191
  }
@@ -1986,6 +2197,59 @@
1986
2197
  ]
1987
2198
  }
1988
2199
  ],
2200
+ [
2201
+ {
2202
+ "and": [
2203
+ {
2204
+ "eq": [
2205
+ "decl.kind",
2206
+ "operator"
2207
+ ]
2208
+ },
2209
+ {
2210
+ "eq": [
2211
+ "decl.opSymbol",
2212
+ "hash"
2213
+ ]
2214
+ }
2215
+ ]
2216
+ },
2217
+ {
2218
+ "case": {
2219
+ "when": [
2220
+ [
2221
+ {
2222
+ "eq": [
2223
+ "decl.exprBodied",
2224
+ "true"
2225
+ ]
2226
+ },
2227
+ {
2228
+ "line": {
2229
+ "tmpl": [
2230
+ "public override int GetHashCode() => ",
2231
+ {
2232
+ "emit": "decl.exprBody"
2233
+ },
2234
+ ";"
2235
+ ]
2236
+ }
2237
+ }
2238
+ ]
2239
+ ],
2240
+ "else": {
2241
+ "block": {
2242
+ "head": "public override int GetHashCode()",
2243
+ "body": [
2244
+ {
2245
+ "stmts": "decl.body"
2246
+ }
2247
+ ]
2248
+ }
2249
+ }
2250
+ }
2251
+ }
2252
+ ],
1989
2253
  [
1990
2254
  {
1991
2255
  "and": [
@@ -2108,6 +2372,10 @@
2108
2372
  "else": {
2109
2373
  "case": {
2110
2374
  "when": [
2375
+ [
2376
+ { "eq": [ "decl.isAbstract", "true" ] },
2377
+ { "line": { "tmpl": [ { "call": "csMethodSig" }, ";" ] } }
2378
+ ],
2111
2379
  [
2112
2380
  {
2113
2381
  "eq": [
@@ -2149,7 +2417,7 @@
2149
2417
  },
2150
2418
  "csRecordHead": {
2151
2419
  "tmpl": [
2152
- { "fn": "access" },
2420
+ { "call": "csAccess" },
2153
2421
  "record ",
2154
2422
  {
2155
2423
  "fn": "ident",
@@ -2381,6 +2649,25 @@
2381
2649
  }
2382
2650
  ]
2383
2651
  },
2652
+ "csRangeDecl": {
2653
+ "case": {
2654
+ "when": [ [ { "eq": [ "stmt.rangeEndSimple", "true" ] }, "var " ] ],
2655
+ "else": { "tmpl": [ { "type": "stmt.rangeType" }, " " ] }
2656
+ }
2657
+ },
2658
+ "rangeEndDecl": {
2659
+ "case": {
2660
+ "when": [ [ { "eq": [ "stmt.rangeEndSimple", "false" ] },
2661
+ { "tmpl": [ ", ", { "fn": "ident", "args": [ { "get": "stmt.rangeEndTemp" } ] }, " = ", { "emit": "stmt.rangeEnd" } ] } ] ],
2662
+ "else": ""
2663
+ }
2664
+ },
2665
+ "rangeEndRead": {
2666
+ "case": {
2667
+ "when": [ [ { "eq": [ "stmt.rangeEndSimple", "true" ] }, { "emit": "stmt.rangeEnd" } ] ],
2668
+ "else": { "fn": "ident", "args": [ { "get": "stmt.rangeEndTemp" } ] }
2669
+ }
2670
+ },
2384
2671
  "ForStmt": {
2385
2672
  "case": {
2386
2673
  "when": [
@@ -2394,16 +2681,59 @@
2394
2681
  {
2395
2682
  "case": {
2396
2683
  "when": [
2684
+ [
2685
+ { "eq": [ "stmt.inclusiveMayWrap", "true" ] },
2686
+ {
2687
+ "block": {
2688
+ "head": {
2689
+ "tmpl": [
2690
+ "for (",
2691
+ { "fn": "table", "args": [ "rangeWideType", { "get": "stmt.rangeTypeName" } ] },
2692
+ " ",
2693
+ { "get": "stmt.driver" },
2694
+ " = ",
2695
+ { "emit": "stmt.rangeStart" },
2696
+ { "call": "rangeEndDecl" },
2697
+ "; ",
2698
+ { "get": "stmt.driver" },
2699
+ " <= ",
2700
+ { "call": "rangeEndRead" },
2701
+ "; ",
2702
+ { "get": "stmt.driver" },
2703
+ "++)"
2704
+ ]
2705
+ },
2706
+ "body": [
2707
+ {
2708
+ "line": {
2709
+ "tmpl": [
2710
+ "var ",
2711
+ { "fn": "ident", "args": [ { "get": "stmt.binding" } ] },
2712
+ " = (",
2713
+ { "type": "stmt.rangeType" },
2714
+ ")",
2715
+ { "get": "stmt.driver" },
2716
+ ";"
2717
+ ]
2718
+ }
2719
+ },
2720
+ { "stmts": "stmt.body" }
2721
+ ]
2722
+ }
2723
+ }
2724
+ ],
2397
2725
  [
2398
2726
  { "eq": [ "stmt.captured", "true" ] },
2399
2727
  {
2400
2728
  "block": {
2401
2729
  "head": {
2402
2730
  "tmpl": [
2403
- "for (var ",
2731
+ "for (",
2732
+ { "call": "csRangeDecl" },
2404
2733
  { "get": "stmt.driver" },
2405
2734
  " = ",
2406
2735
  { "emit": "stmt.rangeStart" },
2736
+ { "call": "rangeEndDecl" },
2407
2737
  "; ",
2408
2738
  { "get": "stmt.driver" },
2409
2739
  {
@@ -2412,7 +2742,7 @@
2412
2742
  "else": " < "
2413
2743
  }
2414
2744
  },
2415
- { "emit": "stmt.rangeEnd" },
2745
+ { "call": "rangeEndRead" },
2416
2746
  "; ",
2417
2747
  { "get": "stmt.driver" },
2418
2748
  "++)"
@@ -2440,7 +2770,8 @@
2440
2770
  "block": {
2441
2771
  "head": {
2442
2772
  "tmpl": [
2443
- "for (var ",
2773
+ "for (",
2774
+ { "call": "csRangeDecl" },
2444
2775
  {
2445
2776
  "fn": "ident",
2446
2777
  "args": [
@@ -2453,6 +2784,7 @@
2453
2784
  {
2454
2785
  "emit": "stmt.rangeStart"
2455
2786
  },
2787
+ { "call": "rangeEndDecl" },
2456
2788
  "; ",
2457
2789
  {
2458
2790
  "fn": "ident",
@@ -2478,9 +2810,7 @@
2478
2810
  "else": " < "
2479
2811
  }
2480
2812
  },
2481
- {
2482
- "emit": "stmt.rangeEnd"
2483
- },
2813
+ { "call": "rangeEndRead" },
2484
2814
  "; ",
2485
2815
  {
2486
2816
  "fn": "ident",
@@ -2571,9 +2901,35 @@
2571
2901
  },
2572
2902
  "Program": {
2573
2903
  "seq": [
2904
+ {
2905
+ "line": "// <auto-generated/>"
2906
+ },
2907
+ {
2908
+ "line": "// Generated by Polyglot. Do not edit: regenerate with `polyglot build`."
2909
+ },
2574
2910
  {
2575
2911
  "line": "#nullable enable"
2576
2912
  },
2913
+ {
2914
+ "case": {
2915
+ "when": [
2916
+ [
2917
+ { "not": { "eq": ["module.allLowercaseTypeNames.count", "0"] } },
2918
+ { "line": "#pragma warning disable CS8981 // a .pg type name may be all lowercase" }
2919
+ ]
2920
+ ]
2921
+ }
2922
+ },
2923
+ {
2924
+ "case": {
2925
+ "when": [
2926
+ [
2927
+ { "not": { "eq": ["option.namespace", ""] } },
2928
+ { "line": { "tmpl": ["namespace ", { "get": "option.namespace" }, ";"] } }
2929
+ ]
2930
+ ]
2931
+ }
2932
+ },
2577
2933
  {
2578
2934
  "case": {
2579
2935
  "when": [
@@ -2608,12 +2964,19 @@
2608
2964
  }
2609
2965
  },
2610
2966
  {
2611
- "line": "using static PolyglotProgram;"
2967
+ "line": { "tmpl": ["using static ", { "get": "option.class" }, ";"] }
2612
2968
  }
2613
2969
  ]
2614
2970
  ]
2615
2971
  }
2616
2972
  },
2973
+ {
2974
+ "fn": "preludeSlot",
2975
+ "args": [
2976
+ "file static class __PgRt\n{\n",
2977
+ "}\n"
2978
+ ]
2979
+ },
2617
2980
  {
2618
2981
  "line": ""
2619
2982
  },
@@ -2653,26 +3016,8 @@
2653
3016
  "block": {
2654
3017
  "head": {
2655
3018
  "tmpl": [
2656
- {
2657
- "fn": "access"
2658
- },
2659
- "static ",
2660
- {
2661
- "case": {
2662
- "when": [
2663
- [
2664
- {
2665
- "eq": [
2666
- "module.linked",
2667
- "true"
2668
- ]
2669
- },
2670
- "partial "
2671
- ]
2672
- ],
2673
- "else": ""
2674
- }
2675
- },
3019
+ { "call": "csAccess" },
3020
+ "static partial ",
2676
3021
  "class PolyglotExtensions"
2677
3022
  ]
2678
3023
  },
@@ -2692,7 +3037,7 @@
2692
3037
  "case": {
2693
3038
  "when": [
2694
3039
  [
2695
- {
3040
+ { "and": [{
2696
3041
  "or": [
2697
3042
  {
2698
3043
  "not": {
@@ -2735,7 +3080,7 @@
2735
3080
  }
2736
3081
  }
2737
3082
  ]
2738
- },
3083
+ }, { "or": [{ "not": { "eq": ["module.globals.count", "0"] } }, { "not": { "eq": ["module.functions.count", "0"] } }] }] },
2739
3084
  {
2740
3085
  "line": ""
2741
3086
  }
@@ -2744,30 +3089,18 @@
2744
3089
  }
2745
3090
  },
2746
3091
  {
3092
+ "case": {
3093
+ "when": [
3094
+ [
3095
+ { "or": [{ "not": { "eq": ["module.globals.count", "0"] } }, { "not": { "eq": ["module.functions.count", "0"] } }] },
3096
+ {
2747
3097
  "block": {
2748
3098
  "head": {
2749
3099
  "tmpl": [
2750
- {
2751
- "fn": "access"
2752
- },
2753
- "static ",
2754
- {
2755
- "case": {
2756
- "when": [
2757
- [
2758
- {
2759
- "eq": [
2760
- "module.linked",
2761
- "true"
2762
- ]
2763
- },
2764
- "partial "
2765
- ]
2766
- ],
2767
- "else": ""
2768
- }
2769
- },
2770
- "class PolyglotProgram"
3100
+ { "call": "csAccess" },
3101
+ "static partial ",
3102
+ "class ",
3103
+ { "get": "option.class" }
2771
3104
  ]
2772
3105
  },
2773
3106
  "body": [
@@ -2825,9 +3158,19 @@
2825
3158
  "when": [
2826
3159
  [
2827
3160
  {
2828
- "eq": [
2829
- "module.hasEntry",
2830
- "true"
3161
+ "and": [
3162
+ {
3163
+ "eq": [
3164
+ "module.hasEntry",
3165
+ "true"
3166
+ ]
3167
+ },
3168
+ {
3169
+ "eq": [
3170
+ "option.entryPoint",
3171
+ "true"
3172
+ ]
3173
+ }
2831
3174
  ]
2832
3175
  },
2833
3176
  {
@@ -2846,12 +3189,12 @@
2846
3189
  ]
2847
3190
  },
2848
3191
  {
2849
- "line": "static void Main() { global::System.Globalization.CultureInfo.CurrentCulture = global::System.Globalization.CultureInfo.InvariantCulture; main().GetAwaiter().GetResult(); }"
3192
+ "line": "static void Main() { main().GetAwaiter().GetResult(); }"
2850
3193
  }
2851
3194
  ]
2852
3195
  ],
2853
3196
  "else": {
2854
- "line": "static void Main() { global::System.Globalization.CultureInfo.CurrentCulture = global::System.Globalization.CultureInfo.InvariantCulture; main(); }"
3197
+ "line": "static void Main() { main(); }"
2855
3198
  }
2856
3199
  }
2857
3200
  }
@@ -2863,12 +3206,31 @@
2863
3206
  }
2864
3207
  ]
2865
3208
  }
3209
+ }
3210
+ ]
3211
+ ]
3212
+ }
2866
3213
  }
2867
3214
  ]
2868
3215
  },
3216
+ "csAccess": {
3217
+ "case": {
3218
+ "when": [
3219
+ [
3220
+ { "not": { "eq": ["option.access", ""] } },
3221
+ { "tmpl": [{ "get": "option.access" }, " "] }
3222
+ ]
3223
+ ]
3224
+ }
3225
+ },
2869
3226
  "csFnSig": {
2870
3227
  "tmpl": [
2871
- "public static ",
3228
+ {
3229
+ "case": {
3230
+ "when": [[{ "eq": ["decl.isPrelude", "true"] }, "internal static "]],
3231
+ "else": "public static "
3232
+ }
3233
+ },
2872
3234
  {
2873
3235
  "case": {
2874
3236
  "when": [
@@ -2906,12 +3268,22 @@
2906
3268
  },
2907
3269
  " ",
2908
3270
  {
2909
- "fn": "ident",
2910
- "args": [
2911
- {
2912
- "get": "decl.name"
3271
+ "case": {
3272
+ "when": [
3273
+ [
3274
+ { "has": "decl.linkName" },
3275
+ { "fn": "mangle", "args": [ { "fn": "ident", "args": [ { "get": "decl.linkName" } ] } ] }
3276
+ ]
3277
+ ],
3278
+ "else": {
3279
+ "fn": "ident",
3280
+ "args": [
3281
+ {
3282
+ "get": "decl.name"
3283
+ }
3284
+ ]
2913
3285
  }
2914
- ]
3286
+ }
2915
3287
  },
2916
3288
  {
2917
3289
  "fn": "generics"
@@ -2944,7 +3316,12 @@
2944
3316
  },
2945
3317
  "csExtSig": {
2946
3318
  "tmpl": [
2947
- "public static ",
3319
+ {
3320
+ "case": {
3321
+ "when": [[{ "eq": ["decl.isPrelude", "true"] }, "internal static "]],
3322
+ "else": "public static "
3323
+ }
3324
+ },
2948
3325
  {
2949
3326
  "type": "decl.returnType"
2950
3327
  },
@@ -3042,7 +3419,8 @@
3042
3419
  },
3043
3420
  "csClassHead": {
3044
3421
  "tmpl": [
3045
- { "fn": "access" },
3422
+ { "call": "csAccess" },
3423
+ { "case": { "when": [ [ { "eq": [ "decl.isAbstract", "true" ] }, "abstract " ] ] } },
3046
3424
  "class ",
3047
3425
  {
3048
3426
  "fn": "ident",
@@ -3160,9 +3538,9 @@
3160
3538
  "when": [
3161
3539
  [
3162
3540
  {
3163
- "eq": [
3164
- "item.hasInit",
3165
- "true"
3541
+ "and": [
3542
+ { "eq": [ "item.hasInit", "true" ] },
3543
+ { "eq": [ "item.deferInit", "false" ] }
3166
3544
  ]
3167
3545
  },
3168
3546
  {
@@ -3187,9 +3565,9 @@
3187
3565
  "when": [
3188
3566
  [
3189
3567
  {
3190
- "eq": [
3191
- "decl.hasInit",
3192
- "true"
3568
+ "or": [
3569
+ { "eq": [ "decl.hasInit", "true" ] },
3570
+ { "not": { "eq": [ "decl.deferredInitFields.count", "0" ] } }
3193
3571
  ]
3194
3572
  },
3195
3573
  {
@@ -3244,6 +3622,12 @@
3244
3622
  ]
3245
3623
  },
3246
3624
  "body": [
3625
+ {
3626
+ "mapDecl": "decl.deferredInitFields",
3627
+ "each": { "line": { "tmpl": [
3628
+ "this.", { "fn": "ident", "args": [ { "get": "item.name" } ] }, " = ", { "emit": "item.init" }, ";"
3629
+ ] } }
3630
+ },
3247
3631
  {
3248
3632
  "stmts": "decl.initBody"
3249
3633
  }
@@ -3265,7 +3649,7 @@
3265
3649
  "block": {
3266
3650
  "head": {
3267
3651
  "tmpl": [
3268
- { "fn": "access" },
3652
+ { "call": "csAccess" },
3269
3653
  "interface ",
3270
3654
  {
3271
3655
  "fn": "ident",
@@ -3392,7 +3776,7 @@
3392
3776
  {
3393
3777
  "line": {
3394
3778
  "tmpl": [
3395
- { "fn": "access" },
3779
+ { "call": "csAccess" },
3396
3780
  "abstract record ",
3397
3781
  {
3398
3782
  "fn": "ident",
@@ -3414,7 +3798,7 @@
3414
3798
  "each": {
3415
3799
  "line": {
3416
3800
  "tmpl": [
3417
- { "fn": "access" },
3801
+ { "call": "csAccess" },
3418
3802
  "sealed record ",
3419
3803
  {
3420
3804
  "fn": "ident",
@@ -3470,6 +3854,32 @@
3470
3854
  "Type": {
3471
3855
  "case": {
3472
3856
  "when": [
3857
+ [
3858
+ {
3859
+ "and": [
3860
+ {
3861
+ "eq": [
3862
+ "type.kind",
3863
+ "function"
3864
+ ]
3865
+ },
3866
+ {
3867
+ "eq": [
3868
+ "type.nullable",
3869
+ "true"
3870
+ ]
3871
+ }
3872
+ ]
3873
+ },
3874
+ {
3875
+ "tmpl": [
3876
+ {
3877
+ "type": "type.base"
3878
+ },
3879
+ "?"
3880
+ ]
3881
+ }
3882
+ ],
3473
3883
  [
3474
3884
  {
3475
3885
  "eq": [
@@ -3659,10 +4069,20 @@
3659
4069
  "List.add": "$this.Add($0)",
3660
4070
  "List.clear": "$this.Clear()",
3661
4071
  "List.removeAll": "$this.RemoveAll($0)",
3662
- "List.removeAt": "$this.RemoveAt($0)"
4072
+ "List.removeAt": "$this.RemoveAt($0)",
4073
+ "IMapKey.type": "notnull",
4074
+ "Map.type": "global::System.Collections.Generic.OrderedDictionary<$0, $1>",
4075
+ "Map.constructor": "new $T()",
4076
+ "Map.count": "$this.Count",
4077
+ "Map.get": "($this.TryGetValue($0, out var $tmp) ? $tmp : ($T)null)",
4078
+ "Map.set": "$this[$0] = $1",
4079
+ "Map.has": "$this.ContainsKey($0)",
4080
+ "Map.remove": "$this.Remove($0)",
4081
+ "Map.keys": "new $T($this.Keys)",
4082
+ "Map.values": "new $T($this.Values)"
3663
4083
  },
3664
4084
  "std.io": {
3665
- "print": "global::System.Console.WriteLine(x is bool __pb ? (__pb ? \"true\" : \"false\") : (object?)x)",
4085
+ "print": { "template": "global::System.Console.WriteLine(__PgRt.Show(x))", "requires": ["pgShow", "pgStrInt", "pgStrFloat"] },
3666
4086
  "readText": "global::System.IO.File.ReadAllText(path)",
3667
4087
  "writeText": "global::System.IO.File.WriteAllText(path, content)",
3668
4088
  "appendText": "global::System.IO.File.AppendAllText(path, content)",
@@ -3673,6 +4093,7 @@
3673
4093
  "Math.PI": "global::System.Math.PI",
3674
4094
  "Math.E": "global::System.Math.E",
3675
4095
  "Math.sqrt": "global::System.Math.Sqrt($0)",
4096
+ "Math.isNaN": "double.IsNaN($0)",
3676
4097
  "Math.ln": "global::System.Math.Log($0)",
3677
4098
  "Math.log": "global::System.Math.Log($0)",
3678
4099
  "Math.log2": "global::System.Math.Log2($0)",
@@ -3705,12 +4126,23 @@
3705
4126
  "std.strings": {
3706
4127
  "string.isEmpty": "($this.Length == 0)",
3707
4128
  "string.len": "$this.Length",
3708
- "string.toUpper": "$this.ToUpper()",
3709
- "string.toLower": "$this.ToLower()",
3710
- "string.charAt": "$this[$0].ToString()",
3711
- "string.codePointAt": "char.ConvertToUtf32($this, $0)",
4129
+ "string.toUpper": "$this.ToUpperInvariant()",
4130
+ "string.toLower": "$this.ToLowerInvariant()",
4131
+ "string.toUpperAscii": { "template": "__PgRt.UpperAscii($this)", "requires": ["pgAscii"] },
4132
+ "string.toLowerAscii": { "template": "__PgRt.LowerAscii($this)", "requires": ["pgAscii"] },
3712
4133
  "string.codePoints": "global::System.Linq.Enumerable.Select($this.EnumerateRunes(), __r => __r.ToString())",
3713
- "string.toI32": "global::System.Int32.Parse($this)"
4134
+ "string.startsWith": "$this.StartsWith($0, global::System.StringComparison.Ordinal)",
4135
+ "string.endsWith": "$this.EndsWith($0, global::System.StringComparison.Ordinal)",
4136
+ "string.contains": "$this.Contains($0)",
4137
+ "string.trimAscii": "$this.Trim('\\t', '\\n', '\\v', '\\f', '\\r', ' ')",
4138
+ "compareOrdinal": "global::System.Math.Sign(string.CompareOrdinal(a, b))",
4139
+ "string.__pgCharAt": "$this[$0].ToString()",
4140
+ "string.__pgCodePointAt": "(char.IsSurrogatePair($this, $0) ? char.ConvertToUtf32($this, $0) : (int)$this[$0])",
4141
+ "string.__pgSubstring": "$this.Substring($0, $1 - $0)",
4142
+ "string.__pgIndexOf": "$this.IndexOf($0, $1, global::System.StringComparison.Ordinal)",
4143
+ "string.__pgReplaceAll": "$this.Replace($0, $1)",
4144
+ "string.__pgSplit": "new global::System.Collections.Generic.List<string>($this.Split($0))",
4145
+ "string.__pgFromCodePoint": "char.ConvertFromUtf32($0)"
3714
4146
  },
3715
4147
  "std.core": {
3716
4148
  "Error.type": "global::System.Exception",
@@ -3720,17 +4152,20 @@
3720
4152
  "Array.type": "$0[]",
3721
4153
  "Array.constructor": "global::System.Array.Empty<$0>()",
3722
4154
  "Array.count": "$this.Length",
3723
- "i8.parse": "sbyte.Parse($0)",
3724
- "i16.parse": "short.Parse($0)",
3725
- "i32.parse": "int.Parse($0)",
3726
- "i64.parse": "long.Parse($0)",
3727
- "u8.parse": "byte.Parse($0)",
3728
- "u16.parse": "ushort.Parse($0)",
3729
- "u32.parse": "uint.Parse($0)",
3730
- "u64.parse": "ulong.Parse($0)",
3731
- "f32.parse": "float.Parse($0, global::System.Globalization.CultureInfo.InvariantCulture)",
3732
- "f64.parse": "double.Parse($0, global::System.Globalization.CultureInfo.InvariantCulture)"
4155
+ "__pgText.rawLen": "$0.Length",
4156
+ "__pgText.rawCode": "((int)$0[$1])",
4157
+ "i8.__pgParse": "sbyte.Parse($0, global::System.Globalization.NumberStyles.Integer, global::System.Globalization.CultureInfo.InvariantCulture)",
4158
+ "i16.__pgParse": "short.Parse($0, global::System.Globalization.NumberStyles.Integer, global::System.Globalization.CultureInfo.InvariantCulture)",
4159
+ "i32.__pgParse": "int.Parse($0, global::System.Globalization.NumberStyles.Integer, global::System.Globalization.CultureInfo.InvariantCulture)",
4160
+ "i64.__pgParse": "long.Parse($0, global::System.Globalization.NumberStyles.Integer, global::System.Globalization.CultureInfo.InvariantCulture)",
4161
+ "u8.__pgParse": "byte.Parse($0, global::System.Globalization.NumberStyles.Integer, global::System.Globalization.CultureInfo.InvariantCulture)",
4162
+ "u16.__pgParse": "ushort.Parse($0, global::System.Globalization.NumberStyles.Integer, global::System.Globalization.CultureInfo.InvariantCulture)",
4163
+ "u32.__pgParse": "uint.Parse($0, global::System.Globalization.NumberStyles.Integer, global::System.Globalization.CultureInfo.InvariantCulture)",
4164
+ "u64.__pgParse": "ulong.Parse($0, global::System.Globalization.NumberStyles.Integer, global::System.Globalization.CultureInfo.InvariantCulture)",
4165
+ "f32.__pgParse": "float.Parse($0, global::System.Globalization.NumberStyles.Float, global::System.Globalization.CultureInfo.InvariantCulture)",
4166
+ "f64.__pgParse": "double.Parse($0, global::System.Globalization.NumberStyles.Float, global::System.Globalization.CultureInfo.InvariantCulture)"
3733
4167
  }
3734
4168
  },
3735
- "fileExtension": ".cs"
4169
+ "fileExtension": ".cs",
4170
+ "lineComment": "//"
3736
4171
  }