Files
oxc-project__oxc/napi/parser/src-js/wasm.js
NullVoxPopuli 429deac502 fix(napi/parser): export visitorKeys from wasm entrypoint (#21996)
Fixes #21995 

Unblocks
- https://github.com/sxzz/ast-explorer/pull/263

Why?
- getting the actual list of visitorKeys provides an optimization for
tools like zimmerframe, which will `walk` over only the things specified
in the visitorKeys list -- helping prevent accidental recursive
visiting, which can happen when a tree adds parent referencs

Co-authored-by: Cameron <cameron.clark@hey.com>
2026-05-01 09:50:42 +01:00

14 lines
429 B
JavaScript

export * from "@oxc-parser/binding-wasm32-wasi";
import * as bindings from "@oxc-parser/binding-wasm32-wasi";
import { wrap } from "./wrap.js";
export { default as visitorKeys } from "./generated/visit/keys.js";
export async function parse(...args) {
return wrap(await bindings.parse(...args));
}
export function parseSync(filename, sourceText, options) {
return wrap(bindings.parseSync(filename, sourceText, options));
}