Skip to content

Commit c098c56

Browse files
committed
fix(adapter-yaml-1-2): supress loading wasm file
1 parent 2a5aa92 commit c098c56

File tree

1 file changed

+4
-1
lines changed
  • packages/apidom-parser-adapter-yaml-1-2/src/tree-sitter/lexical-analysis

1 file changed

+4
-1
lines changed

packages/apidom-parser-adapter-yaml-1-2/src/tree-sitter/lexical-analysis/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ let parserInitLock: Promise<Parser> | null = null;
1919
const analyze = async (source: string): Promise<Tree> => {
2020
if (parser === null && parserInitLock === null) {
2121
// acquire lock
22-
parserInitLock = Parser.init({ wasmBinary: treeSitter } as unknown as EmscriptenModule)
22+
parserInitLock = Parser.init({
23+
wasmBinary: treeSitter,
24+
locateFile: (scriptName: string) => scriptName,
25+
} as unknown as EmscriptenModule)
2326
.then(() => Language.load(treeSitterYaml))
2427
.then((yamlLanguage) => {
2528
const parserInstance = new Parser();

0 commit comments

Comments
 (0)