mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Set current source file as the first node in VisitorContext
This commit is contained in:
@@ -298,7 +298,7 @@ namespace ts.transform {
|
||||
private hoistedFunctionDeclarationsStack: FunctionDeclaration[][] = [];
|
||||
|
||||
// node stack
|
||||
private nodeStackSize: number = 0;
|
||||
private nodeStackSize: number = 1;
|
||||
private ancestorStack: Node[] = [];
|
||||
|
||||
public compilerOptions: CompilerOptions;
|
||||
@@ -317,6 +317,7 @@ namespace ts.transform {
|
||||
this.generatedNameSet = generatedNameSet;
|
||||
this.nodeToGeneratedName = nodeToGeneratedName;
|
||||
this.getAncestorOrSelfCallback = offset => this.peekNode(offset);
|
||||
this.currentNode = currentSourceFile;
|
||||
}
|
||||
|
||||
public pushNode(node: Node): void {
|
||||
|
||||
Reference in New Issue
Block a user