File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -580,6 +580,7 @@ module ts {
580
580
// start of the tree.
581
581
for ( var i = 0 ; start > 0 && i <= maxLookahead ; i ++ ) {
582
582
var nearestNode = findNearestNodeStartingBeforeOrAtPosition ( sourceFile , start ) ;
583
+ Debug . assert ( nearestNode . pos <= start ) ;
583
584
var position = nearestNode . pos ;
584
585
585
586
start = Math . max ( 0 , position - 1 ) ;
@@ -936,7 +937,6 @@ module ts {
936
937
var identifiers : Map < string > = { } ;
937
938
var identifierCount = 0 ;
938
939
var nodeCount = 0 ;
939
- var scanner : Scanner ;
940
940
var token : SyntaxKind ;
941
941
942
942
var sourceFile = < SourceFile > createNode ( SyntaxKind . SourceFile , /*pos*/ 0 ) ;
@@ -1029,7 +1029,7 @@ module ts {
1029
1029
var parseErrorBeforeNextFinishedNode : boolean = false ;
1030
1030
1031
1031
// Create and prime the scanner before parsing the source elements.
1032
- scanner = createScanner ( languageVersion , /*skipTrivia*/ true , sourceText , scanError ) ;
1032
+ var scanner = createScanner ( languageVersion , /*skipTrivia*/ true , sourceText , scanError ) ;
1033
1033
token = nextToken ( ) ;
1034
1034
1035
1035
processReferenceComments ( sourceFile ) ;
You can’t perform that action at this time.
0 commit comments