@mintplayer/polyglot-target-python 0.9.0 → 0.9.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 +44 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/polyglot-target-python",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "MintPlayer Polyglot Python 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
|
@@ -294,17 +294,44 @@
|
|
|
294
294
|
}
|
|
295
295
|
},
|
|
296
296
|
"Index": {
|
|
297
|
-
"
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
297
|
+
"case": {
|
|
298
|
+
"when": [
|
|
299
|
+
[
|
|
300
|
+
{
|
|
301
|
+
"eq": [
|
|
302
|
+
"node.receiverHasIndexer",
|
|
303
|
+
"true"
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"tmpl": [
|
|
308
|
+
{
|
|
309
|
+
"emitChild": "node.receiver",
|
|
310
|
+
"side": "recv"
|
|
311
|
+
},
|
|
312
|
+
".get(",
|
|
313
|
+
{
|
|
314
|
+
"emit": "node.index"
|
|
315
|
+
},
|
|
316
|
+
")"
|
|
317
|
+
]
|
|
318
|
+
}
|
|
319
|
+
]
|
|
320
|
+
],
|
|
321
|
+
"else": {
|
|
322
|
+
"tmpl": [
|
|
323
|
+
{
|
|
324
|
+
"emitChild": "node.receiver",
|
|
325
|
+
"side": "recv"
|
|
326
|
+
},
|
|
327
|
+
"[",
|
|
328
|
+
{
|
|
329
|
+
"emit": "node.index"
|
|
330
|
+
},
|
|
331
|
+
"]"
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
}
|
|
308
335
|
},
|
|
309
336
|
"Cond": {
|
|
310
337
|
"tmpl": [
|
|
@@ -2842,7 +2869,12 @@
|
|
|
2842
2869
|
"List.removeAt": "$this.pop($0)"
|
|
2843
2870
|
},
|
|
2844
2871
|
"std.io": {
|
|
2845
|
-
"print": "__builtins__.print((\"true\" if x else \"false\") if isinstance(x, bool) else (str(int(x)) if isinstance(x, float) and x.is_integer() and abs(x) < 1e16 else x))"
|
|
2872
|
+
"print": "__builtins__.print((\"true\" if x else \"false\") if isinstance(x, bool) else (str(int(x)) if isinstance(x, float) and x.is_integer() and abs(x) < 1e16 else x))",
|
|
2873
|
+
"readText": "__import__('pathlib').Path(path).read_text()",
|
|
2874
|
+
"writeText": "__import__('pathlib').Path(path).write_text(content)",
|
|
2875
|
+
"appendText": "open(path, 'a').write(content)",
|
|
2876
|
+
"fileExists": "__import__('os').path.exists(path)",
|
|
2877
|
+
"deleteFile": "__import__('os').remove(path)"
|
|
2846
2878
|
},
|
|
2847
2879
|
"std.math": {
|
|
2848
2880
|
"Math.PI": "__import__('math').pi",
|