File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -876,7 +876,10 @@ module ts {
876876
877877 var sourceFile = < SourceFile > createNode ( SyntaxKind . SourceFile , /*pos*/ 0 ) ;
878878
879- sourceFile . pos = sourceFile . end = 0 ;
879+ sourceFile . pos = 0 ;
880+ sourceFile . end = sourceText . length ;
881+ sourceFile . text = sourceText ;
882+
880883 sourceFile . referenceDiagnostics = [ ] ;
881884 sourceFile . parseDiagnostics = [ ] ;
882885 sourceFile . bindDiagnostics = [ ] ;
@@ -961,13 +964,6 @@ module ts {
961964 // attached to the EOF token.
962965 var parseErrorBeforeNextFinishedNode : boolean = false ;
963966
964- sourceFile . syntacticDiagnostics = undefined ;
965- sourceFile . referenceDiagnostics = [ ] ;
966- sourceFile . parseDiagnostics = [ ] ;
967- sourceFile . bindDiagnostics = [ ] ;
968- sourceFile . end = sourceText . length ;
969- sourceFile . text = sourceText ;
970-
971967 // Create and prime the scanner before parsing the source elements.
972968 scanner = createScanner ( languageVersion , /*skipTrivia*/ true , sourceText , scanError ) ;
973969 token = nextToken ( ) ;
You can’t perform that action at this time.
0 commit comments