File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -764,8 +764,8 @@ namespace ts {
764764 }
765765 Node . prototype = {
766766 kind : kind ,
767- pos : 0 ,
768- end : 0 ,
767+ pos : - 1 ,
768+ end : - 1 ,
769769 flags : 0 ,
770770 parent : undefined ,
771771 } ;
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ namespace ts {
144144 return true ;
145145 }
146146
147- return node . pos === node . end && node . kind !== SyntaxKind . EndOfFileToken ;
147+ return node . pos === node . end && node . pos >= 0 && node . kind !== SyntaxKind . EndOfFileToken ;
148148 }
149149
150150 export function nodeIsPresent ( node : Node ) {
@@ -1428,8 +1428,6 @@ namespace ts {
14281428
14291429 export function createSynthesizedNode ( kind : SyntaxKind , startsOnNewLine ?: boolean ) : Node {
14301430 let node = < SynthesizedNode > createNode ( kind ) ;
1431- node . pos = - 1 ;
1432- node . end = - 1 ;
14331431 node . startsOnNewLine = startsOnNewLine ;
14341432 return node ;
14351433 }
Original file line number Diff line number Diff line change @@ -7387,8 +7387,8 @@ namespace ts {
73877387 }
73887388 let proto = kind === SyntaxKind . SourceFile ? new SourceFileObject ( ) : new NodeObject ( ) ;
73897389 proto . kind = kind ;
7390- proto . pos = 0 ;
7391- proto . end = 0 ;
7390+ proto . pos = - 1 ;
7391+ proto . end = - 1 ;
73927392 proto . flags = 0 ;
73937393 proto . parent = undefined ;
73947394 Node . prototype = proto ;
You can’t perform that action at this time.
0 commit comments