@parsanol/wasm 1.5.12 → 1.5.13
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/parsanol.d.ts +7 -0
- package/parsanol.js +36 -0
- package/parsanol_bg.wasm +0 -0
- package/parsanol_bg.wasm.d.ts +1 -0
package/package.json
CHANGED
package/parsanol.d.ts
CHANGED
|
@@ -65,6 +65,12 @@ export class PargArtifactJs {
|
|
|
65
65
|
* `{"ok": false, "captures": ..., "error": ..., "consumed_upto"}`.
|
|
66
66
|
*/
|
|
67
67
|
parseShapeRecovering(entry: string, input: string): string;
|
|
68
|
+
/**
|
|
69
|
+
* Explicit finite VM atom-depth budget (1..=8192), local to this call.
|
|
70
|
+
* The default API keeps its 1024-call WASM guard. This does not change the
|
|
71
|
+
* rule-recursion or shape-JSON budgets, nor guarantee a host stack size.
|
|
72
|
+
*/
|
|
73
|
+
parseShapeWithCallDepth(entry: string, input: string, compatibility: string, reporter: string, max_call_depth: number): string;
|
|
68
74
|
/**
|
|
69
75
|
* Explicit compatibility without changing parseShape defaults.
|
|
70
76
|
* The JSON envelope contains either shape or causal error diagnostics;
|
|
@@ -212,6 +218,7 @@ export interface InitOutput {
|
|
|
212
218
|
readonly pargartifactjs_parseAndBind: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
213
219
|
readonly pargartifactjs_parseShape: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
214
220
|
readonly pargartifactjs_parseShapeRecovering: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
221
|
+
readonly pargartifactjs_parseShapeWithCallDepth: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
|
|
215
222
|
readonly pargartifactjs_parseShapeWithCompatibility: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
216
223
|
readonly pargartifactjs_parseShapeWithReporter: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
217
224
|
readonly pargartifactjs_runTests: (a: number) => [number, number, number];
|
package/parsanol.js
CHANGED
|
@@ -198,6 +198,42 @@ export class PargArtifactJs {
|
|
|
198
198
|
}
|
|
199
199
|
return takeFromExternrefTable0(ret[0]);
|
|
200
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* Explicit finite VM atom-depth budget (1..=8192), local to this call.
|
|
203
|
+
* The default API keeps its 1024-call WASM guard. This does not change the
|
|
204
|
+
* rule-recursion or shape-JSON budgets, nor guarantee a host stack size.
|
|
205
|
+
* @param {string} entry
|
|
206
|
+
* @param {string} input
|
|
207
|
+
* @param {string} compatibility
|
|
208
|
+
* @param {string} reporter
|
|
209
|
+
* @param {number} max_call_depth
|
|
210
|
+
* @returns {string}
|
|
211
|
+
*/
|
|
212
|
+
parseShapeWithCallDepth(entry, input, compatibility, reporter, max_call_depth) {
|
|
213
|
+
const val5 = +max_call_depth;
|
|
214
|
+
let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
|
|
215
|
+
try {
|
|
216
|
+
ptr0 = passStringToWasm0(entry, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
217
|
+
len0 = WASM_VECTOR_LEN;
|
|
218
|
+
ptr1 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
219
|
+
len1 = WASM_VECTOR_LEN;
|
|
220
|
+
ptr2 = passStringToWasm0(compatibility, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
221
|
+
len2 = WASM_VECTOR_LEN;
|
|
222
|
+
ptr3 = passStringToWasm0(reporter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
223
|
+
len3 = WASM_VECTOR_LEN;
|
|
224
|
+
} catch (e) {
|
|
225
|
+
if (ptr3) { wasm.__wbindgen_free(ptr3, len3 * 1, 1); }
|
|
226
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
227
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
228
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
229
|
+
throw e;
|
|
230
|
+
}
|
|
231
|
+
const ret = wasm.pargartifactjs_parseShapeWithCallDepth(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, val5);
|
|
232
|
+
if (ret[2]) {
|
|
233
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
234
|
+
}
|
|
235
|
+
return takeFromExternrefTable0(ret[0]);
|
|
236
|
+
}
|
|
201
237
|
/**
|
|
202
238
|
* Explicit compatibility without changing parseShape defaults.
|
|
203
239
|
* The JSON envelope contains either shape or causal error diagnostics;
|
package/parsanol_bg.wasm
CHANGED
|
Binary file
|
package/parsanol_bg.wasm.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export const pargartifactjs_new: (a: number, b: number) => [number, number, numb
|
|
|
13
13
|
export const pargartifactjs_parseAndBind: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
14
14
|
export const pargartifactjs_parseShape: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
15
15
|
export const pargartifactjs_parseShapeRecovering: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
16
|
+
export const pargartifactjs_parseShapeWithCallDepth: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
|
|
16
17
|
export const pargartifactjs_parseShapeWithCompatibility: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
17
18
|
export const pargartifactjs_parseShapeWithReporter: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
18
19
|
export const pargartifactjs_runTests: (a: number) => [number, number, number];
|