MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / clearParserCache

Function clearParserCache

src/extraction/grammars.ts:879–887  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

877 * Clear parser/grammar caches (useful for testing)
878 */
879export function clearParserCache(): void {
880 for (const parser of parserCache.values()) {
881 parser.delete();
882 }
883 parserCache.clear();
884 // Note: languageCache is NOT cleared — WASM languages persist.
885 // To fully re-init, set parserInitialized = false and call initGrammars() again.
886 unavailableGrammarErrors.clear();
887}
888
889/**
890 * Report grammars that failed to load.

Callers 1

Calls 2

deleteMethod · 0.65
clearMethod · 0.45

Tested by

no test coverage detected