@elaraai/east 1.0.41 → 1.0.43
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/dist/src/compile.d.ts.map +1 -1
- package/dist/src/compile.js +10 -2
- package/dist/src/compile.js.map +1 -1
- package/dist/src/eastir.d.ts.map +1 -1
- package/dist/src/eastir.js +14 -4
- package/dist/src/eastir.js.map +1 -1
- package/dist/src/expr/block.d.ts.map +1 -1
- package/dist/src/expr/block.js +13 -2
- package/dist/src/expr/block.js.map +1 -1
- package/dist/src/expr/integer.d.ts +16 -11
- package/dist/src/expr/integer.d.ts.map +1 -1
- package/dist/src/expr/integer.js.map +1 -1
- package/dist/src/location.d.ts +40 -0
- package/dist/src/location.d.ts.map +1 -1
- package/dist/src/location.js +74 -0
- package/dist/src/location.js.map +1 -1
- package/dist/src/location.spec.js +82 -1
- package/dist/src/location.spec.js.map +1 -1
- package/dist/src/patch/compose.js +8 -2
- package/dist/src/patch/compose.js.map +1 -1
- package/dist/src/patch/patch.spec.js +17 -0
- package/dist/src/patch/patch.spec.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/compile.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,SAAS,CAAC;AAQlC,OAAO,EAAE,OAAO,EAAe,MAAM,yBAAyB,CAAC;AAW/D,OAAO,EAAqB,gBAAgB,EAAE,KAAK,aAAa,EAA+E,MAAM,mBAAmB,CAAC;AACzK,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,eAAO,MAAM,cAAc,EAAkC,CAAC,IAAI,EAAE,aAAa,KAAK,MAAM,CAAC;AAE7F;;;GAGG;AACH,eAAO,MAA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,CAAC,GAAG,EAAE,cAAc,KAAK,GAAG,CA6mCpS;AA6rED,gBAAgB;AAChB,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,aAAa,CAkChH"}
|
package/dist/src/compile.js
CHANGED
|
@@ -1430,8 +1430,16 @@ const builtin_evaluators = {
|
|
|
1430
1430
|
IntegerAdd: (_loc_id, _source_map) => (x, y) => BigInt.asIntN(64, x + y),
|
|
1431
1431
|
IntegerSubtract: (_loc_id, _source_map) => (x, y) => BigInt.asIntN(64, x - y),
|
|
1432
1432
|
IntegerMultiply: (_loc_id, _source_map) => (x, y) => BigInt.asIntN(64, x * y),
|
|
1433
|
-
IntegerDivide: (
|
|
1434
|
-
|
|
1433
|
+
IntegerDivide: (loc_id, source_map) => (x, y) => {
|
|
1434
|
+
if (y === 0n)
|
|
1435
|
+
throw new EastError("Division by zero", { location: (source_map?.resolve(loc_id) ?? []) });
|
|
1436
|
+
return BigInt.asIntN(64, x / y);
|
|
1437
|
+
},
|
|
1438
|
+
IntegerRemainder: (loc_id, source_map) => (x, y) => {
|
|
1439
|
+
if (y === 0n)
|
|
1440
|
+
throw new EastError("Division by zero", { location: (source_map?.resolve(loc_id) ?? []) });
|
|
1441
|
+
return x % y;
|
|
1442
|
+
},
|
|
1435
1443
|
IntegerPow: (_loc_id, _source_map) => (x, y) => y >= 0n ? BigInt.asIntN(64, x ** y) : 0n,
|
|
1436
1444
|
IntegerAbs: (_loc_id, _source_map) => (x) => BigInt.asIntN(64, x < 0n ? -x : x),
|
|
1437
1445
|
IntegerSign: (_loc_id, _source_map) => (x) => x > 0n ? 1n : x < 0n ? -1n : 0n,
|