* Accept change * Accept the huge set of ever so slightly changed baselines * Update return type logic to only reuse nodes if original nodes share scope with current node, like property types, only reuse nodes if symbols referened are acessible, reuse nodes for property signatures, too * Only reuse nodes when a context is provided (otherwise identifier printback may fail) * Only track symbol if symbol is found and no error is recorded * Fix type parameter reuse lookup * Forbid cjs module.exports references in retained nodes * Adjust check for cjs export references to not include bad module type in output * Add symbol to all identifiers we see in existing nodes for quickinfo * Accept fourslash baseline updates * Accept slightly updated baseline post-merge * Do not copy original nodes for error types, replace empty type references with any
4316 lines
139 KiB
Text
4316 lines
139 KiB
Text
=== tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts ===
|
|
// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0.
|
|
// See LICENSE.txt in the project root for complete license information.
|
|
|
|
///<reference path='typescript.ts' />
|
|
|
|
module TypeScript {
|
|
>TypeScript : typeof TypeScript
|
|
|
|
export function lastOf(items: any[]): any {
|
|
>lastOf : (items: any[]) => any
|
|
>items : any[]
|
|
|
|
return (items === null || items.length === 0) ? null : items[items.length - 1];
|
|
>(items === null || items.length === 0) ? null : items[items.length - 1] : any
|
|
>(items === null || items.length === 0) : boolean
|
|
>items === null || items.length === 0 : boolean
|
|
>items === null : boolean
|
|
>items : any[]
|
|
>null : null
|
|
>items.length === 0 : boolean
|
|
>items.length : number
|
|
>items : any[]
|
|
>length : number
|
|
>0 : 0
|
|
>null : null
|
|
>items[items.length - 1] : any
|
|
>items : any[]
|
|
>items.length - 1 : number
|
|
>items.length : number
|
|
>items : any[]
|
|
>length : number
|
|
>1 : 1
|
|
}
|
|
|
|
export function max(a: number, b: number): number {
|
|
>max : (a: number, b: number) => number
|
|
>a : number
|
|
>b : number
|
|
|
|
return a >= b ? a : b;
|
|
>a >= b ? a : b : number
|
|
>a >= b : boolean
|
|
>a : number
|
|
>b : number
|
|
>a : number
|
|
>b : number
|
|
}
|
|
|
|
export function min(a: number, b: number): number {
|
|
>min : (a: number, b: number) => number
|
|
>a : number
|
|
>b : number
|
|
|
|
return a <= b ? a : b;
|
|
>a <= b ? a : b : number
|
|
>a <= b : boolean
|
|
>a : number
|
|
>b : number
|
|
>a : number
|
|
>b : number
|
|
}
|
|
|
|
//
|
|
// Helper class representing a path from a root ast node to a (grand)child ast node.
|
|
// This is helpful as our tree don't have parents.
|
|
//
|
|
export class AstPath {
|
|
>AstPath : AstPath
|
|
|
|
public asts: TypeScript.AST[] = [];
|
|
>asts : any[]
|
|
>TypeScript : any
|
|
>[] : undefined[]
|
|
|
|
public top: number = -1;
|
|
>top : number
|
|
>-1 : -1
|
|
>1 : 1
|
|
|
|
static reverseIndexOf(items: any[], index: number): any {
|
|
>reverseIndexOf : (items: any[], index: number) => any
|
|
>items : any[]
|
|
>index : number
|
|
|
|
return (items === null || items.length <= index) ? null : items[items.length - index - 1];
|
|
>(items === null || items.length <= index) ? null : items[items.length - index - 1] : any
|
|
>(items === null || items.length <= index) : boolean
|
|
>items === null || items.length <= index : boolean
|
|
>items === null : boolean
|
|
>items : any[]
|
|
>null : null
|
|
>items.length <= index : boolean
|
|
>items.length : number
|
|
>items : any[]
|
|
>length : number
|
|
>index : number
|
|
>null : null
|
|
>items[items.length - index - 1] : any
|
|
>items : any[]
|
|
>items.length - index - 1 : number
|
|
>items.length - index : number
|
|
>items.length : number
|
|
>items : any[]
|
|
>length : number
|
|
>index : number
|
|
>1 : 1
|
|
}
|
|
|
|
public clone(): AstPath {
|
|
>clone : () => AstPath
|
|
|
|
var clone = new AstPath();
|
|
>clone : AstPath
|
|
>new AstPath() : AstPath
|
|
>AstPath : typeof AstPath
|
|
|
|
clone.asts = this.asts.map((value) => { return value; });
|
|
>clone.asts = this.asts.map((value) => { return value; }) : any[]
|
|
>clone.asts : any[]
|
|
>clone : AstPath
|
|
>asts : any[]
|
|
>this.asts.map((value) => { return value; }) : any[]
|
|
>this.asts.map : <U>(callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[]
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>map : <U>(callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[]
|
|
>(value) => { return value; } : (value: any) => any
|
|
>value : any
|
|
>value : any
|
|
|
|
clone.top = this.top;
|
|
>clone.top = this.top : number
|
|
>clone.top : number
|
|
>clone : AstPath
|
|
>top : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
|
|
return clone;
|
|
>clone : AstPath
|
|
}
|
|
|
|
public pop(): TypeScript.AST {
|
|
>pop : () => any
|
|
>TypeScript : any
|
|
|
|
var head = this.ast();
|
|
>head : any
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
|
|
this.up();
|
|
>this.up() : void
|
|
>this.up : () => void
|
|
>this : this
|
|
>up : () => void
|
|
|
|
while (this.asts.length > this.count()) {
|
|
>this.asts.length > this.count() : boolean
|
|
>this.asts.length : number
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>length : number
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
|
|
this.asts.pop();
|
|
>this.asts.pop() : any
|
|
>this.asts.pop : () => any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>pop : () => any
|
|
}
|
|
return head;
|
|
>head : any
|
|
}
|
|
|
|
public push(ast: TypeScript.AST) {
|
|
>push : (ast: any) => void
|
|
>ast : any
|
|
>TypeScript : any
|
|
|
|
while (this.asts.length > this.count()) {
|
|
>this.asts.length > this.count() : boolean
|
|
>this.asts.length : number
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>length : number
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
|
|
this.asts.pop();
|
|
>this.asts.pop() : any
|
|
>this.asts.pop : () => any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>pop : () => any
|
|
}
|
|
this.top = this.asts.length;
|
|
>this.top = this.asts.length : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>this.asts.length : number
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>length : number
|
|
|
|
this.asts.push(ast);
|
|
>this.asts.push(ast) : number
|
|
>this.asts.push : (...items: any[]) => number
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>push : (...items: any[]) => number
|
|
>ast : any
|
|
}
|
|
|
|
public up() {
|
|
>up : () => void
|
|
|
|
if (this.top <= -1)
|
|
>this.top <= -1 : boolean
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>-1 : -1
|
|
>1 : 1
|
|
|
|
throw new Error("Invalid call to 'up'");
|
|
>new Error("Invalid call to 'up'") : Error
|
|
>Error : ErrorConstructor
|
|
>"Invalid call to 'up'" : "Invalid call to 'up'"
|
|
|
|
this.top--;
|
|
>this.top-- : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
}
|
|
|
|
public down() {
|
|
>down : () => void
|
|
|
|
if (this.top == this.ast.length - 1)
|
|
>this.top == this.ast.length - 1 : boolean
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>this.ast.length - 1 : number
|
|
>this.ast.length : number
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
>length : number
|
|
>1 : 1
|
|
|
|
throw new Error("Invalid call to 'down'");
|
|
>new Error("Invalid call to 'down'") : Error
|
|
>Error : ErrorConstructor
|
|
>"Invalid call to 'down'" : "Invalid call to 'down'"
|
|
|
|
this.top++;
|
|
>this.top++ : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
}
|
|
|
|
public nodeType(): TypeScript.NodeType {
|
|
>nodeType : () => any
|
|
>TypeScript : any
|
|
|
|
if (this.ast() == null)
|
|
>this.ast() == null : boolean
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
>null : null
|
|
|
|
return TypeScript.NodeType.None;
|
|
>TypeScript.NodeType.None : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>None : any
|
|
|
|
return this.ast().nodeType;
|
|
>this.ast().nodeType : any
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
>nodeType : any
|
|
}
|
|
|
|
public ast() {
|
|
>ast : () => any
|
|
|
|
return <TypeScript.AST>AstPath.reverseIndexOf(this.asts, this.asts.length - (this.top + 1));
|
|
><TypeScript.AST>AstPath.reverseIndexOf(this.asts, this.asts.length - (this.top + 1)) : any
|
|
>TypeScript : any
|
|
>AstPath.reverseIndexOf(this.asts, this.asts.length - (this.top + 1)) : any
|
|
>AstPath.reverseIndexOf : (items: any[], index: number) => any
|
|
>AstPath : typeof AstPath
|
|
>reverseIndexOf : (items: any[], index: number) => any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.asts.length - (this.top + 1) : number
|
|
>this.asts.length : number
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>length : number
|
|
>(this.top + 1) : number
|
|
>this.top + 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
}
|
|
|
|
public parent() {
|
|
>parent : () => any
|
|
|
|
return <TypeScript.AST>AstPath.reverseIndexOf(this.asts, this.asts.length - this.top);
|
|
><TypeScript.AST>AstPath.reverseIndexOf(this.asts, this.asts.length - this.top) : any
|
|
>TypeScript : any
|
|
>AstPath.reverseIndexOf(this.asts, this.asts.length - this.top) : any
|
|
>AstPath.reverseIndexOf : (items: any[], index: number) => any
|
|
>AstPath : typeof AstPath
|
|
>reverseIndexOf : (items: any[], index: number) => any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.asts.length - this.top : number
|
|
>this.asts.length : number
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>length : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
}
|
|
|
|
public count() {
|
|
>count : () => number
|
|
|
|
return this.top + 1;
|
|
>this.top + 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
}
|
|
|
|
public get(index: number): TypeScript.AST {
|
|
>get : (index: number) => any
|
|
>index : number
|
|
>TypeScript : any
|
|
|
|
return this.asts[index];
|
|
>this.asts[index] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>index : number
|
|
}
|
|
|
|
public isNameOfClass(): boolean {
|
|
>isNameOfClass : () => boolean
|
|
|
|
if (this.ast() === null || this.parent() === null)
|
|
>this.ast() === null || this.parent() === null : boolean
|
|
>this.ast() === null : boolean
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
>null : null
|
|
>this.parent() === null : boolean
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>null : null
|
|
|
|
return false;
|
|
>false : false
|
|
|
|
return (this.ast().nodeType === TypeScript.NodeType.Name) &&
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) && ((<TypeScript.InterfaceDeclaration>this.parent()).name === this.ast()) : boolean
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) : boolean
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) : boolean
|
|
>this.ast().nodeType === TypeScript.NodeType.Name : boolean
|
|
>this.ast().nodeType : any
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Name : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Name : any
|
|
|
|
(this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) &&
|
|
>(this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) : boolean
|
|
>this.parent().nodeType === TypeScript.NodeType.ClassDeclaration : boolean
|
|
>this.parent().nodeType : any
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>nodeType : any
|
|
>TypeScript.NodeType.ClassDeclaration : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>ClassDeclaration : any
|
|
|
|
((<TypeScript.InterfaceDeclaration>this.parent()).name === this.ast());
|
|
>((<TypeScript.InterfaceDeclaration>this.parent()).name === this.ast()) : boolean
|
|
>(<TypeScript.InterfaceDeclaration>this.parent()).name === this.ast() : boolean
|
|
>(<TypeScript.InterfaceDeclaration>this.parent()).name : any
|
|
>(<TypeScript.InterfaceDeclaration>this.parent()) : any
|
|
><TypeScript.InterfaceDeclaration>this.parent() : any
|
|
>TypeScript : any
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>name : any
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
}
|
|
|
|
public isNameOfInterface(): boolean {
|
|
>isNameOfInterface : () => boolean
|
|
|
|
if (this.ast() === null || this.parent() === null)
|
|
>this.ast() === null || this.parent() === null : boolean
|
|
>this.ast() === null : boolean
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
>null : null
|
|
>this.parent() === null : boolean
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>null : null
|
|
|
|
return false;
|
|
>false : false
|
|
|
|
return (this.ast().nodeType === TypeScript.NodeType.Name) &&
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) && ((<TypeScript.InterfaceDeclaration>this.parent()).name === this.ast()) : boolean
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) : boolean
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) : boolean
|
|
>this.ast().nodeType === TypeScript.NodeType.Name : boolean
|
|
>this.ast().nodeType : any
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Name : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Name : any
|
|
|
|
(this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) &&
|
|
>(this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) : boolean
|
|
>this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration : boolean
|
|
>this.parent().nodeType : any
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>nodeType : any
|
|
>TypeScript.NodeType.InterfaceDeclaration : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>InterfaceDeclaration : any
|
|
|
|
((<TypeScript.InterfaceDeclaration>this.parent()).name === this.ast());
|
|
>((<TypeScript.InterfaceDeclaration>this.parent()).name === this.ast()) : boolean
|
|
>(<TypeScript.InterfaceDeclaration>this.parent()).name === this.ast() : boolean
|
|
>(<TypeScript.InterfaceDeclaration>this.parent()).name : any
|
|
>(<TypeScript.InterfaceDeclaration>this.parent()) : any
|
|
><TypeScript.InterfaceDeclaration>this.parent() : any
|
|
>TypeScript : any
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>name : any
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
}
|
|
|
|
public isNameOfArgument(): boolean {
|
|
>isNameOfArgument : () => boolean
|
|
|
|
if (this.ast() === null || this.parent() === null)
|
|
>this.ast() === null || this.parent() === null : boolean
|
|
>this.ast() === null : boolean
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
>null : null
|
|
>this.parent() === null : boolean
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>null : null
|
|
|
|
return false;
|
|
>false : false
|
|
|
|
return (this.ast().nodeType === TypeScript.NodeType.Name) &&
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.ArgDecl) && ((<TypeScript.ArgDecl>this.parent()).id === this.ast()) : boolean
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.ArgDecl) : boolean
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) : boolean
|
|
>this.ast().nodeType === TypeScript.NodeType.Name : boolean
|
|
>this.ast().nodeType : any
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Name : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Name : any
|
|
|
|
(this.parent().nodeType === TypeScript.NodeType.ArgDecl) &&
|
|
>(this.parent().nodeType === TypeScript.NodeType.ArgDecl) : boolean
|
|
>this.parent().nodeType === TypeScript.NodeType.ArgDecl : boolean
|
|
>this.parent().nodeType : any
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>nodeType : any
|
|
>TypeScript.NodeType.ArgDecl : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>ArgDecl : any
|
|
|
|
((<TypeScript.ArgDecl>this.parent()).id === this.ast());
|
|
>((<TypeScript.ArgDecl>this.parent()).id === this.ast()) : boolean
|
|
>(<TypeScript.ArgDecl>this.parent()).id === this.ast() : boolean
|
|
>(<TypeScript.ArgDecl>this.parent()).id : any
|
|
>(<TypeScript.ArgDecl>this.parent()) : any
|
|
><TypeScript.ArgDecl>this.parent() : any
|
|
>TypeScript : any
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>id : any
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
}
|
|
|
|
public isNameOfVariable(): boolean {
|
|
>isNameOfVariable : () => boolean
|
|
|
|
if (this.ast() === null || this.parent() === null)
|
|
>this.ast() === null || this.parent() === null : boolean
|
|
>this.ast() === null : boolean
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
>null : null
|
|
>this.parent() === null : boolean
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>null : null
|
|
|
|
return false;
|
|
>false : false
|
|
|
|
return (this.ast().nodeType === TypeScript.NodeType.Name) &&
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.VarDecl) && ((<TypeScript.VarDecl>this.parent()).id === this.ast()) : boolean
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.VarDecl) : boolean
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) : boolean
|
|
>this.ast().nodeType === TypeScript.NodeType.Name : boolean
|
|
>this.ast().nodeType : any
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Name : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Name : any
|
|
|
|
(this.parent().nodeType === TypeScript.NodeType.VarDecl) &&
|
|
>(this.parent().nodeType === TypeScript.NodeType.VarDecl) : boolean
|
|
>this.parent().nodeType === TypeScript.NodeType.VarDecl : boolean
|
|
>this.parent().nodeType : any
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>nodeType : any
|
|
>TypeScript.NodeType.VarDecl : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>VarDecl : any
|
|
|
|
((<TypeScript.VarDecl>this.parent()).id === this.ast());
|
|
>((<TypeScript.VarDecl>this.parent()).id === this.ast()) : boolean
|
|
>(<TypeScript.VarDecl>this.parent()).id === this.ast() : boolean
|
|
>(<TypeScript.VarDecl>this.parent()).id : any
|
|
>(<TypeScript.VarDecl>this.parent()) : any
|
|
><TypeScript.VarDecl>this.parent() : any
|
|
>TypeScript : any
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>id : any
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
}
|
|
|
|
public isNameOfModule(): boolean {
|
|
>isNameOfModule : () => boolean
|
|
|
|
if (this.ast() === null || this.parent() === null)
|
|
>this.ast() === null || this.parent() === null : boolean
|
|
>this.ast() === null : boolean
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
>null : null
|
|
>this.parent() === null : boolean
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>null : null
|
|
|
|
return false;
|
|
>false : false
|
|
|
|
return (this.ast().nodeType === TypeScript.NodeType.Name) &&
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) && ((<TypeScript.ModuleDeclaration>this.parent()).name === this.ast()) : boolean
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) : boolean
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) : boolean
|
|
>this.ast().nodeType === TypeScript.NodeType.Name : boolean
|
|
>this.ast().nodeType : any
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Name : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Name : any
|
|
|
|
(this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) &&
|
|
>(this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) : boolean
|
|
>this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration : boolean
|
|
>this.parent().nodeType : any
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>nodeType : any
|
|
>TypeScript.NodeType.ModuleDeclaration : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>ModuleDeclaration : any
|
|
|
|
((<TypeScript.ModuleDeclaration>this.parent()).name === this.ast());
|
|
>((<TypeScript.ModuleDeclaration>this.parent()).name === this.ast()) : boolean
|
|
>(<TypeScript.ModuleDeclaration>this.parent()).name === this.ast() : boolean
|
|
>(<TypeScript.ModuleDeclaration>this.parent()).name : any
|
|
>(<TypeScript.ModuleDeclaration>this.parent()) : any
|
|
><TypeScript.ModuleDeclaration>this.parent() : any
|
|
>TypeScript : any
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>name : any
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
}
|
|
|
|
public isNameOfFunction(): boolean {
|
|
>isNameOfFunction : () => boolean
|
|
|
|
if (this.ast() === null || this.parent() === null)
|
|
>this.ast() === null || this.parent() === null : boolean
|
|
>this.ast() === null : boolean
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
>null : null
|
|
>this.parent() === null : boolean
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>null : null
|
|
|
|
return false;
|
|
>false : false
|
|
|
|
return (this.ast().nodeType === TypeScript.NodeType.Name) &&
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.FuncDecl) && ((<TypeScript.FuncDecl>this.parent()).name === this.ast()) : boolean
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.FuncDecl) : boolean
|
|
>(this.ast().nodeType === TypeScript.NodeType.Name) : boolean
|
|
>this.ast().nodeType === TypeScript.NodeType.Name : boolean
|
|
>this.ast().nodeType : any
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Name : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Name : any
|
|
|
|
(this.parent().nodeType === TypeScript.NodeType.FuncDecl) &&
|
|
>(this.parent().nodeType === TypeScript.NodeType.FuncDecl) : boolean
|
|
>this.parent().nodeType === TypeScript.NodeType.FuncDecl : boolean
|
|
>this.parent().nodeType : any
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>nodeType : any
|
|
>TypeScript.NodeType.FuncDecl : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>FuncDecl : any
|
|
|
|
((<TypeScript.FuncDecl>this.parent()).name === this.ast());
|
|
>((<TypeScript.FuncDecl>this.parent()).name === this.ast()) : boolean
|
|
>(<TypeScript.FuncDecl>this.parent()).name === this.ast() : boolean
|
|
>(<TypeScript.FuncDecl>this.parent()).name : any
|
|
>(<TypeScript.FuncDecl>this.parent()) : any
|
|
><TypeScript.FuncDecl>this.parent() : any
|
|
>TypeScript : any
|
|
>this.parent() : any
|
|
>this.parent : () => any
|
|
>this : this
|
|
>parent : () => any
|
|
>name : any
|
|
>this.ast() : any
|
|
>this.ast : () => any
|
|
>this : this
|
|
>ast : () => any
|
|
}
|
|
|
|
public isChildOfScript(): boolean {
|
|
>isChildOfScript : () => boolean
|
|
|
|
var ast = lastOf(this.asts);
|
|
>ast : any
|
|
>lastOf(this.asts) : any
|
|
>lastOf : (items: any[]) => any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
|
|
return this.count() >= 3 &&
|
|
>this.count() >= 3 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.Script : boolean
|
|
>this.count() >= 3 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 3 && this.asts[this.top] === ast : boolean
|
|
>this.count() >= 3 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>3 : 3
|
|
|
|
this.asts[this.top] === ast &&
|
|
>this.asts[this.top] === ast : boolean
|
|
>this.asts[this.top] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>ast : any
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
this.asts[this.top - 2].nodeType === TypeScript.NodeType.Script;
|
|
>this.asts[this.top - 2].nodeType === TypeScript.NodeType.Script : boolean
|
|
>this.asts[this.top - 2].nodeType : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Script : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Script : any
|
|
}
|
|
|
|
public isChildOfModule(): boolean {
|
|
>isChildOfModule : () => boolean
|
|
|
|
var ast = lastOf(this.asts);
|
|
>ast : any
|
|
>lastOf(this.asts) : any
|
|
>lastOf : (items: any[]) => any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
|
|
return this.count() >= 3 &&
|
|
>this.count() >= 3 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.ModuleDeclaration : boolean
|
|
>this.count() >= 3 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 3 && this.asts[this.top] === ast : boolean
|
|
>this.count() >= 3 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>3 : 3
|
|
|
|
this.asts[this.top] === ast &&
|
|
>this.asts[this.top] === ast : boolean
|
|
>this.asts[this.top] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>ast : any
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
this.asts[this.top - 2].nodeType === TypeScript.NodeType.ModuleDeclaration;
|
|
>this.asts[this.top - 2].nodeType === TypeScript.NodeType.ModuleDeclaration : boolean
|
|
>this.asts[this.top - 2].nodeType : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>nodeType : any
|
|
>TypeScript.NodeType.ModuleDeclaration : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>ModuleDeclaration : any
|
|
}
|
|
|
|
public isChildOfClass(): boolean {
|
|
>isChildOfClass : () => boolean
|
|
|
|
var ast = lastOf(this.asts);
|
|
>ast : any
|
|
>lastOf(this.asts) : any
|
|
>lastOf : (items: any[]) => any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
|
|
return this.count() >= 3 &&
|
|
>this.count() >= 3 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.ClassDeclaration : boolean
|
|
>this.count() >= 3 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 3 && this.asts[this.top] === ast : boolean
|
|
>this.count() >= 3 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>3 : 3
|
|
|
|
this.asts[this.top] === ast &&
|
|
>this.asts[this.top] === ast : boolean
|
|
>this.asts[this.top] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>ast : any
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
this.asts[this.top - 2].nodeType === TypeScript.NodeType.ClassDeclaration;
|
|
>this.asts[this.top - 2].nodeType === TypeScript.NodeType.ClassDeclaration : boolean
|
|
>this.asts[this.top - 2].nodeType : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>nodeType : any
|
|
>TypeScript.NodeType.ClassDeclaration : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>ClassDeclaration : any
|
|
}
|
|
|
|
public isArgumentOfClassConstructor(): boolean {
|
|
>isArgumentOfClassConstructor : () => boolean
|
|
|
|
var ast = lastOf(this.asts);
|
|
>ast : any
|
|
>lastOf(this.asts) : any
|
|
>lastOf : (items: any[]) => any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
|
|
return this.count() >= 5 &&
|
|
>this.count() >= 5 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && this.asts[this.top - 3].nodeType === TypeScript.NodeType.List && this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration && ((<TypeScript.FuncDecl>this.asts[this.top - 2]).isConstructor) && ((<TypeScript.FuncDecl>this.asts[this.top - 2]).arguments === this.asts[this.top - 1]) && ((<TypeScript.ClassDeclaration>this.asts[this.top - 4]).constructorDecl === this.asts[this.top - 2]) : boolean
|
|
>this.count() >= 5 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && this.asts[this.top - 3].nodeType === TypeScript.NodeType.List && this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration && ((<TypeScript.FuncDecl>this.asts[this.top - 2]).isConstructor) && ((<TypeScript.FuncDecl>this.asts[this.top - 2]).arguments === this.asts[this.top - 1]) : boolean
|
|
>this.count() >= 5 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && this.asts[this.top - 3].nodeType === TypeScript.NodeType.List && this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration && ((<TypeScript.FuncDecl>this.asts[this.top - 2]).isConstructor) : any
|
|
>this.count() >= 5 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && this.asts[this.top - 3].nodeType === TypeScript.NodeType.List && this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration : boolean
|
|
>this.count() >= 5 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && this.asts[this.top - 3].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 5 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl : boolean
|
|
>this.count() >= 5 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 5 && this.asts[this.top] === ast : boolean
|
|
>this.count() >= 5 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>5 : 5
|
|
|
|
this.asts[this.top] === ast &&
|
|
>this.asts[this.top] === ast : boolean
|
|
>this.asts[this.top] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>ast : any
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl &&
|
|
>this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl : boolean
|
|
>this.asts[this.top - 2].nodeType : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>nodeType : any
|
|
>TypeScript.NodeType.FuncDecl : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>FuncDecl : any
|
|
|
|
this.asts[this.top - 3].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 3].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 3].nodeType : any
|
|
>this.asts[this.top - 3] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 3 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>3 : 3
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration &&
|
|
>this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration : boolean
|
|
>this.asts[this.top - 4].nodeType : any
|
|
>this.asts[this.top - 4] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 4 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>4 : 4
|
|
>nodeType : any
|
|
>TypeScript.NodeType.ClassDeclaration : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>ClassDeclaration : any
|
|
|
|
((<TypeScript.FuncDecl>this.asts[this.top - 2]).isConstructor) &&
|
|
>((<TypeScript.FuncDecl>this.asts[this.top - 2]).isConstructor) : any
|
|
>(<TypeScript.FuncDecl>this.asts[this.top - 2]).isConstructor : any
|
|
>(<TypeScript.FuncDecl>this.asts[this.top - 2]) : any
|
|
><TypeScript.FuncDecl>this.asts[this.top - 2] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>isConstructor : any
|
|
|
|
((<TypeScript.FuncDecl>this.asts[this.top - 2]).arguments === this.asts[this.top - 1]) &&
|
|
>((<TypeScript.FuncDecl>this.asts[this.top - 2]).arguments === this.asts[this.top - 1]) : boolean
|
|
>(<TypeScript.FuncDecl>this.asts[this.top - 2]).arguments === this.asts[this.top - 1] : boolean
|
|
>(<TypeScript.FuncDecl>this.asts[this.top - 2]).arguments : any
|
|
>(<TypeScript.FuncDecl>this.asts[this.top - 2]) : any
|
|
><TypeScript.FuncDecl>this.asts[this.top - 2] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>arguments : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
|
|
((<TypeScript.ClassDeclaration>this.asts[this.top - 4]).constructorDecl === this.asts[this.top - 2]);
|
|
>((<TypeScript.ClassDeclaration>this.asts[this.top - 4]).constructorDecl === this.asts[this.top - 2]) : boolean
|
|
>(<TypeScript.ClassDeclaration>this.asts[this.top - 4]).constructorDecl === this.asts[this.top - 2] : boolean
|
|
>(<TypeScript.ClassDeclaration>this.asts[this.top - 4]).constructorDecl : any
|
|
>(<TypeScript.ClassDeclaration>this.asts[this.top - 4]) : any
|
|
><TypeScript.ClassDeclaration>this.asts[this.top - 4] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 4] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 4 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>4 : 4
|
|
>constructorDecl : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
}
|
|
|
|
public isChildOfInterface(): boolean {
|
|
>isChildOfInterface : () => boolean
|
|
|
|
var ast = lastOf(this.asts);
|
|
>ast : any
|
|
>lastOf(this.asts) : any
|
|
>lastOf : (items: any[]) => any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
|
|
return this.count() >= 3 &&
|
|
>this.count() >= 3 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.InterfaceDeclaration : boolean
|
|
>this.count() >= 3 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 3 && this.asts[this.top] === ast : boolean
|
|
>this.count() >= 3 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>3 : 3
|
|
|
|
this.asts[this.top] === ast &&
|
|
>this.asts[this.top] === ast : boolean
|
|
>this.asts[this.top] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>ast : any
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
this.asts[this.top - 2].nodeType === TypeScript.NodeType.InterfaceDeclaration;
|
|
>this.asts[this.top - 2].nodeType === TypeScript.NodeType.InterfaceDeclaration : boolean
|
|
>this.asts[this.top - 2].nodeType : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>nodeType : any
|
|
>TypeScript.NodeType.InterfaceDeclaration : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>InterfaceDeclaration : any
|
|
}
|
|
|
|
public isTopLevelImplicitModule() {
|
|
>isTopLevelImplicitModule : () => any
|
|
|
|
return this.count() >= 1 &&
|
|
>this.count() >= 1 && this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration && TypeScript.hasFlag((<TypeScript.ModuleDeclaration>this.asts[this.top]).modFlags, TypeScript.ModuleFlags.IsWholeFile) : any
|
|
>this.count() >= 1 && this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration : boolean
|
|
>this.count() >= 1 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>1 : 1
|
|
|
|
this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration &&
|
|
>this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration : boolean
|
|
>this.asts[this.top].nodeType : any
|
|
>this.asts[this.top] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>nodeType : any
|
|
>TypeScript.NodeType.ModuleDeclaration : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>ModuleDeclaration : any
|
|
|
|
TypeScript.hasFlag((<TypeScript.ModuleDeclaration>this.asts[this.top]).modFlags, TypeScript.ModuleFlags.IsWholeFile);
|
|
>TypeScript.hasFlag((<TypeScript.ModuleDeclaration>this.asts[this.top]).modFlags, TypeScript.ModuleFlags.IsWholeFile) : any
|
|
>TypeScript.hasFlag : any
|
|
>TypeScript : typeof TypeScript
|
|
>hasFlag : any
|
|
>(<TypeScript.ModuleDeclaration>this.asts[this.top]).modFlags : any
|
|
>(<TypeScript.ModuleDeclaration>this.asts[this.top]) : any
|
|
><TypeScript.ModuleDeclaration>this.asts[this.top] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>modFlags : any
|
|
>TypeScript.ModuleFlags.IsWholeFile : any
|
|
>TypeScript.ModuleFlags : any
|
|
>TypeScript : typeof TypeScript
|
|
>ModuleFlags : any
|
|
>IsWholeFile : any
|
|
}
|
|
|
|
public isBodyOfTopLevelImplicitModule() {
|
|
>isBodyOfTopLevelImplicitModule : () => any
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && (<TypeScript.ModuleDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0] && TypeScript.hasFlag((<TypeScript.ModuleDeclaration>this.asts[this.top - 1]).modFlags, TypeScript.ModuleFlags.IsWholeFile) : any
|
|
>this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && (<TypeScript.ModuleDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 0].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 0].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 0].nodeType : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.ModuleDeclaration : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>ModuleDeclaration : any
|
|
|
|
(<TypeScript.ModuleDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0] &&
|
|
>(<TypeScript.ModuleDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.ModuleDeclaration>this.asts[this.top - 1]).members : any
|
|
>(<TypeScript.ModuleDeclaration>this.asts[this.top - 1]) : any
|
|
><TypeScript.ModuleDeclaration>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>members : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
|
|
TypeScript.hasFlag((<TypeScript.ModuleDeclaration>this.asts[this.top - 1]).modFlags, TypeScript.ModuleFlags.IsWholeFile);
|
|
>TypeScript.hasFlag((<TypeScript.ModuleDeclaration>this.asts[this.top - 1]).modFlags, TypeScript.ModuleFlags.IsWholeFile) : any
|
|
>TypeScript.hasFlag : any
|
|
>TypeScript : typeof TypeScript
|
|
>hasFlag : any
|
|
>(<TypeScript.ModuleDeclaration>this.asts[this.top - 1]).modFlags : any
|
|
>(<TypeScript.ModuleDeclaration>this.asts[this.top - 1]) : any
|
|
><TypeScript.ModuleDeclaration>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>modFlags : any
|
|
>TypeScript.ModuleFlags.IsWholeFile : any
|
|
>TypeScript.ModuleFlags : any
|
|
>TypeScript : typeof TypeScript
|
|
>ModuleFlags : any
|
|
>IsWholeFile : any
|
|
}
|
|
|
|
public isBodyOfScript(): boolean {
|
|
>isBodyOfScript : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script && (<TypeScript.Script>this.asts[this.top - 1]).bod == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Script : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Script : any
|
|
|
|
(<TypeScript.Script>this.asts[this.top - 1]).bod == this.asts[this.top - 0];
|
|
>(<TypeScript.Script>this.asts[this.top - 1]).bod == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.Script>this.asts[this.top - 1]).bod : any
|
|
>(<TypeScript.Script>this.asts[this.top - 1]) : any
|
|
><TypeScript.Script>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>bod : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfSwitch(): boolean {
|
|
>isBodyOfSwitch : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch && (<TypeScript.SwitchStatement>this.asts[this.top - 1]).caseList == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Switch : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Switch : any
|
|
|
|
(<TypeScript.SwitchStatement>this.asts[this.top - 1]).caseList == this.asts[this.top - 0];
|
|
>(<TypeScript.SwitchStatement>this.asts[this.top - 1]).caseList == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.SwitchStatement>this.asts[this.top - 1]).caseList : any
|
|
>(<TypeScript.SwitchStatement>this.asts[this.top - 1]) : any
|
|
><TypeScript.SwitchStatement>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>caseList : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfModule(): boolean {
|
|
>isBodyOfModule : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && (<TypeScript.ModuleDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.ModuleDeclaration : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>ModuleDeclaration : any
|
|
|
|
(<TypeScript.ModuleDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0];
|
|
>(<TypeScript.ModuleDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.ModuleDeclaration>this.asts[this.top - 1]).members : any
|
|
>(<TypeScript.ModuleDeclaration>this.asts[this.top - 1]) : any
|
|
><TypeScript.ModuleDeclaration>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>members : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfClass(): boolean {
|
|
>isBodyOfClass : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration && (<TypeScript.ClassDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.ClassDeclaration : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>ClassDeclaration : any
|
|
|
|
(<TypeScript.ClassDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0];
|
|
>(<TypeScript.ClassDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.ClassDeclaration>this.asts[this.top - 1]).members : any
|
|
>(<TypeScript.ClassDeclaration>this.asts[this.top - 1]) : any
|
|
><TypeScript.ClassDeclaration>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>members : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfFunction(): boolean {
|
|
>isBodyOfFunction : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && (<TypeScript.FuncDecl>this.asts[this.top - 1]).bod == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.FuncDecl : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>FuncDecl : any
|
|
|
|
(<TypeScript.FuncDecl>this.asts[this.top - 1]).bod == this.asts[this.top - 0];
|
|
>(<TypeScript.FuncDecl>this.asts[this.top - 1]).bod == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.FuncDecl>this.asts[this.top - 1]).bod : any
|
|
>(<TypeScript.FuncDecl>this.asts[this.top - 1]) : any
|
|
><TypeScript.FuncDecl>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>bod : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfInterface(): boolean {
|
|
>isBodyOfInterface : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration && (<TypeScript.InterfaceDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.InterfaceDeclaration : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>InterfaceDeclaration : any
|
|
|
|
(<TypeScript.InterfaceDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0];
|
|
>(<TypeScript.InterfaceDeclaration>this.asts[this.top - 1]).members == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.InterfaceDeclaration>this.asts[this.top - 1]).members : any
|
|
>(<TypeScript.InterfaceDeclaration>this.asts[this.top - 1]) : any
|
|
><TypeScript.InterfaceDeclaration>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>members : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfBlock(): boolean {
|
|
>isBodyOfBlock : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block && (<TypeScript.Block>this.asts[this.top - 1]).statements == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Block : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Block : any
|
|
|
|
(<TypeScript.Block>this.asts[this.top - 1]).statements == this.asts[this.top - 0];
|
|
>(<TypeScript.Block>this.asts[this.top - 1]).statements == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.Block>this.asts[this.top - 1]).statements : any
|
|
>(<TypeScript.Block>this.asts[this.top - 1]) : any
|
|
><TypeScript.Block>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>statements : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfFor(): boolean {
|
|
>isBodyOfFor : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.For && (<TypeScript.ForStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.For : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.For &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.For : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.For : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>For : any
|
|
|
|
(<TypeScript.ForStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0];
|
|
>(<TypeScript.ForStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.ForStatement>this.asts[this.top - 1]).body : any
|
|
>(<TypeScript.ForStatement>this.asts[this.top - 1]) : any
|
|
><TypeScript.ForStatement>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>body : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfCase(): boolean {
|
|
>isBodyOfCase : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case && (<TypeScript.CaseStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Case : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Case : any
|
|
|
|
(<TypeScript.CaseStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0];
|
|
>(<TypeScript.CaseStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.CaseStatement>this.asts[this.top - 1]).body : any
|
|
>(<TypeScript.CaseStatement>this.asts[this.top - 1]) : any
|
|
><TypeScript.CaseStatement>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>body : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfTry(): boolean {
|
|
>isBodyOfTry : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try && (<TypeScript.Try>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Try : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Try : any
|
|
|
|
(<TypeScript.Try>this.asts[this.top - 1]).body == this.asts[this.top - 0];
|
|
>(<TypeScript.Try>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.Try>this.asts[this.top - 1]).body : any
|
|
>(<TypeScript.Try>this.asts[this.top - 1]) : any
|
|
><TypeScript.Try>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>body : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfCatch(): boolean {
|
|
>isBodyOfCatch : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch && (<TypeScript.Catch>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Catch : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Catch : any
|
|
|
|
(<TypeScript.Catch>this.asts[this.top - 1]).body == this.asts[this.top - 0];
|
|
>(<TypeScript.Catch>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.Catch>this.asts[this.top - 1]).body : any
|
|
>(<TypeScript.Catch>this.asts[this.top - 1]) : any
|
|
><TypeScript.Catch>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>body : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfDoWhile(): boolean {
|
|
>isBodyOfDoWhile : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile && (<TypeScript.DoWhileStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.DoWhile : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>DoWhile : any
|
|
|
|
(<TypeScript.DoWhileStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0];
|
|
>(<TypeScript.DoWhileStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.DoWhileStatement>this.asts[this.top - 1]).body : any
|
|
>(<TypeScript.DoWhileStatement>this.asts[this.top - 1]) : any
|
|
><TypeScript.DoWhileStatement>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>body : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfWhile(): boolean {
|
|
>isBodyOfWhile : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.While && (<TypeScript.WhileStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.While : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.While &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.While : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.While : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>While : any
|
|
|
|
(<TypeScript.WhileStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0];
|
|
>(<TypeScript.WhileStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.WhileStatement>this.asts[this.top - 1]).body : any
|
|
>(<TypeScript.WhileStatement>this.asts[this.top - 1]) : any
|
|
><TypeScript.WhileStatement>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>body : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfForIn(): boolean {
|
|
>isBodyOfForIn : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn && (<TypeScript.ForInStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.ForIn : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>ForIn : any
|
|
|
|
(<TypeScript.ForInStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0];
|
|
>(<TypeScript.ForInStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.ForInStatement>this.asts[this.top - 1]).body : any
|
|
>(<TypeScript.ForInStatement>this.asts[this.top - 1]) : any
|
|
><TypeScript.ForInStatement>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>body : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfWith(): boolean {
|
|
>isBodyOfWith : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.With && (<TypeScript.WithStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.With : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.With &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.With : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.With : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>With : any
|
|
|
|
(<TypeScript.WithStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0];
|
|
>(<TypeScript.WithStatement>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.WithStatement>this.asts[this.top - 1]).body : any
|
|
>(<TypeScript.WithStatement>this.asts[this.top - 1]) : any
|
|
><TypeScript.WithStatement>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>body : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfFinally(): boolean {
|
|
>isBodyOfFinally : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally && (<TypeScript.Finally>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Finally : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Finally : any
|
|
|
|
(<TypeScript.Finally>this.asts[this.top - 1]).body == this.asts[this.top - 0];
|
|
>(<TypeScript.Finally>this.asts[this.top - 1]).body == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.Finally>this.asts[this.top - 1]).body : any
|
|
>(<TypeScript.Finally>this.asts[this.top - 1]) : any
|
|
><TypeScript.Finally>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>body : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isCaseOfSwitch(): boolean {
|
|
>isCaseOfSwitch : () => boolean
|
|
|
|
return this.count() >= 3 &&
|
|
>this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && (<TypeScript.SwitchStatement>this.asts[this.top - 2]).caseList == this.asts[this.top - 1] : boolean
|
|
>this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch : boolean
|
|
>this.count() >= 3 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>3 : 3
|
|
|
|
this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch &&
|
|
>this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch : boolean
|
|
>this.asts[this.top - 2].nodeType : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Switch : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Switch : any
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
(<TypeScript.SwitchStatement>this.asts[this.top - 2]).caseList == this.asts[this.top - 1];
|
|
>(<TypeScript.SwitchStatement>this.asts[this.top - 2]).caseList == this.asts[this.top - 1] : boolean
|
|
>(<TypeScript.SwitchStatement>this.asts[this.top - 2]).caseList : any
|
|
>(<TypeScript.SwitchStatement>this.asts[this.top - 2]) : any
|
|
><TypeScript.SwitchStatement>this.asts[this.top - 2] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>caseList : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
}
|
|
|
|
public isDefaultCaseOfSwitch(): boolean {
|
|
>isDefaultCaseOfSwitch : () => boolean
|
|
|
|
return this.count() >= 3 &&
|
|
>this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && (<TypeScript.SwitchStatement>this.asts[this.top - 2]).caseList == this.asts[this.top - 1] && (<TypeScript.SwitchStatement>this.asts[this.top - 2]).defaultCase == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && (<TypeScript.SwitchStatement>this.asts[this.top - 2]).caseList == this.asts[this.top - 1] : boolean
|
|
>this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch : boolean
|
|
>this.count() >= 3 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>3 : 3
|
|
|
|
this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch &&
|
|
>this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch : boolean
|
|
>this.asts[this.top - 2].nodeType : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Switch : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Switch : any
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
(<TypeScript.SwitchStatement>this.asts[this.top - 2]).caseList == this.asts[this.top - 1] &&
|
|
>(<TypeScript.SwitchStatement>this.asts[this.top - 2]).caseList == this.asts[this.top - 1] : boolean
|
|
>(<TypeScript.SwitchStatement>this.asts[this.top - 2]).caseList : any
|
|
>(<TypeScript.SwitchStatement>this.asts[this.top - 2]) : any
|
|
><TypeScript.SwitchStatement>this.asts[this.top - 2] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>caseList : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
|
|
(<TypeScript.SwitchStatement>this.asts[this.top - 2]).defaultCase == this.asts[this.top - 0];
|
|
>(<TypeScript.SwitchStatement>this.asts[this.top - 2]).defaultCase == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.SwitchStatement>this.asts[this.top - 2]).defaultCase : any
|
|
>(<TypeScript.SwitchStatement>this.asts[this.top - 2]) : any
|
|
><TypeScript.SwitchStatement>this.asts[this.top - 2] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>defaultCase : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isListOfObjectLit(): boolean {
|
|
>isListOfObjectLit : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && (<TypeScript.UnaryExpression>this.asts[this.top - 1]).operand == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.ObjectLit : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>ObjectLit : any
|
|
|
|
this.asts[this.top - 0].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 0].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 0].nodeType : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
(<TypeScript.UnaryExpression>this.asts[this.top - 1]).operand == this.asts[this.top - 0];
|
|
>(<TypeScript.UnaryExpression>this.asts[this.top - 1]).operand == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.UnaryExpression>this.asts[this.top - 1]).operand : any
|
|
>(<TypeScript.UnaryExpression>this.asts[this.top - 1]) : any
|
|
><TypeScript.UnaryExpression>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>operand : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfObjectLit(): boolean {
|
|
>isBodyOfObjectLit : () => boolean
|
|
|
|
return this.isListOfObjectLit();
|
|
>this.isListOfObjectLit() : boolean
|
|
>this.isListOfObjectLit : () => boolean
|
|
>this : this
|
|
>isListOfObjectLit : () => boolean
|
|
}
|
|
|
|
public isEmptyListOfObjectLit(): boolean {
|
|
>isEmptyListOfObjectLit : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && (<TypeScript.UnaryExpression>this.asts[this.top - 1]).operand == this.asts[this.top - 0] && (<TypeScript.ASTList>this.asts[this.top - 0]).members.length == 0 : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && (<TypeScript.UnaryExpression>this.asts[this.top - 1]).operand == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.ObjectLit : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>ObjectLit : any
|
|
|
|
this.asts[this.top - 0].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 0].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 0].nodeType : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
(<TypeScript.UnaryExpression>this.asts[this.top - 1]).operand == this.asts[this.top - 0] &&
|
|
>(<TypeScript.UnaryExpression>this.asts[this.top - 1]).operand == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.UnaryExpression>this.asts[this.top - 1]).operand : any
|
|
>(<TypeScript.UnaryExpression>this.asts[this.top - 1]) : any
|
|
><TypeScript.UnaryExpression>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>operand : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
|
|
(<TypeScript.ASTList>this.asts[this.top - 0]).members.length == 0;
|
|
>(<TypeScript.ASTList>this.asts[this.top - 0]).members.length == 0 : boolean
|
|
>(<TypeScript.ASTList>this.asts[this.top - 0]).members.length : any
|
|
>(<TypeScript.ASTList>this.asts[this.top - 0]).members : any
|
|
>(<TypeScript.ASTList>this.asts[this.top - 0]) : any
|
|
><TypeScript.ASTList>this.asts[this.top - 0] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
>members : any
|
|
>length : any
|
|
>0 : 0
|
|
}
|
|
|
|
public isMemberOfObjectLit(): boolean {
|
|
>isMemberOfObjectLit : () => boolean
|
|
|
|
return this.count() >= 3 &&
|
|
>this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member && (<TypeScript.UnaryExpression>this.asts[this.top - 2]).operand == this.asts[this.top - 1] : boolean
|
|
>this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member : boolean
|
|
>this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit : boolean
|
|
>this.count() >= 3 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>3 : 3
|
|
|
|
this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit &&
|
|
>this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit : boolean
|
|
>this.asts[this.top - 2].nodeType : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>nodeType : any
|
|
>TypeScript.NodeType.ObjectLit : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>ObjectLit : any
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member &&
|
|
>this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member : boolean
|
|
>this.asts[this.top - 0].nodeType : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Member : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Member : any
|
|
|
|
(<TypeScript.UnaryExpression>this.asts[this.top - 2]).operand == this.asts[this.top - 1];
|
|
>(<TypeScript.UnaryExpression>this.asts[this.top - 2]).operand == this.asts[this.top - 1] : boolean
|
|
>(<TypeScript.UnaryExpression>this.asts[this.top - 2]).operand : any
|
|
>(<TypeScript.UnaryExpression>this.asts[this.top - 2]) : any
|
|
><TypeScript.UnaryExpression>this.asts[this.top - 2] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>operand : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
}
|
|
|
|
public isNameOfMemberOfObjectLit(): boolean {
|
|
>isNameOfMemberOfObjectLit : () => boolean
|
|
|
|
return this.count() >= 4 &&
|
|
>this.count() >= 4 && this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 2].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name && (<TypeScript.UnaryExpression>this.asts[this.top - 3]).operand == this.asts[this.top - 2] : boolean
|
|
>this.count() >= 4 && this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 2].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name : boolean
|
|
>this.count() >= 4 && this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 2].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member : boolean
|
|
>this.count() >= 4 && this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 2].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 4 && this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit : boolean
|
|
>this.count() >= 4 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>4 : 4
|
|
|
|
this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit &&
|
|
>this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit : boolean
|
|
>this.asts[this.top - 3].nodeType : any
|
|
>this.asts[this.top - 3] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 3 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>3 : 3
|
|
>nodeType : any
|
|
>TypeScript.NodeType.ObjectLit : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>ObjectLit : any
|
|
|
|
this.asts[this.top - 2].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 2].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 2].nodeType : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Member : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Member : any
|
|
|
|
this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name &&
|
|
>this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name : boolean
|
|
>this.asts[this.top - 0].nodeType : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Name : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Name : any
|
|
|
|
(<TypeScript.UnaryExpression>this.asts[this.top - 3]).operand == this.asts[this.top - 2];
|
|
>(<TypeScript.UnaryExpression>this.asts[this.top - 3]).operand == this.asts[this.top - 2] : boolean
|
|
>(<TypeScript.UnaryExpression>this.asts[this.top - 3]).operand : any
|
|
>(<TypeScript.UnaryExpression>this.asts[this.top - 3]) : any
|
|
><TypeScript.UnaryExpression>this.asts[this.top - 3] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 3] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 3 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>3 : 3
|
|
>operand : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
}
|
|
|
|
public isListOfArrayLit(): boolean {
|
|
>isListOfArrayLit : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && (<TypeScript.UnaryExpression>this.asts[this.top - 1]).operand == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.ArrayLit : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>ArrayLit : any
|
|
|
|
this.asts[this.top - 0].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 0].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 0].nodeType : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
(<TypeScript.UnaryExpression>this.asts[this.top - 1]).operand == this.asts[this.top - 0];
|
|
>(<TypeScript.UnaryExpression>this.asts[this.top - 1]).operand == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.UnaryExpression>this.asts[this.top - 1]).operand : any
|
|
>(<TypeScript.UnaryExpression>this.asts[this.top - 1]) : any
|
|
><TypeScript.UnaryExpression>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>operand : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isTargetOfMember(): boolean {
|
|
>isTargetOfMember : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && (<TypeScript.BinaryExpression>this.asts[this.top - 1]).operand1 === this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Member : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Member : any
|
|
|
|
(<TypeScript.BinaryExpression>this.asts[this.top - 1]).operand1 === this.asts[this.top - 0];
|
|
>(<TypeScript.BinaryExpression>this.asts[this.top - 1]).operand1 === this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.BinaryExpression>this.asts[this.top - 1]).operand1 : any
|
|
>(<TypeScript.BinaryExpression>this.asts[this.top - 1]) : any
|
|
><TypeScript.BinaryExpression>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>operand1 : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isMemberOfMember(): boolean {
|
|
>isMemberOfMember : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && (<TypeScript.BinaryExpression>this.asts[this.top - 1]).operand2 === this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Member : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Member : any
|
|
|
|
(<TypeScript.BinaryExpression>this.asts[this.top - 1]).operand2 === this.asts[this.top - 0];
|
|
>(<TypeScript.BinaryExpression>this.asts[this.top - 1]).operand2 === this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.BinaryExpression>this.asts[this.top - 1]).operand2 : any
|
|
>(<TypeScript.BinaryExpression>this.asts[this.top - 1]) : any
|
|
><TypeScript.BinaryExpression>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>operand2 : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isItemOfList(): boolean {
|
|
>isItemOfList : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List;
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
//(<Tools.ASTList>this.asts[this.top - 1]).operand2 === this.asts[this.top - 0];
|
|
}
|
|
|
|
public isThenOfIf(): boolean {
|
|
>isThenOfIf : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && (<TypeScript.IfStatement>this.asts[this.top - 1]).thenBod == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.If : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.If &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.If : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.If : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>If : any
|
|
|
|
(<TypeScript.IfStatement>this.asts[this.top - 1]).thenBod == this.asts[this.top - 0];
|
|
>(<TypeScript.IfStatement>this.asts[this.top - 1]).thenBod == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.IfStatement>this.asts[this.top - 1]).thenBod : any
|
|
>(<TypeScript.IfStatement>this.asts[this.top - 1]) : any
|
|
><TypeScript.IfStatement>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>thenBod : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isElseOfIf(): boolean {
|
|
>isElseOfIf : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && (<TypeScript.IfStatement>this.asts[this.top - 1]).elseBod == this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.If : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.If &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.If : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.If : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>If : any
|
|
|
|
(<TypeScript.IfStatement>this.asts[this.top - 1]).elseBod == this.asts[this.top - 0];
|
|
>(<TypeScript.IfStatement>this.asts[this.top - 1]).elseBod == this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.IfStatement>this.asts[this.top - 1]).elseBod : any
|
|
>(<TypeScript.IfStatement>this.asts[this.top - 1]) : any
|
|
><TypeScript.IfStatement>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>elseBod : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isBodyOfDefaultCase(): boolean {
|
|
>isBodyOfDefaultCase : () => boolean
|
|
|
|
return this.isBodyOfCase();
|
|
>this.isBodyOfCase() : boolean
|
|
>this.isBodyOfCase : () => boolean
|
|
>this : this
|
|
>isBodyOfCase : () => boolean
|
|
}
|
|
|
|
public isSingleStatementList(): boolean {
|
|
>isSingleStatementList : () => boolean
|
|
|
|
return this.count() >= 1 &&
|
|
>this.count() >= 1 && this.asts[this.top].nodeType === TypeScript.NodeType.List && (<TypeScript.ASTList>this.asts[this.top]).members.length === 1 : boolean
|
|
>this.count() >= 1 && this.asts[this.top].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 1 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>1 : 1
|
|
|
|
this.asts[this.top].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top].nodeType : any
|
|
>this.asts[this.top] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
(<TypeScript.ASTList>this.asts[this.top]).members.length === 1;
|
|
>(<TypeScript.ASTList>this.asts[this.top]).members.length === 1 : boolean
|
|
>(<TypeScript.ASTList>this.asts[this.top]).members.length : any
|
|
>(<TypeScript.ASTList>this.asts[this.top]).members : any
|
|
>(<TypeScript.ASTList>this.asts[this.top]) : any
|
|
><TypeScript.ASTList>this.asts[this.top] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>members : any
|
|
>length : any
|
|
>1 : 1
|
|
}
|
|
|
|
public isArgumentListOfFunction(): boolean {
|
|
>isArgumentListOfFunction : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && (<TypeScript.FuncDecl>this.asts[this.top - 1]).arguments === this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 0].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 0].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 0].nodeType : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.FuncDecl : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>FuncDecl : any
|
|
|
|
(<TypeScript.FuncDecl>this.asts[this.top - 1]).arguments === this.asts[this.top - 0];
|
|
>(<TypeScript.FuncDecl>this.asts[this.top - 1]).arguments === this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.FuncDecl>this.asts[this.top - 1]).arguments : any
|
|
>(<TypeScript.FuncDecl>this.asts[this.top - 1]) : any
|
|
><TypeScript.FuncDecl>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>arguments : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isArgumentOfFunction(): boolean {
|
|
>isArgumentOfFunction : () => boolean
|
|
|
|
return this.count() >= 3 &&
|
|
>this.count() >= 3 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && (<TypeScript.FuncDecl>this.asts[this.top - 2]).arguments === this.asts[this.top - 1] : boolean
|
|
>this.count() >= 3 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl : boolean
|
|
>this.count() >= 3 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 3 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>3 : 3
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl &&
|
|
>this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl : boolean
|
|
>this.asts[this.top - 2].nodeType : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>nodeType : any
|
|
>TypeScript.NodeType.FuncDecl : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>FuncDecl : any
|
|
|
|
(<TypeScript.FuncDecl>this.asts[this.top - 2]).arguments === this.asts[this.top - 1];
|
|
>(<TypeScript.FuncDecl>this.asts[this.top - 2]).arguments === this.asts[this.top - 1] : boolean
|
|
>(<TypeScript.FuncDecl>this.asts[this.top - 2]).arguments : any
|
|
>(<TypeScript.FuncDecl>this.asts[this.top - 2]) : any
|
|
><TypeScript.FuncDecl>this.asts[this.top - 2] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 2] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 2 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>2 : 2
|
|
>arguments : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
}
|
|
|
|
public isArgumentListOfCall(): boolean {
|
|
>isArgumentListOfCall : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call && (<TypeScript.CallExpression>this.asts[this.top - 1]).arguments === this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 0].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 0].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 0].nodeType : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Call : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Call : any
|
|
|
|
(<TypeScript.CallExpression>this.asts[this.top - 1]).arguments === this.asts[this.top - 0];
|
|
>(<TypeScript.CallExpression>this.asts[this.top - 1]).arguments === this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.CallExpression>this.asts[this.top - 1]).arguments : any
|
|
>(<TypeScript.CallExpression>this.asts[this.top - 1]) : any
|
|
><TypeScript.CallExpression>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>arguments : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isArgumentListOfNew(): boolean {
|
|
>isArgumentListOfNew : () => boolean
|
|
|
|
return this.count() >= 2 &&
|
|
>this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.New && (<TypeScript.CallExpression>this.asts[this.top - 1]).arguments === this.asts[this.top - 0] : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.New : boolean
|
|
>this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.count() >= 2 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>2 : 2
|
|
|
|
this.asts[this.top - 0].nodeType === TypeScript.NodeType.List &&
|
|
>this.asts[this.top - 0].nodeType === TypeScript.NodeType.List : boolean
|
|
>this.asts[this.top - 0].nodeType : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
>nodeType : any
|
|
>TypeScript.NodeType.List : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>List : any
|
|
|
|
this.asts[this.top - 1].nodeType === TypeScript.NodeType.New &&
|
|
>this.asts[this.top - 1].nodeType === TypeScript.NodeType.New : boolean
|
|
>this.asts[this.top - 1].nodeType : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>nodeType : any
|
|
>TypeScript.NodeType.New : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>New : any
|
|
|
|
(<TypeScript.CallExpression>this.asts[this.top - 1]).arguments === this.asts[this.top - 0];
|
|
>(<TypeScript.CallExpression>this.asts[this.top - 1]).arguments === this.asts[this.top - 0] : boolean
|
|
>(<TypeScript.CallExpression>this.asts[this.top - 1]).arguments : any
|
|
>(<TypeScript.CallExpression>this.asts[this.top - 1]) : any
|
|
><TypeScript.CallExpression>this.asts[this.top - 1] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 1] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 1 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>1 : 1
|
|
>arguments : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
}
|
|
|
|
public isSynthesizedBlock(): boolean {
|
|
>isSynthesizedBlock : () => boolean
|
|
|
|
return this.count() >= 1 &&
|
|
>this.count() >= 1 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block && (<TypeScript.Block>this.asts[this.top - 0]).isStatementBlock === false : boolean
|
|
>this.count() >= 1 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block : boolean
|
|
>this.count() >= 1 : boolean
|
|
>this.count() : number
|
|
>this.count : () => number
|
|
>this : this
|
|
>count : () => number
|
|
>1 : 1
|
|
|
|
this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block &&
|
|
>this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block : boolean
|
|
>this.asts[this.top - 0].nodeType : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Block : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Block : any
|
|
|
|
(<TypeScript.Block>this.asts[this.top - 0]).isStatementBlock === false;
|
|
>(<TypeScript.Block>this.asts[this.top - 0]).isStatementBlock === false : boolean
|
|
>(<TypeScript.Block>this.asts[this.top - 0]).isStatementBlock : any
|
|
>(<TypeScript.Block>this.asts[this.top - 0]) : any
|
|
><TypeScript.Block>this.asts[this.top - 0] : any
|
|
>TypeScript : any
|
|
>this.asts[this.top - 0] : any
|
|
>this.asts : any[]
|
|
>this : this
|
|
>asts : any[]
|
|
>this.top - 0 : number
|
|
>this.top : number
|
|
>this : this
|
|
>top : number
|
|
>0 : 0
|
|
>isStatementBlock : any
|
|
>false : false
|
|
}
|
|
}
|
|
|
|
export function isValidAstNode(ast: TypeScript.ASTSpan): boolean {
|
|
>isValidAstNode : (ast: any) => boolean
|
|
>ast : any
|
|
>TypeScript : any
|
|
|
|
if (ast === null)
|
|
>ast === null : boolean
|
|
>ast : any
|
|
>null : null
|
|
|
|
return false;
|
|
>false : false
|
|
|
|
if (ast.minChar === -1 || ast.limChar === -1)
|
|
>ast.minChar === -1 || ast.limChar === -1 : boolean
|
|
>ast.minChar === -1 : boolean
|
|
>ast.minChar : any
|
|
>ast : any
|
|
>minChar : any
|
|
>-1 : -1
|
|
>1 : 1
|
|
>ast.limChar === -1 : boolean
|
|
>ast.limChar : any
|
|
>ast : any
|
|
>limChar : any
|
|
>-1 : -1
|
|
>1 : 1
|
|
|
|
return false;
|
|
>false : false
|
|
|
|
return true;
|
|
>true : true
|
|
}
|
|
|
|
export class AstPathContext {
|
|
>AstPathContext : AstPathContext
|
|
|
|
public path = new TypeScript.AstPath();
|
|
>path : AstPath
|
|
>new TypeScript.AstPath() : AstPath
|
|
>TypeScript.AstPath : typeof AstPath
|
|
>TypeScript : typeof TypeScript
|
|
>AstPath : typeof AstPath
|
|
}
|
|
|
|
export enum GetAstPathOptions {
|
|
>GetAstPathOptions : GetAstPathOptions
|
|
|
|
Default = 0,
|
|
>Default : GetAstPathOptions
|
|
>0 : 0
|
|
|
|
EdgeInclusive = 1,
|
|
>EdgeInclusive : GetAstPathOptions
|
|
>1 : 1
|
|
|
|
//We need this options dealing with an AST coming from an incomplete AST. For example:
|
|
// class foo { // r
|
|
// If we ask for the AST at the position after the "r" character, we won't see we are
|
|
// inside a comment, because the "class" AST node has a limChar corresponding to the position of
|
|
// the "{" character, meaning we don't traverse the tree down to the stmt list of the class, meaning
|
|
// we don't find the "precomment" attached to the errorneous empty stmt.
|
|
//TODO: It would be nice to be able to get rid of this.
|
|
DontPruneSearchBasedOnPosition = 1 << 1,
|
|
>DontPruneSearchBasedOnPosition : GetAstPathOptions
|
|
>1 << 1 : number
|
|
>1 : 1
|
|
>1 : 1
|
|
}
|
|
|
|
///
|
|
/// Return the stack of AST nodes containing "position"
|
|
///
|
|
export function getAstPathToPosition(script: TypeScript.AST, pos: number, options = GetAstPathOptions.Default): TypeScript.AstPath {
|
|
>getAstPathToPosition : (script: any, pos: number, options?: GetAstPathOptions) => TypeScript.AstPath
|
|
>script : any
|
|
>TypeScript : any
|
|
>pos : number
|
|
>options : GetAstPathOptions
|
|
>GetAstPathOptions.Default : GetAstPathOptions
|
|
>GetAstPathOptions : typeof GetAstPathOptions
|
|
>Default : GetAstPathOptions
|
|
>TypeScript : any
|
|
|
|
var lookInComments = (comments: TypeScript.Comment[]) => {
|
|
>lookInComments : (comments: TypeScript.Comment[]) => void
|
|
>(comments: TypeScript.Comment[]) => { if (comments && comments.length > 0) { for (var i = 0; i < comments.length; i++) { var minChar = comments[i].minChar; var limChar = comments[i].limChar; if (!comments[i].isBlockComment) { limChar++; // For single line comments, include 1 more character (for the newline) } if (pos >= minChar && pos < limChar) { ctx.path.push(comments[i]); } } } } : (comments: TypeScript.Comment[]) => void
|
|
>comments : any[]
|
|
>TypeScript : any
|
|
|
|
if (comments && comments.length > 0) {
|
|
>comments && comments.length > 0 : boolean
|
|
>comments : any[]
|
|
>comments.length > 0 : boolean
|
|
>comments.length : number
|
|
>comments : any[]
|
|
>length : number
|
|
>0 : 0
|
|
|
|
for (var i = 0; i < comments.length; i++) {
|
|
>i : number
|
|
>0 : 0
|
|
>i < comments.length : boolean
|
|
>i : number
|
|
>comments.length : number
|
|
>comments : any[]
|
|
>length : number
|
|
>i++ : number
|
|
>i : number
|
|
|
|
var minChar = comments[i].minChar;
|
|
>minChar : any
|
|
>comments[i].minChar : any
|
|
>comments[i] : any
|
|
>comments : any[]
|
|
>i : number
|
|
>minChar : any
|
|
|
|
var limChar = comments[i].limChar;
|
|
>limChar : any
|
|
>comments[i].limChar : any
|
|
>comments[i] : any
|
|
>comments : any[]
|
|
>i : number
|
|
>limChar : any
|
|
|
|
if (!comments[i].isBlockComment) {
|
|
>!comments[i].isBlockComment : boolean
|
|
>comments[i].isBlockComment : any
|
|
>comments[i] : any
|
|
>comments : any[]
|
|
>i : number
|
|
>isBlockComment : any
|
|
|
|
limChar++; // For single line comments, include 1 more character (for the newline)
|
|
>limChar++ : number
|
|
>limChar : any
|
|
}
|
|
if (pos >= minChar && pos < limChar) {
|
|
>pos >= minChar && pos < limChar : boolean
|
|
>pos >= minChar : boolean
|
|
>pos : number
|
|
>minChar : any
|
|
>pos < limChar : boolean
|
|
>pos : number
|
|
>limChar : any
|
|
|
|
ctx.path.push(comments[i]);
|
|
>ctx.path.push(comments[i]) : void
|
|
>ctx.path.push : (ast: any) => void
|
|
>ctx.path : AstPath
|
|
>ctx : AstPathContext
|
|
>path : AstPath
|
|
>push : (ast: any) => void
|
|
>comments[i] : any
|
|
>comments : any[]
|
|
>i : number
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: IAstWalker) {
|
|
>pre : (cur: any, parent: any, walker: any) => any
|
|
>function (cur: TypeScript.AST, parent: TypeScript.AST, walker: IAstWalker) { if (isValidAstNode(cur)) { // Add "cur" to the stack if it contains our position // For "identifier" nodes, we need a special case: A position equal to "limChar" is // valid, since the position corresponds to a caret position (in between characters) // For example: // bar // 0123 // If "position == 3", the caret is at the "right" of the "r" character, which should be considered valid var inclusive = hasFlag(options, GetAstPathOptions.EdgeInclusive) || cur.nodeType === TypeScript.NodeType.Name || pos === script.limChar; // Special "EOF" case var minChar = cur.minChar; var limChar = cur.limChar + (inclusive ? 1 : 0) if (pos >= minChar && pos < limChar) { // TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better // than top of the stack. var previous = ctx.path.ast(); if (previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar)) { ctx.path.push(cur); } else { //logger.log("TODO: Ignoring node because minChar, limChar not better than previous node in stack"); } } // The AST walker skips comments, but we might be in one, so check the pre/post comments for this node manually if (pos < limChar) { lookInComments(cur.preComments); } if (pos >= minChar) { lookInComments(cur.postComments); } if (!hasFlag(options, GetAstPathOptions.DontPruneSearchBasedOnPosition)) { // Don't go further down the tree if pos is outside of [minChar, limChar] walker.options.goChildren = (minChar <= pos && pos <= limChar); } } return cur; } : (cur: any, parent: any, walker: any) => any
|
|
>cur : any
|
|
>TypeScript : any
|
|
>parent : any
|
|
>TypeScript : any
|
|
>walker : any
|
|
|
|
if (isValidAstNode(cur)) {
|
|
>isValidAstNode(cur) : boolean
|
|
>isValidAstNode : (ast: any) => boolean
|
|
>cur : any
|
|
|
|
// Add "cur" to the stack if it contains our position
|
|
// For "identifier" nodes, we need a special case: A position equal to "limChar" is
|
|
// valid, since the position corresponds to a caret position (in between characters)
|
|
// For example:
|
|
// bar
|
|
// 0123
|
|
// If "position == 3", the caret is at the "right" of the "r" character, which should be considered valid
|
|
var inclusive =
|
|
>inclusive : any
|
|
|
|
hasFlag(options, GetAstPathOptions.EdgeInclusive) ||
|
|
>hasFlag(options, GetAstPathOptions.EdgeInclusive) || cur.nodeType === TypeScript.NodeType.Name || pos === script.limChar : any
|
|
>hasFlag(options, GetAstPathOptions.EdgeInclusive) || cur.nodeType === TypeScript.NodeType.Name : any
|
|
>hasFlag(options, GetAstPathOptions.EdgeInclusive) : any
|
|
>hasFlag : any
|
|
>options : GetAstPathOptions
|
|
>GetAstPathOptions.EdgeInclusive : GetAstPathOptions
|
|
>GetAstPathOptions : typeof GetAstPathOptions
|
|
>EdgeInclusive : GetAstPathOptions
|
|
|
|
cur.nodeType === TypeScript.NodeType.Name ||
|
|
>cur.nodeType === TypeScript.NodeType.Name : boolean
|
|
>cur.nodeType : any
|
|
>cur : any
|
|
>nodeType : any
|
|
>TypeScript.NodeType.Name : any
|
|
>TypeScript.NodeType : any
|
|
>TypeScript : typeof TypeScript
|
|
>NodeType : any
|
|
>Name : any
|
|
|
|
pos === script.limChar; // Special "EOF" case
|
|
>pos === script.limChar : boolean
|
|
>pos : number
|
|
>script.limChar : any
|
|
>script : any
|
|
>limChar : any
|
|
|
|
var minChar = cur.minChar;
|
|
>minChar : any
|
|
>cur.minChar : any
|
|
>cur : any
|
|
>minChar : any
|
|
|
|
var limChar = cur.limChar + (inclusive ? 1 : 0)
|
|
>limChar : any
|
|
>cur.limChar + (inclusive ? 1 : 0) : any
|
|
>cur.limChar : any
|
|
>cur : any
|
|
>limChar : any
|
|
>(inclusive ? 1 : 0) : 0 | 1
|
|
>inclusive ? 1 : 0 : 0 | 1
|
|
>inclusive : any
|
|
>1 : 1
|
|
>0 : 0
|
|
|
|
if (pos >= minChar && pos < limChar) {
|
|
>pos >= minChar && pos < limChar : boolean
|
|
>pos >= minChar : boolean
|
|
>pos : number
|
|
>minChar : any
|
|
>pos < limChar : boolean
|
|
>pos : number
|
|
>limChar : any
|
|
|
|
// TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better
|
|
// than top of the stack.
|
|
var previous = ctx.path.ast();
|
|
>previous : any
|
|
>ctx.path.ast() : any
|
|
>ctx.path.ast : () => any
|
|
>ctx.path : AstPath
|
|
>ctx : AstPathContext
|
|
>path : AstPath
|
|
>ast : () => any
|
|
|
|
if (previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar)) {
|
|
>previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar) : boolean
|
|
>previous == null : boolean
|
|
>previous : any
|
|
>null : null
|
|
>(cur.minChar >= previous.minChar && cur.limChar <= previous.limChar) : boolean
|
|
>cur.minChar >= previous.minChar && cur.limChar <= previous.limChar : boolean
|
|
>cur.minChar >= previous.minChar : boolean
|
|
>cur.minChar : any
|
|
>cur : any
|
|
>minChar : any
|
|
>previous.minChar : any
|
|
>previous : any
|
|
>minChar : any
|
|
>cur.limChar <= previous.limChar : boolean
|
|
>cur.limChar : any
|
|
>cur : any
|
|
>limChar : any
|
|
>previous.limChar : any
|
|
>previous : any
|
|
>limChar : any
|
|
|
|
ctx.path.push(cur);
|
|
>ctx.path.push(cur) : void
|
|
>ctx.path.push : (ast: any) => void
|
|
>ctx.path : AstPath
|
|
>ctx : AstPathContext
|
|
>path : AstPath
|
|
>push : (ast: any) => void
|
|
>cur : any
|
|
}
|
|
else {
|
|
//logger.log("TODO: Ignoring node because minChar, limChar not better than previous node in stack");
|
|
}
|
|
}
|
|
|
|
// The AST walker skips comments, but we might be in one, so check the pre/post comments for this node manually
|
|
if (pos < limChar) {
|
|
>pos < limChar : boolean
|
|
>pos : number
|
|
>limChar : any
|
|
|
|
lookInComments(cur.preComments);
|
|
>lookInComments(cur.preComments) : void
|
|
>lookInComments : (comments: any[]) => void
|
|
>cur.preComments : any
|
|
>cur : any
|
|
>preComments : any
|
|
}
|
|
if (pos >= minChar) {
|
|
>pos >= minChar : boolean
|
|
>pos : number
|
|
>minChar : any
|
|
|
|
lookInComments(cur.postComments);
|
|
>lookInComments(cur.postComments) : void
|
|
>lookInComments : (comments: any[]) => void
|
|
>cur.postComments : any
|
|
>cur : any
|
|
>postComments : any
|
|
}
|
|
|
|
if (!hasFlag(options, GetAstPathOptions.DontPruneSearchBasedOnPosition)) {
|
|
>!hasFlag(options, GetAstPathOptions.DontPruneSearchBasedOnPosition) : boolean
|
|
>hasFlag(options, GetAstPathOptions.DontPruneSearchBasedOnPosition) : any
|
|
>hasFlag : any
|
|
>options : GetAstPathOptions
|
|
>GetAstPathOptions.DontPruneSearchBasedOnPosition : GetAstPathOptions
|
|
>GetAstPathOptions : typeof GetAstPathOptions
|
|
>DontPruneSearchBasedOnPosition : GetAstPathOptions
|
|
|
|
// Don't go further down the tree if pos is outside of [minChar, limChar]
|
|
walker.options.goChildren = (minChar <= pos && pos <= limChar);
|
|
>walker.options.goChildren = (minChar <= pos && pos <= limChar) : boolean
|
|
>walker.options.goChildren : any
|
|
>walker.options : any
|
|
>walker : any
|
|
>options : any
|
|
>goChildren : any
|
|
>(minChar <= pos && pos <= limChar) : boolean
|
|
>minChar <= pos && pos <= limChar : boolean
|
|
>minChar <= pos : boolean
|
|
>minChar : any
|
|
>pos : number
|
|
>pos <= limChar : boolean
|
|
>pos : number
|
|
>limChar : any
|
|
}
|
|
}
|
|
return cur;
|
|
>cur : any
|
|
}
|
|
|
|
var ctx = new AstPathContext();
|
|
>ctx : AstPathContext
|
|
>new AstPathContext() : AstPathContext
|
|
>AstPathContext : typeof AstPathContext
|
|
|
|
TypeScript.getAstWalkerFactory().walk(script, pre, null, null, ctx);
|
|
>TypeScript.getAstWalkerFactory().walk(script, pre, null, null, ctx) : any
|
|
>TypeScript.getAstWalkerFactory().walk : any
|
|
>TypeScript.getAstWalkerFactory() : any
|
|
>TypeScript.getAstWalkerFactory : any
|
|
>TypeScript : typeof TypeScript
|
|
>getAstWalkerFactory : any
|
|
>walk : any
|
|
>script : any
|
|
>pre : (cur: any, parent: any, walker: any) => any
|
|
>null : null
|
|
>null : null
|
|
>ctx : AstPathContext
|
|
|
|
return ctx.path;
|
|
>ctx.path : AstPath
|
|
>ctx : AstPathContext
|
|
>path : AstPath
|
|
}
|
|
|
|
//
|
|
// Find a source text offset that is safe for lexing tokens at the given position.
|
|
// This is used when "position" might be inside a comment or string, etc.
|
|
//
|
|
export function getTokenizationOffset(script: TypeScript.Script, position: number): number {
|
|
>getTokenizationOffset : (script: any, position: number) => number
|
|
>script : any
|
|
>TypeScript : any
|
|
>position : number
|
|
|
|
var bestOffset = 0;
|
|
>bestOffset : number
|
|
>0 : 0
|
|
|
|
var pre = (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker): TypeScript.AST => {
|
|
>pre : (cur: any, parent: any, walker: any) => any
|
|
>(cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker): TypeScript.AST => { if (TypeScript.isValidAstNode(cur)) { // Did we find a closer offset? if (cur.minChar <= position) { bestOffset = max(bestOffset, cur.minChar); } // Stop the walk if this node is not related to "minChar" if (cur.minChar > position || cur.limChar < bestOffset) { walker.options.goChildren = false; } } return cur; } : (cur: any, parent: any, walker: any) => any
|
|
>cur : any
|
|
>TypeScript : any
|
|
>parent : any
|
|
>TypeScript : any
|
|
>walker : any
|
|
>TypeScript : any
|
|
>TypeScript : any
|
|
|
|
if (TypeScript.isValidAstNode(cur)) {
|
|
>TypeScript.isValidAstNode(cur) : boolean
|
|
>TypeScript.isValidAstNode : (ast: any) => boolean
|
|
>TypeScript : typeof TypeScript
|
|
>isValidAstNode : (ast: any) => boolean
|
|
>cur : any
|
|
|
|
// Did we find a closer offset?
|
|
if (cur.minChar <= position) {
|
|
>cur.minChar <= position : boolean
|
|
>cur.minChar : any
|
|
>cur : any
|
|
>minChar : any
|
|
>position : number
|
|
|
|
bestOffset = max(bestOffset, cur.minChar);
|
|
>bestOffset = max(bestOffset, cur.minChar) : number
|
|
>bestOffset : number
|
|
>max(bestOffset, cur.minChar) : number
|
|
>max : (a: number, b: number) => number
|
|
>bestOffset : number
|
|
>cur.minChar : any
|
|
>cur : any
|
|
>minChar : any
|
|
}
|
|
|
|
// Stop the walk if this node is not related to "minChar"
|
|
if (cur.minChar > position || cur.limChar < bestOffset) {
|
|
>cur.minChar > position || cur.limChar < bestOffset : boolean
|
|
>cur.minChar > position : boolean
|
|
>cur.minChar : any
|
|
>cur : any
|
|
>minChar : any
|
|
>position : number
|
|
>cur.limChar < bestOffset : boolean
|
|
>cur.limChar : any
|
|
>cur : any
|
|
>limChar : any
|
|
>bestOffset : number
|
|
|
|
walker.options.goChildren = false;
|
|
>walker.options.goChildren = false : false
|
|
>walker.options.goChildren : any
|
|
>walker.options : any
|
|
>walker : any
|
|
>options : any
|
|
>goChildren : any
|
|
>false : false
|
|
}
|
|
}
|
|
|
|
return cur;
|
|
>cur : any
|
|
}
|
|
|
|
TypeScript.getAstWalkerFactory().walk(script, pre);
|
|
>TypeScript.getAstWalkerFactory().walk(script, pre) : any
|
|
>TypeScript.getAstWalkerFactory().walk : any
|
|
>TypeScript.getAstWalkerFactory() : any
|
|
>TypeScript.getAstWalkerFactory : any
|
|
>TypeScript : typeof TypeScript
|
|
>getAstWalkerFactory : any
|
|
>walk : any
|
|
>script : any
|
|
>pre : (cur: any, parent: any, walker: any) => any
|
|
|
|
return bestOffset;
|
|
>bestOffset : number
|
|
}
|
|
|
|
///
|
|
/// Simple function to Walk an AST using a simple callback function.
|
|
///
|
|
export function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void ): void {
|
|
>walkAST : (ast: any, callback: (path: AstPath, walker: any) => void) => void
|
|
>ast : any
|
|
>TypeScript : any
|
|
>callback : (path: AstPath, walker: any) => void
|
|
>path : AstPath
|
|
>walker : any
|
|
>TypeScript : any
|
|
|
|
var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) {
|
|
>pre : (cur: any, parent: any, walker: any) => any
|
|
>function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { var path: TypeScript.AstPath = walker.state; path.push(cur); callback(path, walker); return cur; } : (cur: any, parent: any, walker: any) => any
|
|
>cur : any
|
|
>TypeScript : any
|
|
>parent : any
|
|
>TypeScript : any
|
|
>walker : any
|
|
>TypeScript : any
|
|
|
|
var path: TypeScript.AstPath = walker.state;
|
|
>path : AstPath
|
|
>TypeScript : any
|
|
>walker.state : any
|
|
>walker : any
|
|
>state : any
|
|
|
|
path.push(cur);
|
|
>path.push(cur) : void
|
|
>path.push : (ast: any) => void
|
|
>path : AstPath
|
|
>push : (ast: any) => void
|
|
>cur : any
|
|
|
|
callback(path, walker);
|
|
>callback(path, walker) : void
|
|
>callback : (path: AstPath, walker: any) => void
|
|
>path : AstPath
|
|
>walker : any
|
|
|
|
return cur;
|
|
>cur : any
|
|
}
|
|
var post = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) {
|
|
>post : (cur: any, parent: any, walker: any) => any
|
|
>function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { var path: TypeScript.AstPath = walker.state; path.pop(); return cur; } : (cur: any, parent: any, walker: any) => any
|
|
>cur : any
|
|
>TypeScript : any
|
|
>parent : any
|
|
>TypeScript : any
|
|
>walker : any
|
|
>TypeScript : any
|
|
|
|
var path: TypeScript.AstPath = walker.state;
|
|
>path : AstPath
|
|
>TypeScript : any
|
|
>walker.state : any
|
|
>walker : any
|
|
>state : any
|
|
|
|
path.pop();
|
|
>path.pop() : any
|
|
>path.pop : () => any
|
|
>path : AstPath
|
|
>pop : () => any
|
|
|
|
return cur;
|
|
>cur : any
|
|
}
|
|
|
|
var path = new AstPath();
|
|
>path : AstPath
|
|
>new AstPath() : AstPath
|
|
>AstPath : typeof AstPath
|
|
|
|
TypeScript.getAstWalkerFactory().walk(ast, pre, post, null, path);
|
|
>TypeScript.getAstWalkerFactory().walk(ast, pre, post, null, path) : any
|
|
>TypeScript.getAstWalkerFactory().walk : any
|
|
>TypeScript.getAstWalkerFactory() : any
|
|
>TypeScript.getAstWalkerFactory : any
|
|
>TypeScript : typeof TypeScript
|
|
>getAstWalkerFactory : any
|
|
>walk : any
|
|
>ast : any
|
|
>pre : (cur: any, parent: any, walker: any) => any
|
|
>post : (cur: any, parent: any, walker: any) => any
|
|
>null : null
|
|
>path : AstPath
|
|
}
|
|
}
|
|
|