@yuku-parser/wasm 0.5.37 → 0.5.38
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 +2 -2
- package/walk.js +1 -8
- package/yuku-parser.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuku-parser/wasm",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.38",
|
|
4
4
|
"description": "High-performance JavaScript/TypeScript parser, compiled to WebAssembly",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"yuku-parser.wasm"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@yuku-toolchain/types": "0.5.
|
|
21
|
+
"@yuku-toolchain/types": "0.5.37"
|
|
22
22
|
},
|
|
23
23
|
"keywords": [
|
|
24
24
|
"acorn",
|
package/walk.js
CHANGED
|
@@ -55,8 +55,7 @@ export class WalkContext {
|
|
|
55
55
|
this._removed = true;
|
|
56
56
|
}
|
|
57
57
|
insertBefore(node) {
|
|
58
|
-
// advance past the insert so the current node keeps its turn
|
|
59
|
-
// new sibling is not visited
|
|
58
|
+
// advance past the insert so the current node keeps its turn
|
|
60
59
|
this.#insert(node, 0);
|
|
61
60
|
this._frame.i++;
|
|
62
61
|
}
|
|
@@ -86,10 +85,6 @@ function createDispatch(visitors) {
|
|
|
86
85
|
return { enter, leave, typed: (type) => concrete.get(type) };
|
|
87
86
|
}
|
|
88
87
|
|
|
89
|
-
/**
|
|
90
|
-
* Walk an AST depth-first, dispatching to typed visitors and mutating
|
|
91
|
-
* in place. Returns the root.
|
|
92
|
-
*/
|
|
93
88
|
export function walk(root, visitors, state) {
|
|
94
89
|
_walk(root, visitors, state, new WalkContext());
|
|
95
90
|
return root;
|
|
@@ -107,8 +102,6 @@ export function _walk(root, visitors, state, ctx) {
|
|
|
107
102
|
ctx._frame = frame;
|
|
108
103
|
}
|
|
109
104
|
|
|
110
|
-
// swaps the current node in its parent slot and continues the walk on
|
|
111
|
-
// the replacement
|
|
112
105
|
function applyReplace(parent, key, list, frame) {
|
|
113
106
|
const next = ctx._replacement;
|
|
114
107
|
ctx._replacement = null;
|
package/yuku-parser.wasm
CHANGED
|
Binary file
|