File tree 3 files changed +5
-7
lines changed
3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -764,8 +764,8 @@ namespace ts {
764
764
}
765
765
Node . prototype = {
766
766
kind : kind ,
767
- pos : 0 ,
768
- end : 0 ,
767
+ pos : - 1 ,
768
+ end : - 1 ,
769
769
flags : 0 ,
770
770
parent : undefined ,
771
771
} ;
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ namespace ts {
144
144
return true ;
145
145
}
146
146
147
- return node . pos === node . end && node . kind !== SyntaxKind . EndOfFileToken ;
147
+ return node . pos === node . end && node . pos >= 0 && node . kind !== SyntaxKind . EndOfFileToken ;
148
148
}
149
149
150
150
export function nodeIsPresent ( node : Node ) {
@@ -1428,8 +1428,6 @@ namespace ts {
1428
1428
1429
1429
export function createSynthesizedNode ( kind : SyntaxKind , startsOnNewLine ?: boolean ) : Node {
1430
1430
let node = < SynthesizedNode > createNode ( kind ) ;
1431
- node . pos = - 1 ;
1432
- node . end = - 1 ;
1433
1431
node . startsOnNewLine = startsOnNewLine ;
1434
1432
return node ;
1435
1433
}
Original file line number Diff line number Diff line change @@ -7387,8 +7387,8 @@ namespace ts {
7387
7387
}
7388
7388
let proto = kind === SyntaxKind . SourceFile ? new SourceFileObject ( ) : new NodeObject ( ) ;
7389
7389
proto . kind = kind ;
7390
- proto . pos = 0 ;
7391
- proto . end = 0 ;
7390
+ proto . pos = - 1 ;
7391
+ proto . end = - 1 ;
7392
7392
proto . flags = 0 ;
7393
7393
proto . parent = undefined ;
7394
7394
Node . prototype = proto ;
You can’t perform that action at this time.
0 commit comments