@mirascript/wasm 0.1.3 → 0.1.5
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/lib/wasm.d.ts +11 -10
- package/lib/wasm.js +42 -40
- package/lib/wasm_bg.wasm +0 -0
- package/lib/wasm_bg.wasm.d.ts +4 -4
- package/package.json +3 -5
- package/src/index.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as wasm from '../lib/wasm.js';
|
|
2
2
|
export * from './types.js';
|
|
3
3
|
export { wasm };
|
|
4
|
-
export const ready = import('
|
|
4
|
+
export const ready = import('@mirascript/wasm/loader').then(async ({ module }) => wasm.default({
|
|
5
5
|
module_or_path: await module,
|
|
6
6
|
}));
|
|
7
7
|
/** 创建可重用的配置 */
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAGvC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAE,CAAC;AAEhB,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAGvC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAE,CAAC;AAEhB,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAC7E,IAAI,CAAC,OAAO,CAAC;IACT,cAAc,EAAE,MAAM,MAAM;CAC/B,CAAC,CACL,CAAC;AAEF,eAAe;AACf,MAAM,UAAU,YAAY,CAAC,MAA6B;IACtD,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;IACtC,IAAI,MAAM,YAAY,IAAI,CAAC,MAAM;QAAE,OAAO,MAAM,CAAC;IACjD,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;IAC9B,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACvB,IAAI,GAAG,KAAK,MAAM;YAAE,SAAS,CAAC,aAAa;QAC3C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;YAAE,SAAS;QAC1C,IAAI,KAAK,GAAG,MAAM,CAAC,GAAmB,CAAU,CAAC;QACjD,IAAI,GAAG,KAAK,YAAY,EAAE,CAAC;YACvB,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAkB,CAAmC,CAAC;QACjF,CAAC;QACD,IAAI,GAAG,KAAK,8BAA8B,EAAE,CAAC;YACzC,KAAK,GAAG,IAAI,CAAC,0BAA0B,CACnC,KAAmC,CACa,CAAC;QACzD,CAAC;QACD,IAAI,KAAK,KAAK,SAAS;YAAE,SAAS;QAClC,IAAI,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC;YAAE,SAAS;QAC5B,GAAG,CAAC,GAAmB,CAAC,GAAG,KAAK,CAAC;IACrC,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAUD,SAAS;AACT,SAAS,WAAW,CAChB,QAAgE,EAChE,MAAS,EACT,MAA4B;IAE5B,MAAM,GAAG,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACjC,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,IAAI,CAAC;QACD,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;QACzC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;QAC7B,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;IAClC,CAAC;YAAS,CAAC;QACP,MAAM,CAAC,IAAI,EAAE,CAAC;QACd,oBAAoB;QACpB,IAAI,GAAG,KAAK,MAAM,EAAE,CAAC;YACjB,GAAG,CAAC,IAAI,EAAE,CAAC;QACf,CAAC;IACL,CAAC;AACL,CAAC;AAED,uBAAuB;AACvB,MAAM,UAAU,WAAW,CAAC,MAAmB,EAAE,MAA4B;IACzE,OAAO,OAAO,MAAM,IAAI,QAAQ;QAC5B,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;QAC3C,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC3D,CAAC"}
|
package/lib/wasm.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export function main(): void;
|
|
4
|
-
export function compile(script: string, config: Config): CompileResult;
|
|
5
4
|
export function compile_buffer(script: Uint8Array, config: Config): CompileResult;
|
|
6
|
-
export function
|
|
7
|
-
export function keywords(): string[];
|
|
8
|
-
export function numeric_keywords(): string[];
|
|
5
|
+
export function compile(script: string, config: Config): CompileResult;
|
|
9
6
|
export function constant_keywords(): string[];
|
|
7
|
+
export function numeric_keywords(): string[];
|
|
8
|
+
export function reserved_keywords(): string[];
|
|
10
9
|
export function control_keywords(): string[];
|
|
10
|
+
export function keywords(): string[];
|
|
11
11
|
export function get_diagnostic_message(code: DiagnosticCode): string | undefined;
|
|
12
12
|
export enum DiagnosticCode {
|
|
13
13
|
ErrorStart = 1000,
|
|
@@ -172,6 +172,7 @@ export enum DiagnosticCode {
|
|
|
172
172
|
*/
|
|
173
173
|
OmitNamedRecordFieldName = 11023,
|
|
174
174
|
TagRefEnd = 11999,
|
|
175
|
+
SourceMap = 12000,
|
|
175
176
|
}
|
|
176
177
|
/**
|
|
177
178
|
* Encoding for counting positions in diagnostics.
|
|
@@ -715,7 +716,6 @@ export class Config {
|
|
|
715
716
|
free(): void;
|
|
716
717
|
[Symbol.dispose](): void;
|
|
717
718
|
constructor();
|
|
718
|
-
track_references: boolean;
|
|
719
719
|
trivia: boolean;
|
|
720
720
|
input_mode: InputMode;
|
|
721
721
|
diagnostic_position_encoding: DiagnosticPositionEncoding;
|
|
@@ -724,7 +724,8 @@ export class Config {
|
|
|
724
724
|
diagnostic_info: boolean;
|
|
725
725
|
diagnostic_hint: boolean;
|
|
726
726
|
diagnostic_reference: boolean;
|
|
727
|
-
|
|
727
|
+
diagnostic_tag: boolean;
|
|
728
|
+
diagnostic_sourcemap: boolean;
|
|
728
729
|
}
|
|
729
730
|
export class MonacoCompiler {
|
|
730
731
|
free(): void;
|
|
@@ -762,22 +763,22 @@ export interface InitOutput {
|
|
|
762
763
|
readonly __wbg_get_config_diagnostic_error: (a: number) => number;
|
|
763
764
|
readonly __wbg_get_config_diagnostic_hint: (a: number) => number;
|
|
764
765
|
readonly __wbg_get_config_diagnostic_info: (a: number) => number;
|
|
765
|
-
readonly __wbg_get_config_diagnostic_other: (a: number) => number;
|
|
766
766
|
readonly __wbg_get_config_diagnostic_position_encoding: (a: number) => number;
|
|
767
767
|
readonly __wbg_get_config_diagnostic_reference: (a: number) => number;
|
|
768
|
+
readonly __wbg_get_config_diagnostic_sourcemap: (a: number) => number;
|
|
769
|
+
readonly __wbg_get_config_diagnostic_tag: (a: number) => number;
|
|
768
770
|
readonly __wbg_get_config_diagnostic_warning: (a: number) => number;
|
|
769
771
|
readonly __wbg_get_config_input_mode: (a: number) => number;
|
|
770
|
-
readonly __wbg_get_config_track_references: (a: number) => number;
|
|
771
772
|
readonly __wbg_get_config_trivia: (a: number) => number;
|
|
772
773
|
readonly __wbg_set_config_diagnostic_error: (a: number, b: number) => void;
|
|
773
774
|
readonly __wbg_set_config_diagnostic_hint: (a: number, b: number) => void;
|
|
774
775
|
readonly __wbg_set_config_diagnostic_info: (a: number, b: number) => void;
|
|
775
|
-
readonly __wbg_set_config_diagnostic_other: (a: number, b: number) => void;
|
|
776
776
|
readonly __wbg_set_config_diagnostic_position_encoding: (a: number, b: number) => void;
|
|
777
777
|
readonly __wbg_set_config_diagnostic_reference: (a: number, b: number) => void;
|
|
778
|
+
readonly __wbg_set_config_diagnostic_sourcemap: (a: number, b: number) => void;
|
|
779
|
+
readonly __wbg_set_config_diagnostic_tag: (a: number, b: number) => void;
|
|
778
780
|
readonly __wbg_set_config_diagnostic_warning: (a: number, b: number) => void;
|
|
779
781
|
readonly __wbg_set_config_input_mode: (a: number, b: number) => void;
|
|
780
|
-
readonly __wbg_set_config_track_references: (a: number, b: number) => void;
|
|
781
782
|
readonly __wbg_set_config_trivia: (a: number, b: number) => void;
|
|
782
783
|
readonly config_new: () => number;
|
|
783
784
|
readonly __wbindgen_export: (a: number, b: number, c: number) => void;
|
package/lib/wasm.js
CHANGED
|
@@ -150,18 +150,6 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
150
150
|
ptr = ptr >>> 0;
|
|
151
151
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
152
152
|
}
|
|
153
|
-
/**
|
|
154
|
-
* @param {string} script
|
|
155
|
-
* @param {Config} config
|
|
156
|
-
* @returns {CompileResult}
|
|
157
|
-
*/
|
|
158
|
-
export function compile(script, config) {
|
|
159
|
-
const ptr0 = passStringToWasm0(script, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
|
|
160
|
-
const len0 = WASM_VECTOR_LEN;
|
|
161
|
-
_assertClass(config, Config);
|
|
162
|
-
const ret = wasm.compile(ptr0, len0, config.__wbg_ptr);
|
|
163
|
-
return CompileResult.__wrap(ret);
|
|
164
|
-
}
|
|
165
153
|
|
|
166
154
|
function passArray8ToWasm0(arg, malloc) {
|
|
167
155
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
@@ -182,6 +170,19 @@ export function compile_buffer(script, config) {
|
|
|
182
170
|
return CompileResult.__wrap(ret);
|
|
183
171
|
}
|
|
184
172
|
|
|
173
|
+
/**
|
|
174
|
+
* @param {string} script
|
|
175
|
+
* @param {Config} config
|
|
176
|
+
* @returns {CompileResult}
|
|
177
|
+
*/
|
|
178
|
+
export function compile(script, config) {
|
|
179
|
+
const ptr0 = passStringToWasm0(script, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
|
|
180
|
+
const len0 = WASM_VECTOR_LEN;
|
|
181
|
+
_assertClass(config, Config);
|
|
182
|
+
const ret = wasm.compile(ptr0, len0, config.__wbg_ptr);
|
|
183
|
+
return CompileResult.__wrap(ret);
|
|
184
|
+
}
|
|
185
|
+
|
|
185
186
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
186
187
|
ptr = ptr >>> 0;
|
|
187
188
|
const mem = getDataViewMemory0();
|
|
@@ -194,10 +195,10 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
194
195
|
/**
|
|
195
196
|
* @returns {string[]}
|
|
196
197
|
*/
|
|
197
|
-
export function
|
|
198
|
+
export function constant_keywords() {
|
|
198
199
|
try {
|
|
199
200
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
200
|
-
wasm.
|
|
201
|
+
wasm.constant_keywords(retptr);
|
|
201
202
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
202
203
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
203
204
|
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
@@ -211,10 +212,10 @@ export function reserved_keywords() {
|
|
|
211
212
|
/**
|
|
212
213
|
* @returns {string[]}
|
|
213
214
|
*/
|
|
214
|
-
export function
|
|
215
|
+
export function numeric_keywords() {
|
|
215
216
|
try {
|
|
216
217
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
217
|
-
wasm.
|
|
218
|
+
wasm.numeric_keywords(retptr);
|
|
218
219
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
219
220
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
220
221
|
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
@@ -228,10 +229,10 @@ export function keywords() {
|
|
|
228
229
|
/**
|
|
229
230
|
* @returns {string[]}
|
|
230
231
|
*/
|
|
231
|
-
export function
|
|
232
|
+
export function reserved_keywords() {
|
|
232
233
|
try {
|
|
233
234
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
234
|
-
wasm.
|
|
235
|
+
wasm.reserved_keywords(retptr);
|
|
235
236
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
236
237
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
237
238
|
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
@@ -245,10 +246,10 @@ export function numeric_keywords() {
|
|
|
245
246
|
/**
|
|
246
247
|
* @returns {string[]}
|
|
247
248
|
*/
|
|
248
|
-
export function
|
|
249
|
+
export function control_keywords() {
|
|
249
250
|
try {
|
|
250
251
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
251
|
-
wasm.
|
|
252
|
+
wasm.control_keywords(retptr);
|
|
252
253
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
253
254
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
254
255
|
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
@@ -262,10 +263,10 @@ export function constant_keywords() {
|
|
|
262
263
|
/**
|
|
263
264
|
* @returns {string[]}
|
|
264
265
|
*/
|
|
265
|
-
export function
|
|
266
|
+
export function keywords() {
|
|
266
267
|
try {
|
|
267
268
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
268
|
-
wasm.
|
|
269
|
+
wasm.keywords(retptr);
|
|
269
270
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
270
271
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
271
272
|
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
@@ -298,7 +299,7 @@ export function get_diagnostic_message(code) {
|
|
|
298
299
|
}
|
|
299
300
|
|
|
300
301
|
/**
|
|
301
|
-
* @enum {1000 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | 1008 | 1009 | 1010 | 1011 | 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | 1051 | 1052 | 1053 | 1054 | 1055 | 1056 | 1057 | 1058 | 1059 | 1060 | 1061 | 1062 | 1063 | 1064 | 1065 | 1066 | 1067 | 1068 | 1999 | 2000 | 2001 | 2002 | 2003 | 2004 | 2999 | 3000 | 3999 | 4000 | 4001 | 4002 | 4999 | 5000 | 5001 | 5002 | 5003 | 5004 | 5005 | 5006 | 5999 | 10000 | 10001 | 10002 | 10003 | 10004 | 10005 | 10006 | 10007 | 10008 | 10009 | 10010 | 10011 | 10012 | 10013 | 10014 | 10015 | 10016 | 10017 | 10018 | 10019 | 10020 | 10021 | 10022 | 10023 | 10024 | 10025 | 10026 | 10027 | 10028 | 10029 | 10030 | 10031 | 10032 | 10033 | 10034 | 10035 | 10036 | 10037 | 10038 | 10039 | 10040 | 10041 | 10042 | 10999 | 11000 | 11001 | 11002 | 11003 | 11004 | 11005 | 11006 | 11007 | 11008 | 11009 | 11010 | 11011 | 11012 | 11013 | 11014 | 11015 | 11016 | 11017 | 11018 | 11019 | 11020 | 11021 | 11022 | 11023 | 11999}
|
|
302
|
+
* @enum {1000 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | 1008 | 1009 | 1010 | 1011 | 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | 1051 | 1052 | 1053 | 1054 | 1055 | 1056 | 1057 | 1058 | 1059 | 1060 | 1061 | 1062 | 1063 | 1064 | 1065 | 1066 | 1067 | 1068 | 1999 | 2000 | 2001 | 2002 | 2003 | 2004 | 2999 | 3000 | 3999 | 4000 | 4001 | 4002 | 4999 | 5000 | 5001 | 5002 | 5003 | 5004 | 5005 | 5006 | 5999 | 10000 | 10001 | 10002 | 10003 | 10004 | 10005 | 10006 | 10007 | 10008 | 10009 | 10010 | 10011 | 10012 | 10013 | 10014 | 10015 | 10016 | 10017 | 10018 | 10019 | 10020 | 10021 | 10022 | 10023 | 10024 | 10025 | 10026 | 10027 | 10028 | 10029 | 10030 | 10031 | 10032 | 10033 | 10034 | 10035 | 10036 | 10037 | 10038 | 10039 | 10040 | 10041 | 10042 | 10999 | 11000 | 11001 | 11002 | 11003 | 11004 | 11005 | 11006 | 11007 | 11008 | 11009 | 11010 | 11011 | 11012 | 11013 | 11014 | 11015 | 11016 | 11017 | 11018 | 11019 | 11020 | 11021 | 11022 | 11023 | 11999 | 12000}
|
|
302
303
|
*/
|
|
303
304
|
export const DiagnosticCode = Object.freeze({
|
|
304
305
|
ErrorStart: 1000, "1000": "ErrorStart",
|
|
@@ -463,6 +464,7 @@ export const DiagnosticCode = Object.freeze({
|
|
|
463
464
|
*/
|
|
464
465
|
OmitNamedRecordFieldName: 11023, "11023": "OmitNamedRecordFieldName",
|
|
465
466
|
TagRefEnd: 11999, "11999": "TagRefEnd",
|
|
467
|
+
SourceMap: 12000, "12000": "SourceMap",
|
|
466
468
|
});
|
|
467
469
|
/**
|
|
468
470
|
* Encoding for counting positions in diagnostics.
|
|
@@ -1081,19 +1083,6 @@ export class Config {
|
|
|
1081
1083
|
const ptr = this.__destroy_into_raw();
|
|
1082
1084
|
wasm.__wbg_config_free(ptr, 0);
|
|
1083
1085
|
}
|
|
1084
|
-
/**
|
|
1085
|
-
* @returns {boolean}
|
|
1086
|
-
*/
|
|
1087
|
-
get track_references() {
|
|
1088
|
-
const ret = wasm.__wbg_get_config_track_references(this.__wbg_ptr);
|
|
1089
|
-
return ret !== 0;
|
|
1090
|
-
}
|
|
1091
|
-
/**
|
|
1092
|
-
* @param {boolean} arg0
|
|
1093
|
-
*/
|
|
1094
|
-
set track_references(arg0) {
|
|
1095
|
-
wasm.__wbg_set_config_track_references(this.__wbg_ptr, arg0);
|
|
1096
|
-
}
|
|
1097
1086
|
/**
|
|
1098
1087
|
* @returns {boolean}
|
|
1099
1088
|
*/
|
|
@@ -1201,15 +1190,28 @@ export class Config {
|
|
|
1201
1190
|
/**
|
|
1202
1191
|
* @returns {boolean}
|
|
1203
1192
|
*/
|
|
1204
|
-
get
|
|
1205
|
-
const ret = wasm.
|
|
1193
|
+
get diagnostic_tag() {
|
|
1194
|
+
const ret = wasm.__wbg_get_config_diagnostic_tag(this.__wbg_ptr);
|
|
1195
|
+
return ret !== 0;
|
|
1196
|
+
}
|
|
1197
|
+
/**
|
|
1198
|
+
* @param {boolean} arg0
|
|
1199
|
+
*/
|
|
1200
|
+
set diagnostic_tag(arg0) {
|
|
1201
|
+
wasm.__wbg_set_config_diagnostic_tag(this.__wbg_ptr, arg0);
|
|
1202
|
+
}
|
|
1203
|
+
/**
|
|
1204
|
+
* @returns {boolean}
|
|
1205
|
+
*/
|
|
1206
|
+
get diagnostic_sourcemap() {
|
|
1207
|
+
const ret = wasm.__wbg_get_config_diagnostic_sourcemap(this.__wbg_ptr);
|
|
1206
1208
|
return ret !== 0;
|
|
1207
1209
|
}
|
|
1208
1210
|
/**
|
|
1209
1211
|
* @param {boolean} arg0
|
|
1210
1212
|
*/
|
|
1211
|
-
set
|
|
1212
|
-
wasm.
|
|
1213
|
+
set diagnostic_sourcemap(arg0) {
|
|
1214
|
+
wasm.__wbg_set_config_diagnostic_sourcemap(this.__wbg_ptr, arg0);
|
|
1213
1215
|
}
|
|
1214
1216
|
constructor() {
|
|
1215
1217
|
const ret = wasm.config_new();
|
package/lib/wasm_bg.wasm
CHANGED
|
Binary file
|
package/lib/wasm_bg.wasm.d.ts
CHANGED
|
@@ -23,22 +23,22 @@ export const __wbg_config_free: (a: number, b: number) => void;
|
|
|
23
23
|
export const __wbg_get_config_diagnostic_error: (a: number) => number;
|
|
24
24
|
export const __wbg_get_config_diagnostic_hint: (a: number) => number;
|
|
25
25
|
export const __wbg_get_config_diagnostic_info: (a: number) => number;
|
|
26
|
-
export const __wbg_get_config_diagnostic_other: (a: number) => number;
|
|
27
26
|
export const __wbg_get_config_diagnostic_position_encoding: (a: number) => number;
|
|
28
27
|
export const __wbg_get_config_diagnostic_reference: (a: number) => number;
|
|
28
|
+
export const __wbg_get_config_diagnostic_sourcemap: (a: number) => number;
|
|
29
|
+
export const __wbg_get_config_diagnostic_tag: (a: number) => number;
|
|
29
30
|
export const __wbg_get_config_diagnostic_warning: (a: number) => number;
|
|
30
31
|
export const __wbg_get_config_input_mode: (a: number) => number;
|
|
31
|
-
export const __wbg_get_config_track_references: (a: number) => number;
|
|
32
32
|
export const __wbg_get_config_trivia: (a: number) => number;
|
|
33
33
|
export const __wbg_set_config_diagnostic_error: (a: number, b: number) => void;
|
|
34
34
|
export const __wbg_set_config_diagnostic_hint: (a: number, b: number) => void;
|
|
35
35
|
export const __wbg_set_config_diagnostic_info: (a: number, b: number) => void;
|
|
36
|
-
export const __wbg_set_config_diagnostic_other: (a: number, b: number) => void;
|
|
37
36
|
export const __wbg_set_config_diagnostic_position_encoding: (a: number, b: number) => void;
|
|
38
37
|
export const __wbg_set_config_diagnostic_reference: (a: number, b: number) => void;
|
|
38
|
+
export const __wbg_set_config_diagnostic_sourcemap: (a: number, b: number) => void;
|
|
39
|
+
export const __wbg_set_config_diagnostic_tag: (a: number, b: number) => void;
|
|
39
40
|
export const __wbg_set_config_diagnostic_warning: (a: number, b: number) => void;
|
|
40
41
|
export const __wbg_set_config_input_mode: (a: number, b: number) => void;
|
|
41
|
-
export const __wbg_set_config_track_references: (a: number, b: number) => void;
|
|
42
42
|
export const __wbg_set_config_trivia: (a: number, b: number) => void;
|
|
43
43
|
export const config_new: () => number;
|
|
44
44
|
export const __wbindgen_export: (a: number, b: number, c: number) => void;
|
package/package.json
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirascript/wasm",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MiraScript compiler for WebAssembly",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": "./dist/index.js",
|
|
10
|
-
"./types": "./dist/types.js"
|
|
11
|
-
|
|
12
|
-
"imports": {
|
|
13
|
-
"#loader": {
|
|
10
|
+
"./types": "./dist/types.js",
|
|
11
|
+
"./loader": {
|
|
14
12
|
"node": "./dist/loader/node.js",
|
|
15
13
|
"default": "./dist/loader/web.js"
|
|
16
14
|
}
|
package/src/index.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { Config, InputMode, DiagnosticPositionEncoding, ScriptInput } from
|
|
|
4
4
|
export * from './types.js';
|
|
5
5
|
export { wasm };
|
|
6
6
|
|
|
7
|
-
export const ready = import('
|
|
7
|
+
export const ready = import('@mirascript/wasm/loader').then(async ({ module }) =>
|
|
8
8
|
wasm.default({
|
|
9
9
|
module_or_path: await module,
|
|
10
10
|
}),
|