@mintplayer/polyglot-target-php 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 +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/polyglot-target-php",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "MintPlayer Polyglot PHP 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
|
@@ -186,6 +186,9 @@
|
|
|
186
186
|
"Error.init": "new $T($0)",
|
|
187
187
|
"Error.message": "$this->getMessage()",
|
|
188
188
|
"Iterable.type": "iterable",
|
|
189
|
+
"Array.type": "array",
|
|
190
|
+
"Array.init": "[]",
|
|
191
|
+
"Array.count": "count($this)",
|
|
189
192
|
"i8.parse": "intval($0)",
|
|
190
193
|
"i16.parse": "intval($0)",
|
|
191
194
|
"i32.parse": "intval($0)",
|
|
@@ -217,12 +220,17 @@
|
|
|
217
220
|
"Math.sinh": "sinh($0)",
|
|
218
221
|
"Math.cosh": "cosh($0)",
|
|
219
222
|
"Math.tanh": "tanh($0)",
|
|
223
|
+
"Math.asinh": "asinh($0)",
|
|
224
|
+
"Math.acosh": "acosh($0)",
|
|
225
|
+
"Math.atanh": "atanh($0)",
|
|
220
226
|
"Math.trunc": "(float)(int)($0)",
|
|
221
227
|
"Math.floor": "floor($0)",
|
|
222
228
|
"Math.ceil": "ceil($0)",
|
|
223
229
|
"Math.min": "min($0, $1)",
|
|
224
230
|
"Math.max": "max($0, $1)",
|
|
225
231
|
"Math.abs": "abs($0)",
|
|
232
|
+
"Math.sign": "(fn($a) => $a > 0 ? 1 : ($a < 0 ? -1 : $a - $a))($0)",
|
|
233
|
+
"Math.clamp": "(fn($x, $lo, $hi) => $x < $lo ? $lo : ($x > $hi ? $hi : $x))($0, $1, $2)",
|
|
226
234
|
"Math.round": "round($0)"
|
|
227
235
|
}
|
|
228
236
|
},
|