mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
429deac502
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>
14 lines
429 B
JavaScript
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));
|
|
}
|