@ball-lang/engine 1.59.9 → 1.59.11
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine_setup.d.ts","sourceRoot":"","sources":["../src/engine_setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,GAAG,CAAC;IAChB,gBAAgB,EAAE,GAAG,CAAC;IACtB,aAAa,EAAE,GAAG,CAAC;IACnB,WAAW,EAAE,GAAG,CAAC;IACjB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,YAAY;qBAuVzB,GAAG,2BAAuB,GAAG;qBA2F7B,GAAG,KAAG,GAAG;eAqCf,GAAG,KAAG,MAAM;;;;4BAsDZ,GAAG,GAAG,OAAO;0BACf,GAAG,GAAG,IAAI;qBACf,MAAM,SAAS,GAAG,WAAW,GAAG,GAAG,GAAG;;;yDAkJkB,GAAG,KAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"engine_setup.d.ts","sourceRoot":"","sources":["../src/engine_setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,GAAG,CAAC;IAChB,gBAAgB,EAAE,GAAG,CAAC;IACtB,aAAa,EAAE,GAAG,CAAC;IACnB,WAAW,EAAE,GAAG,CAAC;IACjB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,YAAY;qBAuVzB,GAAG,2BAAuB,GAAG;qBA2F7B,GAAG,KAAG,GAAG;eAqCf,GAAG,KAAG,MAAM;;;;4BAsDZ,GAAG,GAAG,OAAO;0BACf,GAAG,GAAG,IAAI;qBACf,MAAM,SAAS,GAAG,WAAW,GAAG,GAAG,GAAG;;;yDAkJkB,GAAG,KAAG,IAAI;0CAgoBvB,IAAI;sCA+hBR,IAAI;sCA0Bb,GAAG,KAAG,IAAI;uBA7zDzB,GAAG,KAAG,OAAO;0BA0vCV,GAAG,KAAG,GAAG;EAymBvC"}
|
package/dist/engine_setup.js
CHANGED
|
@@ -973,6 +973,12 @@ export function createEngineSetup(mod) {
|
|
|
973
973
|
_r('list_sublist', (i) => { const m = _m(i); const l = m['list'] ?? m['collection'] ?? []; const s = Number(m['start'] ?? m['arg0'] ?? 0); const e = m['end'] ?? m['arg1']; return Array.isArray(l) ? l.slice(s, e != null ? Number(e) : undefined) : []; });
|
|
974
974
|
_r('list_index_of', (i) => { const m = _m(i); const l = m['list'] ?? m['collection'] ?? []; const v = m['value'] ?? m['element']; if (typeof l === 'string')
|
|
975
975
|
return l.indexOf(String(v)); return Array.isArray(l) ? l.indexOf(v) : -1; });
|
|
976
|
+
// LEGACY ALIAS (#489): `list_add` is not a canonical Ball base function —
|
|
977
|
+
// dart/shared/lib/std_collections.dart declares `list_push`. It was added
|
|
978
|
+
// here ad hoc so the TS encoder's (non-canonical) output would run on this
|
|
979
|
+
// engine, which is precisely why the encoder/compiler vocabulary drift went
|
|
980
|
+
// unnoticed. The encoder now emits `list_push`; this registration is kept
|
|
981
|
+
// only so Ball programs encoded by an older @ball-lang/encoder still run.
|
|
976
982
|
_r('list_add', (i) => { const m = _m(i); const l = m['list'] ?? m['collection']; const v = m['value'] ?? m['element']; if (l instanceof Set) {
|
|
977
983
|
l.add(v);
|
|
978
984
|
return null;
|
|
@@ -1222,6 +1228,10 @@ export function createEngineSetup(mod) {
|
|
|
1222
1228
|
_r('string_contains', (i) => { const m = _m(i); return String(m['value'] ?? m['string'] ?? '').includes(String(m['substring'] ?? m['pattern'] ?? m['other'] ?? '')); });
|
|
1223
1229
|
_r('string_length', (i) => { const m = _m(i); return String(m['value'] ?? m['string'] ?? '').length; });
|
|
1224
1230
|
_r('string_index_of', (i) => { const m = _m(i); return String(m['value'] ?? m['string'] ?? m['left'] ?? m['arg0'] ?? '').indexOf(String(m['substring'] ?? m['pattern'] ?? m['right'] ?? m['arg1'] ?? '')); });
|
|
1231
|
+
// LEGACY ALIASES (#489), same story as `list_add` above: the canonical
|
|
1232
|
+
// names are `string_to_upper`/`string_to_lower` (dart/shared/lib/std.dart),
|
|
1233
|
+
// which the encoder now emits. Kept for programs encoded by an older
|
|
1234
|
+
// @ball-lang/encoder.
|
|
1225
1235
|
_r('string_to_upper_case', (i) => { const m = _m(i); return String(m['value'] ?? m['string'] ?? '').toUpperCase(); });
|
|
1226
1236
|
_r('string_to_lower_case', (i) => { const m = _m(i); return String(m['value'] ?? m['string'] ?? '').toLowerCase(); });
|
|
1227
1237
|
_r('string_trim', (i) => { const m = _m(i); return String(m['value'] ?? m['string'] ?? '').trim(); });
|