@mirascript/mirascript 0.1.76 → 0.1.79
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/{chunk-ZRLBJK6A.js → chunk-BPFOJ4Q6.js} +499 -470
- package/dist/chunk-BPFOJ4Q6.js.map +6 -0
- package/dist/{chunk-VI74OKFU.js → chunk-LSPCAN32.js} +291 -226
- package/dist/chunk-LSPCAN32.js.map +6 -0
- package/dist/compiler/emit/constants.d.ts +1 -1
- package/dist/compiler/emit/constants.d.ts.map +1 -1
- package/dist/compiler/emit/consts.d.ts.map +1 -1
- package/dist/compiler/emit/index.d.ts.map +1 -1
- package/dist/compiler/emit-script.d.ts.map +1 -1
- package/dist/compiler/worker.js +1 -1
- package/dist/helpers/convert/{to-boolean.d.ts → boolean.d.ts} +1 -1
- package/dist/helpers/convert/boolean.d.ts.map +1 -0
- package/dist/helpers/convert/{to-format.d.ts → format.d.ts} +1 -1
- package/dist/helpers/convert/format.d.ts.map +1 -0
- package/dist/helpers/convert/index.d.ts +4 -4
- package/dist/helpers/convert/index.d.ts.map +1 -1
- package/dist/helpers/convert/{to-number.d.ts → number.d.ts} +1 -1
- package/dist/helpers/convert/number.d.ts.map +1 -0
- package/dist/helpers/convert/{to-string.d.ts → string.d.ts} +3 -1
- package/dist/helpers/convert/string.d.ts.map +1 -0
- package/dist/helpers/error.d.ts +1 -0
- package/dist/helpers/error.d.ts.map +1 -1
- package/dist/helpers/serialize.d.ts.map +1 -1
- package/dist/helpers/types/array-like.d.ts +8 -0
- package/dist/helpers/types/array-like.d.ts.map +1 -0
- package/dist/helpers/types/basic.d.ts +26 -0
- package/dist/helpers/types/basic.d.ts.map +1 -0
- package/dist/helpers/types/composed.d.ts +12 -0
- package/dist/helpers/types/composed.d.ts.map +1 -0
- package/dist/helpers/types/const.d.ts +6 -0
- package/dist/helpers/types/const.d.ts.map +1 -0
- package/dist/helpers/types/get-type.d.ts +6 -0
- package/dist/helpers/types/get-type.d.ts.map +1 -0
- package/dist/helpers/types/index.d.ts +6 -0
- package/dist/helpers/types/index.d.ts.map +1 -0
- package/dist/helpers/types/proto.d.ts +5 -0
- package/dist/helpers/types/proto.d.ts.map +1 -0
- package/dist/helpers/utils.d.ts +9 -0
- package/dist/helpers/utils.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/subtle.js +3 -3
- package/dist/vm/lib/global/debug.d.ts.map +1 -1
- package/dist/vm/lib/global/json.d.ts +3 -2
- package/dist/vm/lib/global/json.d.ts.map +1 -1
- package/dist/vm/lib/global/math/tgamma.d.ts.map +1 -1
- package/dist/vm/lib/global/sequence/entries.d.ts +1 -1
- package/dist/vm/lib/global/sequence/entries.d.ts.map +1 -1
- package/dist/vm/lib/global/sequence/fold.d.ts +3 -0
- package/dist/vm/lib/global/sequence/fold.d.ts.map +1 -0
- package/dist/vm/lib/global/sequence/group.d.ts +3 -0
- package/dist/vm/lib/global/sequence/group.d.ts.map +1 -0
- package/dist/vm/lib/global/sequence/index.d.ts +2 -0
- package/dist/vm/lib/global/sequence/index.d.ts.map +1 -1
- package/dist/vm/lib/global/sequence/new.d.ts.map +1 -1
- package/dist/vm/lib/global/sequence/zip.d.ts +2 -2
- package/dist/vm/lib/global/sequence/zip.d.ts.map +1 -1
- package/dist/vm/lib/helpers.d.ts +2 -2
- package/dist/vm/lib/helpers.d.ts.map +1 -1
- package/dist/vm/lib/mod/index.d.ts +1 -1
- package/dist/vm/lib/mod/index.d.ts.map +1 -1
- package/dist/vm/lib/mod/matrix/bin-ops.d.ts +8 -0
- package/dist/vm/lib/mod/matrix/bin-ops.d.ts.map +1 -0
- package/dist/vm/lib/mod/matrix/fill.d.ts +6 -0
- package/dist/vm/lib/mod/matrix/fill.d.ts.map +1 -0
- package/dist/vm/lib/mod/matrix/helpers.d.ts +6 -0
- package/dist/vm/lib/mod/matrix/helpers.d.ts.map +1 -0
- package/dist/vm/lib/mod/matrix/index.d.ts +6 -0
- package/dist/vm/lib/mod/matrix/index.d.ts.map +1 -0
- package/dist/vm/lib/mod/matrix/invert.d.ts +3 -0
- package/dist/vm/lib/mod/matrix/invert.d.ts.map +1 -0
- package/dist/vm/lib/mod/matrix/size.d.ts +2 -0
- package/dist/vm/lib/mod/matrix/size.d.ts.map +1 -0
- package/dist/vm/lib/mod/matrix/transpose.d.ts +2 -0
- package/dist/vm/lib/mod/matrix/transpose.d.ts.map +1 -0
- package/dist/vm/operations/array-range.d.ts +3 -3
- package/dist/vm/operations/array-range.d.ts.map +1 -1
- package/dist/vm/operations/call.d.ts +1 -1
- package/dist/vm/operations/call.d.ts.map +1 -1
- package/dist/vm/operations/compound.d.ts +1 -13
- package/dist/vm/operations/compound.d.ts.map +1 -1
- package/dist/vm/operations/index.d.ts +3 -0
- package/dist/vm/operations/index.d.ts.map +1 -1
- package/dist/vm/operations/iterable.d.ts +6 -0
- package/dist/vm/operations/iterable.d.ts.map +1 -0
- package/dist/vm/operations/record.d.ts +6 -0
- package/dist/vm/operations/record.d.ts.map +1 -0
- package/dist/vm/operations/slice.d.ts.map +1 -1
- package/dist/vm/operations/spread.d.ts +6 -0
- package/dist/vm/operations/spread.d.ts.map +1 -0
- package/dist/vm/operations/utils.d.ts.map +1 -1
- package/dist/vm/types/extern/access.d.ts +5 -0
- package/dist/vm/types/extern/access.d.ts.map +1 -0
- package/dist/vm/types/{extern.d.ts → extern/index.d.ts} +3 -3
- package/dist/vm/types/extern/index.d.ts.map +1 -0
- package/dist/vm/types/extern/tag.d.ts +3 -0
- package/dist/vm/types/extern/tag.d.ts.map +1 -0
- package/dist/vm/types/extern/utils.d.ts +13 -0
- package/dist/vm/types/extern/utils.d.ts.map +1 -0
- package/dist/vm/types/index.d.ts +3 -3
- package/dist/vm/types/index.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/compiler/compile-fast.ts +1 -1
- package/src/compiler/diagnostic.ts +2 -2
- package/src/compiler/emit/constants.ts +1 -1
- package/src/compiler/emit/consts.ts +0 -1
- package/src/compiler/emit/index.ts +1 -7
- package/src/compiler/emit/sourcemap.ts +1 -1
- package/src/compiler/emit-script.ts +1 -0
- package/src/compiler/load-module.ts +5 -1
- package/src/helpers/convert/{to-boolean.ts → boolean.ts} +1 -1
- package/src/helpers/convert/{to-format.ts → format.ts} +1 -1
- package/src/helpers/convert/index.ts +4 -4
- package/src/helpers/convert/{to-number.ts → number.ts} +16 -32
- package/src/helpers/convert/{to-string.ts → string.ts} +5 -4
- package/src/helpers/error.ts +3 -1
- package/src/helpers/serialize.ts +45 -44
- package/src/helpers/types/array-like.ts +32 -0
- package/src/helpers/types/basic.ts +82 -0
- package/src/helpers/types/composed.ts +27 -0
- package/src/helpers/types/const.ts +44 -0
- package/src/helpers/types/get-type.ts +16 -0
- package/src/helpers/types/index.ts +5 -0
- package/src/helpers/types/proto.ts +21 -0
- package/src/helpers/utils.ts +33 -0
- package/src/vm/lib/global/debug.ts +4 -8
- package/src/vm/lib/global/json.ts +21 -9
- package/src/vm/lib/global/math/tgamma.ts +8 -14
- package/src/vm/lib/global/sequence/all-any.ts +1 -1
- package/src/vm/lib/global/sequence/entries.ts +6 -1
- package/src/vm/lib/global/sequence/find.ts +1 -1
- package/src/vm/lib/global/sequence/fold.ts +30 -0
- package/src/vm/lib/global/sequence/group.ts +37 -0
- package/src/vm/lib/global/sequence/index.ts +2 -0
- package/src/vm/lib/global/sequence/map-filter.ts +3 -3
- package/src/vm/lib/global/sequence/new.ts +9 -3
- package/src/vm/lib/global/sequence/sort.ts +1 -1
- package/src/vm/lib/global/sequence/unique.ts +1 -1
- package/src/vm/lib/global/sequence/with.ts +5 -5
- package/src/vm/lib/global/sequence/zip.ts +21 -10
- package/src/vm/lib/global/time.ts +1 -1
- package/src/vm/lib/helpers.ts +12 -5
- package/src/vm/lib/mod/index.ts +1 -1
- package/src/vm/lib/mod/matrix/bin-ops.ts +291 -0
- package/src/vm/lib/mod/matrix/fill.ts +109 -0
- package/src/vm/lib/mod/matrix/helpers.ts +26 -0
- package/src/vm/lib/mod/matrix/index.ts +5 -0
- package/src/vm/lib/mod/matrix/invert.ts +122 -0
- package/src/vm/lib/mod/matrix/size.ts +15 -0
- package/src/vm/lib/mod/matrix/transpose.ts +32 -0
- package/src/vm/operations/array-range.ts +15 -27
- package/src/vm/operations/call.ts +2 -2
- package/src/vm/operations/compound.ts +5 -125
- package/src/vm/operations/helpers.ts +1 -1
- package/src/vm/operations/index.ts +3 -0
- package/src/vm/operations/iterable.ts +40 -0
- package/src/vm/operations/record.ts +33 -0
- package/src/vm/operations/slice.ts +23 -22
- package/src/vm/operations/spread.ts +57 -0
- package/src/vm/operations/type-check.ts +1 -1
- package/src/vm/operations/utils.ts +45 -37
- package/src/vm/types/boundary.ts +2 -2
- package/src/vm/types/extern/access.ts +24 -0
- package/src/vm/types/extern/index.ts +124 -0
- package/src/vm/types/extern/tag.ts +58 -0
- package/src/vm/types/extern/utils.ts +55 -0
- package/src/vm/types/function.ts +1 -1
- package/src/vm/types/index.ts +3 -3
- package/dist/chunk-VI74OKFU.js.map +0 -6
- package/dist/chunk-ZRLBJK6A.js.map +0 -6
- package/dist/helpers/convert/to-boolean.d.ts.map +0 -1
- package/dist/helpers/convert/to-format.d.ts.map +0 -1
- package/dist/helpers/convert/to-number.d.ts.map +0 -1
- package/dist/helpers/convert/to-string.d.ts.map +0 -1
- package/dist/helpers/types.d.ts +0 -58
- package/dist/helpers/types.d.ts.map +0 -1
- package/dist/vm/lib/mod/matrix.d.ts +0 -15
- package/dist/vm/lib/mod/matrix.d.ts.map +0 -1
- package/dist/vm/types/extern.d.ts.map +0 -1
- package/src/helpers/types.ts +0 -283
- package/src/vm/lib/mod/matrix.ts +0 -590
- package/src/vm/types/extern.ts +0 -197
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/vm/lib/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../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AO,GAAG,cAAc,IAAI,CAAC,CAAC,SAAS,cAAc,GAAG,CAAC,GAAG;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC,GAClH,WAAW,CAAC;AAEhB,YAAY;AACZ,wBAAgB,KAAK,CACjB,KAAK,CAAC,CAAC,SAAS,cAAc,GAAG,OAAO,EACxC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAC1D,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAc7D"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * as matrix from './matrix.js';
|
|
1
|
+
export * as matrix from './matrix/index.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/mod/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/mod/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type VmConst } from '../../../types/index.js';
|
|
2
|
+
export declare const entrywise: ((a: import("../../../types/index.js").VmValue | undefined, b: import("../../../types/index.js").VmValue | undefined, f: import("../../../types/index.js").VmValue | undefined) => VmConst) & import("../../helpers.js").VmLibOption & Record<never, never>;
|
|
3
|
+
export declare const add: ((a: import("../../../types/index.js").VmValue | undefined, b: import("../../../types/index.js").VmValue | undefined) => VmConst) & import("../../helpers.js").VmLibOption & Record<never, never>;
|
|
4
|
+
export declare const subtract: ((a: import("../../../types/index.js").VmValue | undefined, b: import("../../../types/index.js").VmValue | undefined) => VmConst) & import("../../helpers.js").VmLibOption & Record<never, never>;
|
|
5
|
+
export declare const entrywise_multiply: ((a: import("../../../types/index.js").VmValue | undefined, b: import("../../../types/index.js").VmValue | undefined) => VmConst) & import("../../helpers.js").VmLibOption & Record<never, never>;
|
|
6
|
+
export declare const entrywise_divide: ((a: import("../../../types/index.js").VmValue | undefined, b: import("../../../types/index.js").VmValue | undefined) => VmConst) & import("../../helpers.js").VmLibOption & Record<never, never>;
|
|
7
|
+
export declare const multiply: ((a: import("../../../types/index.js").VmValue | undefined, b: import("../../../types/index.js").VmValue | undefined) => VmConst) & import("../../helpers.js").VmLibOption & Record<never, never>;
|
|
8
|
+
//# sourceMappingURL=bin-ops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin-ops.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/mod/matrix/bin-ops.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAiIlE,eAAO,MAAM,SAAS,6PAsBrB,CAAC;AAEF,eAAO,MAAM,GAAG,mMAef,CAAC;AAEF,eAAO,MAAM,QAAQ,mMAepB,CAAC;AAEF,eAAO,MAAM,kBAAkB,mMAe9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,mMAe5B,CAAC;AAEF,eAAO,MAAM,QAAQ,mMAmEpB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { VmArray, VmConst } from '../../../types/index.js';
|
|
2
|
+
export declare const zeros: ((...size: readonly (import("../../../types/index.js").VmValue | undefined)[]) => VmArray) & import("../../helpers.js").VmLibOption & Record<never, never>;
|
|
3
|
+
export declare const ones: ((...size: readonly (import("../../../types/index.js").VmValue | undefined)[]) => VmArray) & import("../../helpers.js").VmLibOption & Record<never, never>;
|
|
4
|
+
export declare const identity: ((...size: readonly (import("../../../types/index.js").VmValue | undefined)[]) => number[][]) & import("../../helpers.js").VmLibOption & Record<never, never>;
|
|
5
|
+
export declare const diagonal: ((x: import("../../../types/index.js").VmValue | undefined, k?: import("../../../types/index.js").VmValue | undefined) => VmConst[]) & import("../../helpers.js").VmLibOption & Record<never, never>;
|
|
6
|
+
//# sourceMappingURL=fill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fill.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/mod/matrix/fill.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAS,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAmBvE,eAAO,MAAM,KAAK,4JAKhB,CAAC;AAEH,eAAO,MAAM,IAAI,4JAKf,CAAC;AAEH,eAAO,MAAM,QAAQ,+JAyBpB,CAAC;AAEF,eAAO,MAAM,QAAQ,sMA8CpB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type VmConst, type VmValue } from '../../../types/index.js';
|
|
2
|
+
/** 计算尺寸 */
|
|
3
|
+
export declare function size(matrix: VmValue): [] | [number] | [number, number];
|
|
4
|
+
/** 数组元素转为 number */
|
|
5
|
+
export declare function num(v: VmConst | undefined): number;
|
|
6
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/mod/matrix/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAEhF,WAAW;AACX,wBAAgB,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAgBtE;AAED,oBAAoB;AACpB,wBAAgB,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAElD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/mod/matrix/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invert.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/mod/matrix/invert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAIvD,eAAO,MAAM,MAAM,yIAqHlB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/mod/matrix/size.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,iKAWhB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const transpose: ((matrix: import("../../../types/index.js").VmValue | undefined) => string | number | boolean | import("../../../types/index.js").VmRecord | import("../../../types/index.js").VmArray | import("../../../types/function.js").VmFunction | import("../../../types/module.js").VmModule<Record<string, import("../../../types/index.js").VmImmutable>> | import("../../../types/index.js").VmExtern<object> | null) & import("../../helpers.js").VmLibOption & Record<never, never>;
|
|
2
|
+
//# sourceMappingURL=transpose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transpose.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/mod/matrix/transpose.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,odA0BrB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { VmAny
|
|
1
|
+
import type { VmAny } from '../types/index.js';
|
|
2
2
|
/** 构造范围数组 */
|
|
3
|
-
export declare const $ArrayRange: (start: VmAny, end: VmAny) =>
|
|
3
|
+
export declare const $ArrayRange: (start: VmAny, end: VmAny) => number[];
|
|
4
4
|
/** 构造范围数组(不包含结束值) */
|
|
5
|
-
export declare const $ArrayRangeExclusive: (start: VmAny, end: VmAny) =>
|
|
5
|
+
export declare const $ArrayRangeExclusive: (start: VmAny, end: VmAny) => number[];
|
|
6
6
|
//# sourceMappingURL=array-range.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-range.d.ts","sourceRoot":"","sources":["../../../src/vm/operations/array-range.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"array-range.d.ts","sourceRoot":"","sources":["../../../src/vm/operations/array-range.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAmB/C,aAAa;AACb,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,EAAE,KAAK,KAAK,KAAG,MAAM,EAE5D,CAAC;AACF,qBAAqB;AACrB,eAAO,MAAM,oBAAoB,GAAI,OAAO,KAAK,EAAE,KAAK,KAAK,KAAG,MAAM,EAErE,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { VmExtern, VmFunction, VmAny, VmArray, VmValue } from '../types/ind
|
|
|
2
2
|
/** 调用返回类型 */
|
|
3
3
|
type CallReturn<T extends VmValue> = T extends VmFunction<infer F> ? F extends (...args: readonly VmAny[]) => infer R ? R extends void | undefined ? null : R : VmValue : T extends VmExtern<infer E> ? E extends (...args: readonly VmAny[]) => infer R ? R extends void | undefined ? null : R extends VmValue ? R : R extends object ? VmExtern<R> : VmValue : VmValue : VmValue;
|
|
4
4
|
/** 调用函数 */
|
|
5
|
-
export declare function $Call<T extends VmValue, A extends readonly VmValue[]>(func: T, args: A): CallReturn<T>;
|
|
5
|
+
export declare function $Call<T extends VmValue, const A extends readonly VmValue[]>(func: T, args: A): CallReturn<T>;
|
|
6
6
|
/** 过滤剩余参数数组 */
|
|
7
7
|
export declare function $VArgs(varags: VmAny[]): VmArray;
|
|
8
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../../src/vm/operations/call.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAGvF,aAAa;AACb,KAAK,UAAU,CAAC,CAAC,SAAS,OAAO,IAC7B,CAAC,SAAS,UAAU,CAAC,MAAM,CAAC,CAAC,GACvB,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,SAAS,KAAK,EAAE,KAAK,MAAM,CAAC,GAE5C,CAAC,SAAS,IAAI,GAAG,SAAS,GACtB,IAAI,GACJ,CAAC,GACL,OAAO,GACX,CAAC,SAAS,QAAQ,CAAC,MAAM,CAAC,CAAC,GACzB,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,SAAS,KAAK,EAAE,KAAK,MAAM,CAAC,GAE5C,CAAC,SAAS,IAAI,GAAG,SAAS,GACtB,IAAI,GACJ,CAAC,SAAS,OAAO,GACf,CAAC,GACD,CAAC,SAAS,MAAM,GACd,QAAQ,CAAC,CAAC,CAAC,GACX,OAAO,GACf,OAAO,GACX,OAAO,CAAC;AAEpB,WAAW;AACX,wBAAgB,KAAK,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../../src/vm/operations/call.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAGvF,aAAa;AACb,KAAK,UAAU,CAAC,CAAC,SAAS,OAAO,IAC7B,CAAC,SAAS,UAAU,CAAC,MAAM,CAAC,CAAC,GACvB,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,SAAS,KAAK,EAAE,KAAK,MAAM,CAAC,GAE5C,CAAC,SAAS,IAAI,GAAG,SAAS,GACtB,IAAI,GACJ,CAAC,GACL,OAAO,GACX,CAAC,SAAS,QAAQ,CAAC,MAAM,CAAC,CAAC,GACzB,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,SAAS,KAAK,EAAE,KAAK,MAAM,CAAC,GAE5C,CAAC,SAAS,IAAI,GAAG,SAAS,GACtB,IAAI,GACJ,CAAC,SAAS,OAAO,GACf,CAAC,GACD,CAAC,SAAS,MAAM,GACd,QAAQ,CAAC,CAAC,CAAC,GACX,OAAO,GACf,OAAO,GACX,OAAO,CAAC;AAEpB,WAAW;AACX,wBAAgB,KAAK,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAY5G;AAED,eAAe;AACf,wBAAgB,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAQ/C"}
|
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
import type { VmAny,
|
|
2
|
-
/** 检查值是否在可迭代对象中 */
|
|
3
|
-
export declare const $In: (value: VmAny, iterable: VmAny) => boolean;
|
|
1
|
+
import type { VmAny, VmValue } from '../types/index.js';
|
|
4
2
|
/** 获取值的长度 */
|
|
5
3
|
export declare const $Length: (value: VmAny) => number;
|
|
6
|
-
/** 删除记录中的指定字段 */
|
|
7
|
-
export declare const $Omit: (value: VmAny, omitted: ReadonlyArray<number | string>) => VmRecord;
|
|
8
|
-
/** 选择记录中的指定字段 */
|
|
9
|
-
export declare const $Pick: (value: VmAny, picked: ReadonlyArray<number | string>) => VmRecord;
|
|
10
4
|
/** 检查是否拥有字段 */
|
|
11
5
|
export declare const $Has: (obj: VmAny, key: VmAny) => boolean;
|
|
12
6
|
/** 获取字段 */
|
|
13
7
|
export declare const $Get: (obj: VmAny, key: VmAny) => VmValue;
|
|
14
8
|
/** 设置字段 */
|
|
15
9
|
export declare const $Set: (obj: VmAny, key: VmAny, value: VmAny) => void;
|
|
16
|
-
/** 获取可迭代对象 */
|
|
17
|
-
export declare const $Iterable: (value: VmAny) => Iterable<VmValue | undefined>;
|
|
18
|
-
/** 展开记录 */
|
|
19
|
-
export declare const $RecordSpread: (record: VmAny) => VmRecord | null;
|
|
20
|
-
/** 展开数组 */
|
|
21
|
-
export declare const $ArraySpread: (array: VmAny) => Iterable<VmConst | undefined>;
|
|
22
10
|
//# sourceMappingURL=compound.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compound.d.ts","sourceRoot":"","sources":["../../../src/vm/operations/compound.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compound.d.ts","sourceRoot":"","sources":["../../../src/vm/operations/compound.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAQxD,aAAa;AACb,eAAO,MAAM,OAAO,GAAI,OAAO,KAAK,KAAG,MAOtC,CAAC;AAEF,eAAe;AACf,eAAO,MAAM,IAAI,GAAI,KAAK,KAAK,EAAE,KAAK,KAAK,KAAG,OAM7C,CAAC;AAEF,WAAW;AACX,eAAO,MAAM,IAAI,GAAI,KAAK,KAAK,EAAE,KAAK,KAAK,KAAG,OAsB7C,CAAC;AACF,WAAW;AACX,eAAO,MAAM,IAAI,GAAI,KAAK,KAAK,EAAE,KAAK,KAAK,EAAE,OAAO,KAAK,KAAG,IAM3D,CAAC"}
|
|
@@ -5,6 +5,9 @@ export * from './operator.js';
|
|
|
5
5
|
export * from './slice.js';
|
|
6
6
|
export * from './helpers.js';
|
|
7
7
|
export * from './compound.js';
|
|
8
|
+
export * from './spread.js';
|
|
9
|
+
export * from './record.js';
|
|
10
|
+
export * from './iterable.js';
|
|
8
11
|
export * from './cp.js';
|
|
9
12
|
export * from './call.js';
|
|
10
13
|
export * from './array-range.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vm/operations/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vm/operations/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { VmAny, VmValue } from '../types/index.js';
|
|
2
|
+
/** 检查值是否在可迭代对象中 */
|
|
3
|
+
export declare const $In: (value: VmAny, iterable: VmAny) => boolean;
|
|
4
|
+
/** 获取可迭代对象 */
|
|
5
|
+
export declare const $Iterable: (value: VmAny) => Iterable<VmValue | undefined>;
|
|
6
|
+
//# sourceMappingURL=iterable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iterable.d.ts","sourceRoot":"","sources":["../../../src/vm/operations/iterable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAY,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAIlE,mBAAmB;AACnB,eAAO,MAAM,GAAG,GAAI,OAAO,KAAK,EAAE,UAAU,KAAK,KAAG,OAoBnD,CAAC;AAEF,cAAc;AACd,eAAO,MAAM,SAAS,GAAI,OAAO,KAAK,KAAG,QAAQ,CAAC,OAAO,GAAG,SAAS,CAMpE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { VmAny, VmRecord } from '../types/index.js';
|
|
2
|
+
/** 删除记录中的指定字段 */
|
|
3
|
+
export declare const $Omit: (value: VmAny, omitted: ReadonlyArray<number | string>) => VmRecord;
|
|
4
|
+
/** 选择记录中的指定字段 */
|
|
5
|
+
export declare const $Pick: (value: VmAny, picked: ReadonlyArray<number | string>) => VmRecord;
|
|
6
|
+
//# sourceMappingURL=record.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../src/vm/operations/record.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAW,MAAM,mBAAmB,CAAC;AAGlE,iBAAiB;AACjB,eAAO,MAAM,KAAK,GAAI,OAAO,KAAK,EAAE,SAAS,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,KAAG,QAY7E,CAAC;AAEF,iBAAiB;AACjB,eAAO,MAAM,KAAK,GAAI,OAAO,KAAK,EAAE,QAAQ,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,KAAG,QAW5E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slice.d.ts","sourceRoot":"","sources":["../../../src/vm/operations/slice.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slice.d.ts","sourceRoot":"","sources":["../../../src/vm/operations/slice.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAgCxD,aAAa;AACb,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,EAAE,OAAO,KAAK,EAAE,KAAK,KAAK,KAAG,OAE/D,CAAC;AACF,sBAAsB;AACtB,eAAO,MAAM,eAAe,GAAI,OAAO,KAAK,EAAE,OAAO,KAAK,EAAE,KAAK,KAAK,KAAG,OAExE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { VmAny, VmRecord, VmConst } from '../types/index.js';
|
|
2
|
+
/** 展开记录 */
|
|
3
|
+
export declare const $RecordSpread: (record: VmAny) => VmRecord | null;
|
|
4
|
+
/** 展开数组 */
|
|
5
|
+
export declare const $ArraySpread: (array: VmAny) => Iterable<VmConst | undefined>;
|
|
6
|
+
//# sourceMappingURL=spread.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spread.d.ts","sourceRoot":"","sources":["../../../src/vm/operations/spread.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAGlE,WAAW;AACX,eAAO,MAAM,aAAa,GAAI,QAAQ,KAAK,KAAG,QAAQ,GAAG,IAuBxD,CAAC;AAEF,WAAW;AACX,eAAO,MAAM,YAAY,GAAI,OAAO,KAAK,KAAG,QAAQ,CAAC,OAAO,GAAG,SAAS,CAqBvE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/vm/operations/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/vm/operations/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAqB,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE3E;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,GAAG,KAAK,EAAE,GAAG,KAAK,KAAG,OAIzD,CAAC;AAkCF;;GAEG;AACH,eAAO,MAAM,MAAM,GAAI,GAAG,OAAO,EAAE,GAAG,OAAO,KAAG,OAwB/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../../../src/vm/types/extern/access.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAepF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { VmTypeName, VmAny, VmConst, VmPrimitive, VmValue } from '
|
|
2
|
-
import { VmWrapper } from '
|
|
1
|
+
import type { VmTypeName, VmAny, VmConst, VmPrimitive, VmValue } from '../index.js';
|
|
2
|
+
import { VmWrapper } from '../wrapper.js';
|
|
3
3
|
/** 包装 Mirascript `extern` 类型的对象 */
|
|
4
4
|
export declare class VmExtern<const T extends object = object> extends VmWrapper<T> {
|
|
5
5
|
/** 当 {@link value} 是函数时,绑定的 this 参数 */
|
|
@@ -41,4 +41,4 @@ export declare class VmExtern<const T extends object = object> extends VmWrapper
|
|
|
41
41
|
/** @inheritdoc */
|
|
42
42
|
get tag(): string;
|
|
43
43
|
}
|
|
44
|
-
//# sourceMappingURL=
|
|
44
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/vm/types/extern/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAQ1C,mCAAmC;AACnC,qBAAa,QAAQ,CAAC,KAAK,CAAC,CAAC,SAAS,MAAM,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Root":"","sources":["../../../../src/vm/types/extern/tag.ts"],"names":[],"mappings":"AAwBA,uCAAuC;AACvC,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAgC5C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Should this extern be treated as array-like?
|
|
3
|
+
*
|
|
4
|
+
* By default, this method returns true if the wrapped value is an Array or a TypedArray.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isArrayLike(value: object): value is ArrayLike<unknown>;
|
|
7
|
+
/**
|
|
8
|
+
* Get extern object keys, including inherited ones.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getKeys(value: object, includeNonEnumerable: boolean): string[];
|
|
11
|
+
/** Check toString method of the extern object */
|
|
12
|
+
export declare function hasCustomToString(value: object): boolean;
|
|
13
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/vm/types/extern/utils.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,SAAS,CAAC,OAAO,CAAC,CAEtE;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,OAAO,GAAG,MAAM,EAAE,CAiB9E;AAUD,iDAAiD;AACjD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAYxD"}
|
package/dist/vm/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { VmExtern } from './extern.js';
|
|
1
|
+
import type { VmExtern } from './extern/index.js';
|
|
2
2
|
import type { VmFunction } from './function.js';
|
|
3
3
|
import type { VmModule } from './module.js';
|
|
4
4
|
/** 类型名称 */
|
|
@@ -49,10 +49,10 @@ export interface VmValueMap {
|
|
|
49
49
|
/** Mirascript 模块 */
|
|
50
50
|
module: VmModule;
|
|
51
51
|
}
|
|
52
|
-
export { isVmAny, isVmArray, isVmArrayLikeRecord, isVmArrayLikeRecordByEntries, isVmArrayLikeRecordByKeys, isVmCallable, isVmConst, isVmContext, isVmExtern, isVmFunction, isVmImmutable, isVmModule, isVmPrimitive, isVmRecord, isVmScript, isVmValue, isVmWrapper, getVmFunctionInfo, getVmType, } from '../../helpers/types.js';
|
|
52
|
+
export { isVmAny, isVmArray, isVmArrayLikeRecord, isVmArrayLikeRecordByEntries, isVmArrayLikeRecordByKeys, isVmCallable, isVmConst, isVmContext, isVmExtern, isVmFunction, isVmImmutable, isVmModule, isVmPrimitive, isVmRecord, isVmScript, isVmValue, isVmWrapper, getVmFunctionInfo, getVmType, } from '../../helpers/types/index.js';
|
|
53
53
|
export { wrapToVmValue, unwrapFromVmValue } from './boundary.js';
|
|
54
54
|
export { type VmContext, type VmContextRecord, defineVmContextValue, createVmContext } from './context.js';
|
|
55
|
-
export { VmExtern } from './extern.js';
|
|
55
|
+
export { VmExtern } from './extern/index.js';
|
|
56
56
|
export { VmFunction, type VmFunctionInfo, type VmFunctionLike, type VmFunctionOption } from './function.js';
|
|
57
57
|
export { VmModule } from './module.js';
|
|
58
58
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vm/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vm/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,WAAW;AACX,MAAM,MAAM,UAAU,GAAG,MAAM,U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,YAAY,EACZ,aAAa,EACb,UAAU,EACV,aAAa,EACb,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,SAAS,GACZ,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEjE,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,eAAe,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3G,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirascript/mirascript",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.79",
|
|
4
4
|
"author": "CloudPSS",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "An expression based scripting language.",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@cloudpss/worker": "^0.1.11",
|
|
43
43
|
"source-map-js": "^1.2.1",
|
|
44
|
-
"supports-color": "^
|
|
45
|
-
"@mirascript/bindings": "~0.1.
|
|
46
|
-
"@mirascript/constants": "~0.1.
|
|
44
|
+
"supports-color": "^11.0.0",
|
|
45
|
+
"@mirascript/bindings": "~0.1.79",
|
|
46
|
+
"@mirascript/constants": "~0.1.79"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@types/node": "^26.1.
|
|
49
|
+
"@types/node": "^26.1.2",
|
|
50
50
|
"ava": "^8.0.1",
|
|
51
51
|
"c8": "^12.0.0",
|
|
52
|
-
"tinybench": "^6.
|
|
52
|
+
"tinybench": "^6.1.2",
|
|
53
53
|
"type-fest": "^5.8.0"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
@@ -20,7 +20,7 @@ const FAST_SCRIPT_MAX_LEN = 32;
|
|
|
20
20
|
|
|
21
21
|
/** 生成安全的 JS 字符串 */
|
|
22
22
|
function safeStringify(value: string): string {
|
|
23
|
-
return JSON.stringify(value).replaceAll(/[<>&\
|
|
23
|
+
return JSON.stringify(value).replaceAll(/[<>&\u{2028}\u{2029}/]/gu, (c) => {
|
|
24
24
|
return String.raw`\u${c.codePointAt(0)?.toString(16).padStart(4, '0')}`;
|
|
25
25
|
});
|
|
26
26
|
}
|
|
@@ -227,8 +227,8 @@ export function formatDiagnostics(
|
|
|
227
227
|
const messages: string[] = [];
|
|
228
228
|
for (const diagnostic of diagnostics) {
|
|
229
229
|
const range = formatRange(diagnostic.range);
|
|
230
|
-
const codeName = DiagnosticCode[diagnostic.code] || `Unknown
|
|
231
|
-
let message = getDiagnosticMessage(diagnostic.code)
|
|
230
|
+
const codeName = DiagnosticCode[diagnostic.code] || `Unknown`;
|
|
231
|
+
let message = getDiagnosticMessage(diagnostic.code) || `Unknown diagnostic code: ${diagnostic.code}`;
|
|
232
232
|
for (const ref of diagnostic.references) {
|
|
233
233
|
const refRange = formatRange(ref.range);
|
|
234
234
|
message += `\n (${refRange}): ${getDiagnosticMessage(ref.code)}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const SCRIPT_PREFIX = `((global) => { global ??= $GlobalFallback(); try { $CpEnter();`;
|
|
1
|
+
export const SCRIPT_PREFIX = `((/** @type {VmContext} */global) => { global ??= $GlobalFallback(); try { $CpEnter();`;
|
|
2
2
|
export const SCRIPT_PREFIX_NO_GLOBAL = `(() => { try { $CpEnter();`;
|
|
3
3
|
/** 脚本前缀类型 */
|
|
4
4
|
export type ScriptPrefix = typeof SCRIPT_PREFIX | typeof SCRIPT_PREFIX_NO_GLOBAL;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OpCode } from '@mirascript/constants';
|
|
2
|
-
import { toString } from '../../helpers/convert/
|
|
2
|
+
import { toString } from '../../helpers/convert/index.js';
|
|
3
3
|
import type { VmPrimitive } from '../../vm/index.js';
|
|
4
4
|
import type { ScriptInput, TranspileOptions } from '../types.js';
|
|
5
5
|
import type { IRange } from '../diagnostic.js';
|
|
@@ -174,12 +174,6 @@ export class Emitter {
|
|
|
174
174
|
this.codeLines.push(body);
|
|
175
175
|
break;
|
|
176
176
|
}
|
|
177
|
-
if (opcode === OpCode.ElIf) {
|
|
178
|
-
this.codeOffset++;
|
|
179
|
-
const body = this.ident(-1) + `} else `;
|
|
180
|
-
this.codeLines.push(body);
|
|
181
|
-
return this.readCode();
|
|
182
|
-
}
|
|
183
177
|
this.readCode();
|
|
184
178
|
}
|
|
185
179
|
return this.readBlockEnd(OpCode.IfEnd);
|
|
@@ -20,7 +20,7 @@ const { SOURCE_URL, SOURCE_MAPPING_URL } = ((source, mapping, url) => {
|
|
|
20
20
|
const SOURCE_OFFSET = 4;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* Node.js Buffer
|
|
23
|
+
* Node.js Buffer 类型的简易声明,浏览器调试环境下会直接加载此文件
|
|
24
24
|
*/
|
|
25
25
|
declare class Buffer {
|
|
26
26
|
/** @inheritdoc */
|
|
@@ -8,6 +8,7 @@ import { DiagnosticCode, formatDiagnostics, parseDiagnostics } from './diagnosti
|
|
|
8
8
|
export class CompileError extends Error {
|
|
9
9
|
constructor(
|
|
10
10
|
source: ScriptInput,
|
|
11
|
+
// eslint-disable-next-line unicorn/custom-error-definition
|
|
11
12
|
diagnostics: Uint32Array,
|
|
12
13
|
readonly fileName: string | undefined,
|
|
13
14
|
) {
|
|
@@ -4,7 +4,7 @@ import { display } from '../serialize.js';
|
|
|
4
4
|
|
|
5
5
|
/** 转换为 boolean */
|
|
6
6
|
export function toBoolean<F = undefined>(value: VmAny, fallback?: F): boolean | Exclude<F, undefined> {
|
|
7
|
-
if (typeof value
|
|
7
|
+
if (typeof value == 'boolean') return value;
|
|
8
8
|
if (fallback === undefined) {
|
|
9
9
|
throw new VmError(`Failed to convert value to boolean: ${display(value)}`, false);
|
|
10
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { toNumber } from './
|
|
2
|
-
export { toString } from './
|
|
3
|
-
export { toFormat } from './
|
|
4
|
-
export { toBoolean } from './
|
|
1
|
+
export { toNumber } from './number.js';
|
|
2
|
+
export { toString } from './string.js';
|
|
3
|
+
export { toFormat } from './format.js';
|
|
4
|
+
export { toBoolean } from './boolean.js';
|
|
@@ -1,35 +1,24 @@
|
|
|
1
1
|
import type { VmAny } from '../../vm/index.js';
|
|
2
2
|
import { VmError } from '../error.js';
|
|
3
3
|
import { display } from '../serialize.js';
|
|
4
|
-
import {
|
|
4
|
+
import { NegativeInfinity, NotNumber, PositiveInfinity } from '../utils.js';
|
|
5
|
+
|
|
6
|
+
const parseInt = (value: string, radix: number): number => Number.parseInt(value.slice(2), radix);
|
|
5
7
|
|
|
6
8
|
/** 将字符串转换为数字 */
|
|
7
9
|
function parseNumericLiteral(value: string): number | null {
|
|
8
|
-
if (value === '') return null;
|
|
9
10
|
const ch0 = value.charAt(0);
|
|
10
|
-
if (ch0 < '0' || ch0 > '9')
|
|
11
|
-
|
|
12
|
-
}
|
|
11
|
+
if (ch0 < '0' || ch0 > '9') return null;
|
|
12
|
+
|
|
13
13
|
// 二进制
|
|
14
|
-
if (/^0[bB][01]+$/.test(value))
|
|
15
|
-
const num = Number.parseInt(value.slice(2), 2);
|
|
16
|
-
return isNaN(num) ? null : num;
|
|
17
|
-
}
|
|
14
|
+
if (/^0[bB][01]+$/.test(value)) return parseInt(value, 2);
|
|
18
15
|
// 八进制
|
|
19
|
-
if (/^0[oO][0-7]+$/.test(value))
|
|
20
|
-
const num = Number.parseInt(value.slice(2), 8);
|
|
21
|
-
return isNaN(num) ? null : num;
|
|
22
|
-
}
|
|
16
|
+
if (/^0[oO][0-7]+$/.test(value)) return parseInt(value, 8);
|
|
23
17
|
// 十六进制
|
|
24
|
-
if (/^0[xX][0-9a-fA-F]+$/.test(value))
|
|
25
|
-
const num = Number.parseInt(value.slice(2), 16);
|
|
26
|
-
return isNaN(num) ? null : num;
|
|
27
|
-
}
|
|
18
|
+
if (/^0[xX][0-9a-fA-F]+$/.test(value)) return parseInt(value, 16);
|
|
28
19
|
// 十进制/科学计数法
|
|
29
|
-
if (/^[0-9]+(\.[0-9]+)?([eE][+-]?[0-9]+)?$/.test(value))
|
|
30
|
-
|
|
31
|
-
return isNaN(num) ? null : num;
|
|
32
|
-
}
|
|
20
|
+
if (/^[0-9]+(\.[0-9]+)?([eE][+-]?[0-9]+)?$/.test(value)) return Number.parseFloat(value);
|
|
21
|
+
|
|
33
22
|
return null;
|
|
34
23
|
}
|
|
35
24
|
|
|
@@ -37,18 +26,13 @@ function parseNumericLiteral(value: string): number | null {
|
|
|
37
26
|
function stringToNumber(value: string): number | null {
|
|
38
27
|
value = value.trim();
|
|
39
28
|
if (value === '') return null;
|
|
40
|
-
if (value === 'inf' || value === '+inf' || value === 'Infinity' || value === '+Infinity')
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return NegativeInfinity;
|
|
45
|
-
}
|
|
46
|
-
if (value === 'nan' || value === 'NaN') {
|
|
47
|
-
return NotNumber;
|
|
48
|
-
}
|
|
29
|
+
if (value === 'inf' || value === '+inf' || value === 'Infinity' || value === '+Infinity') return PositiveInfinity;
|
|
30
|
+
if (value === '-inf' || value === '-Infinity') return NegativeInfinity;
|
|
31
|
+
if (value === 'nan' || value === 'NaN') return NotNumber;
|
|
32
|
+
|
|
49
33
|
if (value.startsWith('-')) {
|
|
50
34
|
const num = parseNumericLiteral(value.slice(1));
|
|
51
|
-
if (num
|
|
35
|
+
if (num != null) return -num;
|
|
52
36
|
return null;
|
|
53
37
|
} else if (value.startsWith('+')) {
|
|
54
38
|
return parseNumericLiteral(value.slice(1));
|
|
@@ -59,7 +43,7 @@ function stringToNumber(value: string): number | null {
|
|
|
59
43
|
|
|
60
44
|
/** 转换为 number */
|
|
61
45
|
export function toNumber<F = undefined>(value: VmAny, fallback?: F): number | Exclude<F, undefined> {
|
|
62
|
-
if (typeof value
|
|
46
|
+
if (typeof value == 'number') return value;
|
|
63
47
|
if (typeof value == 'boolean') return value ? 1 : 0;
|
|
64
48
|
if (typeof value == 'string') {
|
|
65
49
|
const num = stringToNumber(value);
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import type { VmAny, VmRecord } from '../../vm/index.js';
|
|
2
|
-
import { isVmArray, isVmWrapper } from '../types.js';
|
|
2
|
+
import { isVmArray, isVmWrapper } from '../types/index.js';
|
|
3
3
|
import { VmError } from '../error.js';
|
|
4
4
|
import { display, displayFunction } from '../serialize.js';
|
|
5
5
|
import { keys, isNaN } from '../utils.js';
|
|
6
6
|
|
|
7
7
|
/** 转换为 string */
|
|
8
|
-
function numberToString(value: number): string {
|
|
8
|
+
export function numberToString(value: number, minusZero: boolean): string {
|
|
9
9
|
if (isNaN(value)) return 'nan';
|
|
10
10
|
if (value === Infinity) return 'inf';
|
|
11
11
|
if (value === -Infinity) return '-inf';
|
|
12
|
+
if (minusZero && value === 0 && 1 / value < 0) return '-0';
|
|
12
13
|
return String(value);
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
/** 转换为 string */
|
|
16
17
|
export function innerToString(value: VmAny, useBraces: boolean): string {
|
|
17
18
|
if (value == null) return 'nil';
|
|
18
|
-
if (typeof value == 'number') return numberToString(value);
|
|
19
|
+
if (typeof value == 'number') return numberToString(value, false);
|
|
19
20
|
if (typeof value == 'string' || typeof value == 'boolean') return String(value);
|
|
20
21
|
if (typeof value == 'function') return displayFunction(value);
|
|
21
22
|
if (isVmWrapper(value)) return value.toString(useBraces);
|
|
@@ -40,7 +41,7 @@ export function innerToString(value: VmAny, useBraces: boolean): string {
|
|
|
40
41
|
|
|
41
42
|
/** 转换为 string */
|
|
42
43
|
export function toString<F = undefined>(value: VmAny, fallback?: F): string | Exclude<F, undefined> {
|
|
43
|
-
if (typeof value
|
|
44
|
+
if (typeof value == 'string') return value;
|
|
44
45
|
if (value == null) return '';
|
|
45
46
|
try {
|
|
46
47
|
return innerToString(value, false);
|