MCPcopy Index your code
hub / github.com/nodejs/node / clearState

Function clearState

test/fixtures/snapshot/typescript.js:31657–31675  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31655 scanner.setLanguageVariant(languageVariant);
31656 }
31657 function clearState() {
31658 // Clear out the text the scanner is pointing at, so it doesn't keep anything alive unnecessarily.
31659 scanner.clearCommentDirectives();
31660 scanner.setText("");
31661 scanner.setOnError(undefined);
31662 // Clear any data. We don't want to accidentally hold onto it for too long.
31663 sourceText = undefined;
31664 languageVersion = undefined;
31665 syntaxCursor = undefined;
31666 scriptKind = undefined;
31667 languageVariant = undefined;
31668 sourceFlags = 0;
31669 parseDiagnostics = undefined;
31670 jsDocDiagnostics = undefined;
31671 parsingContext = 0;
31672 identifiers = undefined;
31673 notParenthesizedArrow = undefined;
31674 topLevel = true;
31675 }
31676 function parseSourceFileWorker(languageVersion, setParentNodes, scriptKind, setExternalModuleIndicator) {
31677 var isDeclarationFile = isDeclarationFileName(fileName);
31678 if (isDeclarationFile) {

Callers 5

parseSourceFileFunction · 0.85
parseIsolatedEntityNameFunction · 0.85
parseJsonTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…