MCPcopy Index your code
hub / github.com/continuedev/continue / loadLanguageForFileExt

Function loadLanguageForFileExt

core/util/treeSitter.ts:200–211  ·  view source on GitHub ↗
(
  fileExtension: string,
)

Source from the content-addressed store, hash-verified

198}
199
200async function loadLanguageForFileExt(
201 fileExtension: string,
202): Promise<Language> {
203 const wasmPath = path.join(
204 process.env.NODE_ENV === "test" ? process.cwd() : __dirname,
205 ...(process.env.NODE_ENV === "test"
206 ? ["node_modules", "tree-sitter-wasms", "out"]
207 : ["tree-sitter-wasms"]),
208 `tree-sitter-${supportedLanguages[fileExtension]}.wasm`,
209 );
210 return await Parser.Language.load(wasmPath);
211}
212
213// See https://tree-sitter.github.io/tree-sitter/using-parsers
214const GET_SYMBOLS_FOR_NODE_TYPES: Parser.SyntaxNode["type"][] = [

Callers 1

getLanguageForFileFunction · 0.85

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected