diff --git a/src/services/formatting/indentationTrackingWalker.ts b/src/services/formatting/indentationTrackingWalker.ts index 9e9c9e43a64..2863b2e4fcc 100644 --- a/src/services/formatting/indentationTrackingWalker.ts +++ b/src/services/formatting/indentationTrackingWalker.ts @@ -16,7 +16,7 @@ /// module TypeScript.Services.Formatting { - export class IndentationTrackingWalker /*extends SyntaxWalker*/ { + export class IndentationTrackingWalker { private _position: number = 0; private _parent: IndentationNodeContext = null; private _textSpan: TextSpan; @@ -26,8 +26,6 @@ module TypeScript.Services.Formatting { private _text: ISimpleText; constructor(textSpan: TextSpan, sourceUnit: SourceUnitSyntax, snapshot: ITextSnapshot, indentFirstToken: boolean, public options: FormattingOptions) { - // super(); - // Create a pool object to manage context nodes while walking the tree this._indentationNodeContextPool = new IndentationNodeContextPool(); diff --git a/src/services/syntax/depthLimitedWalker.ts b/src/services/syntax/depthLimitedWalker.ts index c697ed42495..e69de29bb2d 100644 --- a/src/services/syntax/depthLimitedWalker.ts +++ b/src/services/syntax/depthLimitedWalker.ts @@ -1,21 +0,0 @@ -/// - -module TypeScript { - //export class DepthLimitedWalker extends SyntaxWalker { - // private _depth: number = 0; - // private _maximumDepth: number = 0; - - // constructor(maximumDepth: number) { - // super(); - // this._maximumDepth = maximumDepth; - // } - - // public visitNode(node: ISyntaxNode): void { - // if (this._depth < this._maximumDepth) { - // this._depth++; - // super.visitNode(node); - // this._depth--; - // } - // } - //} -} \ No newline at end of file diff --git a/src/services/syntax/syntaxGenerator.ts b/src/services/syntax/syntaxGenerator.ts index 5c28954a1c2..c1839074167 100644 --- a/src/services/syntax/syntaxGenerator.ts +++ b/src/services/syntax/syntaxGenerator.ts @@ -2311,19 +2311,6 @@ function generateWalker(): string { " export class SyntaxWalker implements ISyntaxVisitor {\r\n" + " public visitToken(token: ISyntaxToken): void {\r\n" + " }\r\n" + -//"\r\n" + -//" public visitNode(node: ISyntaxNode): void {\r\n" + -//" visitNodeOrToken(this, node);\r\n" + -//" }\r\n" + -//"\r\n" + -//" public visitNodeOrToken(nodeOrToken: ISyntaxNodeOrToken): void {\r\n" + -//" if (isToken(nodeOrToken)) { \r\n" + -//" this.visitToken(nodeOrToken);\r\n" + -//" }\r\n" + -//" else {\r\n" + -//" this.visitNode(nodeOrToken);\r\n" + -//" }\r\n" + -//" }\r\n" + "\r\n" + " private visitOptionalToken(token: ISyntaxToken): void {\r\n" + " if (token === undefined) {\r\n" + @@ -2332,22 +2319,6 @@ function generateWalker(): string { "\r\n" + " this.visitToken(token);\r\n" + " }\r\n" + -//"\r\n" + -//" public visitOptionalNode(node: ISyntaxNode): void {\r\n" + -//" if (node === undefined) {\r\n" + -//" return;\r\n" + -//" }\r\n" + -//"\r\n" + -//" this.visitNode(node);\r\n" + -//" }\r\n" + -//"\r\n" + -//" public visitOptionalNodeOrToken(nodeOrToken: ISyntaxNodeOrToken): void {\r\n" + -//" if (nodeOrToken === undefined) {\r\n" + -//" return;\r\n" + -//" }\r\n" + -//"\r\n" + -//" this.visitNodeOrToken(nodeOrToken);\r\n" + -//" }\r\n" + "\r\n" + " public visitList(list: ISyntaxNodeOrToken[]): void {\r\n" + " for (var i = 0, n = list.length; i < n; i++) {\r\n" + @@ -2386,20 +2357,10 @@ function generateWalker(): string { result += " this.visitSeparatedList(node." + child.name + ");\r\n"; } else if (isNodeOrToken(child)) { - //if (child.isOptional) { - result += " visitNodeOrToken(this, node." + child.name + ");\r\n"; - //} - //else { - // result += " this.visitNodeOrToken(node." + child.name + ");\r\n"; - //} + result += " visitNodeOrToken(this, node." + child.name + ");\r\n"; } else if (child.type !== "SyntaxKind") { - //if (child.isOptional) { result += " visitNodeOrToken(this, node." + child.name + ");\r\n"; - //} - //else { - // result += " this.visitNode(node." + child.name + ");\r\n"; - //} } }