@yuku-parser/wasm 0.5.32 → 0.5.35

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  // yuku-parser's public type surface. The AST, diagnostic, and traversal type
2
- // model lives in @yuku/types and is re-exported here for backward
2
+ // model lives in @yuku-toolchain/types and is re-exported here for backward
3
3
  // compatibility; this file adds only the parser's own parse/walk/scan API.
4
4
 
5
5
  import type {
@@ -14,9 +14,9 @@ import type {
14
14
  SourceLocation,
15
15
  SourceType,
16
16
  WalkContext,
17
- } from "@yuku/types";
17
+ } from "@yuku-toolchain/types";
18
18
 
19
- export * from "@yuku/types";
19
+ export * from "@yuku-toolchain/types";
20
20
 
21
21
  // Parsing
22
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuku-parser/wasm",
3
- "version": "0.5.32",
3
+ "version": "0.5.35",
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/types": "0.1.0"
21
+ "@yuku-toolchain/types": "0.5.32"
22
22
  },
23
23
  "keywords": [
24
24
  "acorn",
package/walk.js CHANGED
@@ -91,15 +91,11 @@ function createDispatch(visitors) {
91
91
  * in place. Returns the root.
92
92
  */
93
93
  export function walk(root, visitors, state) {
94
- _walk(root, visitors, state, null, new WalkContext());
94
+ _walk(root, visitors, state, new WalkContext());
95
95
  return root;
96
96
  }
97
97
 
98
- // internal entry point. yuku-analyzer layers scope replay via `hooks`
99
- // (enter returns a token passed to exit, which runs after the node is
100
- // handled, removal included) and a WalkContext subclass. exits are
101
- // skipped once stopped.
102
- export function _walk(root, visitors, state, hooks, ctx) {
98
+ export function _walk(root, visitors, state, ctx) {
103
99
  const d = createDispatch(visitors);
104
100
  ctx.state = state;
105
101
  const ancestors = ctx._ancestors;
@@ -133,7 +129,6 @@ export function _walk(root, visitors, state, hooks, ctx) {
133
129
 
134
130
  (function visit(node, key, list, frame) {
135
131
  let typed = d.typed(node.type);
136
- const token = hooks === null ? undefined : hooks.enter(node);
137
132
  const parent = ctx.parent;
138
133
 
139
134
  position(node, key, list, frame);
@@ -147,7 +142,6 @@ export function _walk(root, visitors, state, hooks, ctx) {
147
142
  }
148
143
  if (ctx._removed) {
149
144
  applyRemove(parent, key, list, frame);
150
- if (hooks !== null) hooks.exit(token);
151
145
  return true;
152
146
  }
153
147
  if (ctx._replacement !== null) {
@@ -192,7 +186,6 @@ export function _walk(root, visitors, state, hooks, ctx) {
192
186
  if (ctx._removed) applyRemove(parent, key, list, frame);
193
187
  else if (ctx._replacement !== null) applyReplace(parent, key, list, frame);
194
188
 
195
- if (hooks !== null) hooks.exit(token);
196
189
  return true;
197
190
  })(root, null, null, null);
198
191
  }
package/yuku-parser.wasm CHANGED
Binary file