Merge pull request #2875 from Microsoft/incrementor

Rename iterator property of ForStatement to incrementor
This commit is contained in:
Jason Freeman 2015-04-22 15:07:09 -07:00
commit 60afbc1334
6 changed files with 8 additions and 8 deletions

View File

@ -9349,7 +9349,7 @@ module ts {
}
if (node.condition) checkExpression(node.condition);
if (node.iterator) checkExpression(node.iterator);
if (node.incrementor) checkExpression(node.incrementor);
checkSourceElement(node.statement);
}

View File

@ -2138,7 +2138,7 @@ var __param = this.__param || function(index, decorator) { return function (targ
write(";");
emitOptional(" ", node.condition);
write(";");
emitOptional(" ", node.iterator);
emitOptional(" ", node.incrementor);
write(")");
emitEmbeddedStatement(node.statement);
}

View File

@ -194,7 +194,7 @@ module ts {
case SyntaxKind.ForStatement:
return visitNode(cbNode, (<ForStatement>node).initializer) ||
visitNode(cbNode, (<ForStatement>node).condition) ||
visitNode(cbNode, (<ForStatement>node).iterator) ||
visitNode(cbNode, (<ForStatement>node).incrementor) ||
visitNode(cbNode, (<ForStatement>node).statement);
case SyntaxKind.ForInStatement:
return visitNode(cbNode, (<ForInStatement>node).initializer) ||
@ -3497,7 +3497,7 @@ module ts {
}
parseExpected(SyntaxKind.SemicolonToken);
if (token !== SyntaxKind.CloseParenToken) {
forStatement.iterator = allowInAnd(parseExpression);
forStatement.incrementor = allowInAnd(parseExpression);
}
parseExpected(SyntaxKind.CloseParenToken);
forOrForInOrForOfStatement = forStatement;

View File

@ -795,7 +795,7 @@ module ts {
export interface ForStatement extends IterationStatement {
initializer?: VariableDeclarationList | Expression;
condition?: Expression;
iterator?: Expression;
incrementor?: Expression;
}
export interface ForInStatement extends IterationStatement {

View File

@ -775,7 +775,7 @@ module ts {
let forStatement = <ForStatement>parent;
return (forStatement.initializer === node && forStatement.initializer.kind !== SyntaxKind.VariableDeclarationList) ||
forStatement.condition === node ||
forStatement.iterator === node;
forStatement.incrementor === node;
case SyntaxKind.ForInStatement:
case SyntaxKind.ForOfStatement:
let forInStatement = <ForInStatement | ForOfStatement>parent;

View File

@ -401,8 +401,8 @@ module ts.BreakpointResolver {
if (forStatement.condition) {
return textSpan(forStatement.condition);
}
if (forStatement.iterator) {
return textSpan(forStatement.iterator);
if (forStatement.incrementor) {
return textSpan(forStatement.incrementor);
}
}