MCPcopy Index your code
hub / github.com/PatrickSys/codebase-context / ensureParserInitialized

Function ensureParserInitialized

src/utils/tree-sitter.ts:126–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124}
125
126async function ensureParserInitialized(): Promise<void> {
127 if (!initPromise) {
128 initPromise = Parser.init({
129 locateFile(scriptName: string) {
130 if (scriptName === 'tree-sitter.wasm') {
131 return CORE_WASM_PATH;
132 }
133 return scriptName;
134 }
135 });
136 }
137
138 await initPromise;
139}
140
141async function loadLanguage(language: string): Promise<Language> {
142 const wasmFile = CURATED_LANGUAGE_TO_WASM[language];

Callers 1

getParserForLanguageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected