@hew-lang/wasm 0.7.1 → 0.8.0
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 +3 -3
- package/wasm.d.ts +3 -2
- package/wasm.js +4 -3
- package/wasm_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@hew-lang/wasm",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "WebAssembly bindings for Hew analysis and verified sandbox compilation",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.8.0",
|
|
6
6
|
"license": "MIT OR Apache-2.0",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"webassembly"
|
|
27
27
|
],
|
|
28
28
|
"hewSource": {
|
|
29
|
-
"commit": "
|
|
30
|
-
"tag": "v0.
|
|
29
|
+
"commit": "9322b962e46f92cc9c595b7cf742f73202751d1a",
|
|
30
|
+
"tag": "v0.8.0",
|
|
31
31
|
"dirty": false
|
|
32
32
|
},
|
|
33
33
|
"publishConfig": {
|
package/wasm.d.ts
CHANGED
|
@@ -88,13 +88,14 @@ export function executeCalendar(request: string): string;
|
|
|
88
88
|
export function executeCodec(request: string): string;
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
|
-
* Render
|
|
91
|
+
* Render an expansion at a UTF-8 byte offset, or the complete expanded document
|
|
92
|
+
* when the offset is omitted, using the shared frontend.
|
|
92
93
|
*
|
|
93
94
|
* # Errors
|
|
94
95
|
*
|
|
95
96
|
* Returns an error when loading or expansion fails, or no expansion covers the offset.
|
|
96
97
|
*/
|
|
97
|
-
export function expand_macro(source: string, offset
|
|
98
|
+
export function expand_macro(source: string, offset?: number | null): string;
|
|
98
99
|
|
|
99
100
|
/**
|
|
100
101
|
* Find all references at offset. Returns JSON `{ name, spans }` or `"null"` if no symbol found.
|
package/wasm.js
CHANGED
|
@@ -305,13 +305,14 @@ export function executeCodec(request) {
|
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
/**
|
|
308
|
-
* Render
|
|
308
|
+
* Render an expansion at a UTF-8 byte offset, or the complete expanded document
|
|
309
|
+
* when the offset is omitted, using the shared frontend.
|
|
309
310
|
*
|
|
310
311
|
* # Errors
|
|
311
312
|
*
|
|
312
313
|
* Returns an error when loading or expansion fails, or no expansion covers the offset.
|
|
313
314
|
* @param {string} source
|
|
314
|
-
* @param {number} offset
|
|
315
|
+
* @param {number | null} [offset]
|
|
315
316
|
* @returns {string}
|
|
316
317
|
*/
|
|
317
318
|
export function expand_macro(source, offset) {
|
|
@@ -321,7 +322,7 @@ export function expand_macro(source, offset) {
|
|
|
321
322
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
322
323
|
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
323
324
|
const len0 = WASM_VECTOR_LEN;
|
|
324
|
-
wasm.expand_macro(retptr, ptr0, len0, offset);
|
|
325
|
+
wasm.expand_macro(retptr, ptr0, len0, isLikeNone(offset) ? Number.MAX_SAFE_INTEGER : (offset) >>> 0);
|
|
325
326
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
326
327
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
327
328
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
package/wasm_bg.wasm
CHANGED
|
Binary file
|