Removing commented out code.

This commit is contained in:
Cyrus Najmabadi 2014-10-30 14:06:35 -07:00
parent f0ea98f5b2
commit 84f0348420
3 changed files with 2 additions and 64 deletions

View File

@ -16,7 +16,7 @@
///<reference path='formatting.ts' />
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();

View File

@ -1,21 +0,0 @@
///<reference path='references.ts' />
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--;
// }
// }
//}
}

View File

@ -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(<ISyntaxToken>nodeOrToken);\r\n" +
//" }\r\n" +
//" else {\r\n" +
//" this.visitNode(<ISyntaxNode>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";
//}
}
}