()
| 589 | * Clear parser/grammar caches (useful for testing) |
| 590 | */ |
| 591 | export function clearParserCache(): void { |
| 592 | for (const parser of parserCache.values()) { |
| 593 | parser.delete(); |
| 594 | } |
| 595 | parserCache.clear(); |
| 596 | // Note: languageCache is NOT cleared — WASM languages persist. |
| 597 | // To fully re-init, set parserInitialized = false and call initGrammars() again. |
| 598 | unavailableGrammarErrors.clear(); |
| 599 | } |
| 600 | |
| 601 | /** |
| 602 | * Report grammars that failed to load. |
no test coverage detected