@@ -1431,24 +1431,25 @@ namespace Parser {
1431
1431
1432
1432
const factory = createNodeFactory(NodeFactoryFlags.NoParenthesizerRules | NodeFactoryFlags.NoNodeConverters | NodeFactoryFlags.NoOriginalNode, baseNodeFactory);
1433
1433
1434
- let fileName: string;
1435
- let sourceFlags: NodeFlags;
1436
- let sourceText: string;
1437
- let languageVersion: ScriptTarget;
1438
- let scriptKind: ScriptKind;
1439
- let languageVariant: LanguageVariant;
1440
- let parseDiagnostics: DiagnosticWithDetachedLocation[];
1441
- let jsDocDiagnostics: DiagnosticWithDetachedLocation[];
1442
- let syntaxCursor: IncrementalParser.SyntaxCursor | undefined;
1443
-
1444
- let currentToken: SyntaxKind;
1445
- let nodeCount: number;
1446
- let identifiers: Map<string, string>;
1447
- let identifierCount: number;
1448
-
1449
- let parsingContext: ParsingContext;
1450
-
1451
- let notParenthesizedArrow: Set<number> | undefined;
1434
+ /* eslint-disable no-var */
1435
+ var fileName: string;
1436
+ var sourceFlags: NodeFlags;
1437
+ var sourceText: string;
1438
+ var languageVersion: ScriptTarget;
1439
+ var scriptKind: ScriptKind;
1440
+ var languageVariant: LanguageVariant;
1441
+ var parseDiagnostics: DiagnosticWithDetachedLocation[];
1442
+ var jsDocDiagnostics: DiagnosticWithDetachedLocation[];
1443
+ var syntaxCursor: IncrementalParser.SyntaxCursor | undefined;
1444
+
1445
+ var currentToken: SyntaxKind;
1446
+ var nodeCount: number;
1447
+ var identifiers: Map<string, string>;
1448
+ var identifierCount: number;
1449
+
1450
+ var parsingContext: ParsingContext;
1451
+
1452
+ var notParenthesizedArrow: Set<number> | undefined;
1452
1453
1453
1454
// Flags that dictate what parsing context we're in. For example:
1454
1455
// Whether or not we are in strict parsing mode. All that changes in strict parsing mode is
@@ -1496,10 +1497,10 @@ namespace Parser {
1496
1497
// Note: it should not be necessary to save/restore these flags during speculative/lookahead
1497
1498
// parsing. These context flags are naturally stored and restored through normal recursive
1498
1499
// descent parsing and unwinding.
1499
- let contextFlags: NodeFlags;
1500
+ var contextFlags: NodeFlags;
1500
1501
1501
1502
// Indicates whether we are currently parsing top-level statements.
1502
- let topLevel = true;
1503
+ var topLevel = true;
1503
1504
1504
1505
// Whether or not we've had a parse error since creating the last AST node. If we have
1505
1506
// encountered an error, it will be stored on the next AST node we create. Parse errors
@@ -1528,7 +1529,8 @@ namespace Parser {
1528
1529
//
1529
1530
// Note: any errors at the end of the file that do not precede a regular node, should get
1530
1531
// attached to the EOF token.
1531
- let parseErrorBeforeNextFinishedNode = false;
1532
+ var parseErrorBeforeNextFinishedNode = false;
1533
+ /* eslint-enable no-var */
1532
1534
1533
1535
export function parseSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, syntaxCursor: IncrementalParser.SyntaxCursor | undefined, setParentNodes = false, scriptKind?: ScriptKind, setExternalModuleIndicatorOverride?: (file: SourceFile) => void): SourceFile {
1534
1536
scriptKind = ensureScriptKind(fileName, scriptKind);
0 commit comments