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

Function maybeResetParser

src/utils/tree-sitter.ts:71–76  ·  view source on GitHub ↗
(parser: Parser)

Source from the content-addressed store, hash-verified

69const parserCache = new Map<string, Promise<Parser>>();
70
71function maybeResetParser(parser: Parser): void {
72 const maybeReset = (parser as Parser & { reset?: () => void }).reset;
73 if (typeof maybeReset === 'function') {
74 maybeReset.call(parser);
75 }
76}
77
78function evictParser(language: string, parser?: Parser): void {
79 if (parser) {

Callers 1

evictParserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected