Add __tokentag to Token
This commit is contained in:
parent
0764590691
commit
767da71cc1
3 changed files with 7 additions and 4 deletions
|
@ -1030,7 +1030,7 @@ namespace ts {
|
|||
}
|
||||
|
||||
// note: this function creates only node
|
||||
function createNode(kind: SyntaxKind, pos?: number): Node {
|
||||
function createNode(kind: SyntaxKind, pos?: number): Node | Token | Identifier {
|
||||
nodeCount++;
|
||||
if (!(pos >= 0)) {
|
||||
pos = scanner.getStartPos();
|
||||
|
@ -5109,7 +5109,7 @@ namespace ts {
|
|||
}
|
||||
|
||||
flags |= modifierToFlag(modifierKind);
|
||||
modifiers.push(finishNode(createNode(modifierKind, modifierStart)));
|
||||
modifiers.push(finishNode(<Modifier>createNode(modifierKind, modifierStart)));
|
||||
}
|
||||
if (modifiers) {
|
||||
modifiers.flags = flags;
|
||||
|
@ -5128,7 +5128,7 @@ namespace ts {
|
|||
modifiers = <ModifiersArray>[];
|
||||
modifiers.pos = modifierStart;
|
||||
flags |= modifierToFlag(modifierKind);
|
||||
modifiers.push(finishNode(createNode(modifierKind, modifierStart)));
|
||||
modifiers.push(finishNode(<Modifier>createNode(modifierKind, modifierStart)));
|
||||
modifiers.flags = flags;
|
||||
modifiers.end = scanner.getStartPos();
|
||||
}
|
||||
|
|
|
@ -472,7 +472,9 @@ namespace ts {
|
|||
flags: NodeFlags;
|
||||
}
|
||||
|
||||
export interface Token extends Node { }
|
||||
export interface Token extends Node {
|
||||
__tokenTag: any;
|
||||
}
|
||||
|
||||
// @kind(SyntaxKind.AbstractKeyword)
|
||||
// @kind(SyntaxKind.AsyncKeyword)
|
||||
|
|
|
@ -351,6 +351,7 @@ namespace ts {
|
|||
public flags: NodeFlags;
|
||||
public parent: Node;
|
||||
public jsDocComments: JSDocComment[];
|
||||
public __tokenTag: any;
|
||||
|
||||
constructor(public pos: number, public end: number) {
|
||||
this.flags = NodeFlags.None;
|
||||
|
|
Loading…
Reference in a new issue