Remove what looks like copy/paste errors in the parser.

This commit is contained in:
Cyrus Najmabadi 2015-02-05 13:14:41 -08:00
parent c1dfdaa436
commit f20fbb9726

View File

@ -876,7 +876,10 @@ module ts {
var sourceFile = <SourceFile>createNode(SyntaxKind.SourceFile, /*pos*/ 0);
sourceFile.pos = sourceFile.end = 0;
sourceFile.pos = 0;
sourceFile.end = sourceText.length;
sourceFile.text = sourceText;
sourceFile.referenceDiagnostics = [];
sourceFile.parseDiagnostics = [];
sourceFile.bindDiagnostics = [];
@ -961,13 +964,6 @@ module ts {
// attached to the EOF token.
var parseErrorBeforeNextFinishedNode: boolean = false;
sourceFile.syntacticDiagnostics = undefined;
sourceFile.referenceDiagnostics = [];
sourceFile.parseDiagnostics = [];
sourceFile.bindDiagnostics = [];
sourceFile.end = sourceText.length;
sourceFile.text = sourceText;
// Create and prime the scanner before parsing the source elements.
scanner = createScanner(languageVersion, /*skipTrivia*/ true, sourceText, scanError);
token = nextToken();