Skip to content

Commit 60afbc1

Browse files
committed
Merge pull request #2875 from Microsoft/incrementor
Rename iterator property of ForStatement to incrementor
2 parents aae129f + 4487fa4 commit 60afbc1

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9349,7 +9349,7 @@ module ts {
93499349
}
93509350

93519351
if (node.condition) checkExpression(node.condition);
9352-
if (node.iterator) checkExpression(node.iterator);
9352+
if (node.incrementor) checkExpression(node.incrementor);
93539353
checkSourceElement(node.statement);
93549354
}
93559355

src/compiler/emitter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2138,7 +2138,7 @@ var __param = this.__param || function(index, decorator) { return function (targ
21382138
write(";");
21392139
emitOptional(" ", node.condition);
21402140
write(";");
2141-
emitOptional(" ", node.iterator);
2141+
emitOptional(" ", node.incrementor);
21422142
write(")");
21432143
emitEmbeddedStatement(node.statement);
21442144
}

src/compiler/parser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ module ts {
194194
case SyntaxKind.ForStatement:
195195
return visitNode(cbNode, (<ForStatement>node).initializer) ||
196196
visitNode(cbNode, (<ForStatement>node).condition) ||
197-
visitNode(cbNode, (<ForStatement>node).iterator) ||
197+
visitNode(cbNode, (<ForStatement>node).incrementor) ||
198198
visitNode(cbNode, (<ForStatement>node).statement);
199199
case SyntaxKind.ForInStatement:
200200
return visitNode(cbNode, (<ForInStatement>node).initializer) ||
@@ -3497,7 +3497,7 @@ module ts {
34973497
}
34983498
parseExpected(SyntaxKind.SemicolonToken);
34993499
if (token !== SyntaxKind.CloseParenToken) {
3500-
forStatement.iterator = allowInAnd(parseExpression);
3500+
forStatement.incrementor = allowInAnd(parseExpression);
35013501
}
35023502
parseExpected(SyntaxKind.CloseParenToken);
35033503
forOrForInOrForOfStatement = forStatement;

src/compiler/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ module ts {
795795
export interface ForStatement extends IterationStatement {
796796
initializer?: VariableDeclarationList | Expression;
797797
condition?: Expression;
798-
iterator?: Expression;
798+
incrementor?: Expression;
799799
}
800800

801801
export interface ForInStatement extends IterationStatement {

src/compiler/utilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ module ts {
775775
let forStatement = <ForStatement>parent;
776776
return (forStatement.initializer === node && forStatement.initializer.kind !== SyntaxKind.VariableDeclarationList) ||
777777
forStatement.condition === node ||
778-
forStatement.iterator === node;
778+
forStatement.incrementor === node;
779779
case SyntaxKind.ForInStatement:
780780
case SyntaxKind.ForOfStatement:
781781
let forInStatement = <ForInStatement | ForOfStatement>parent;

src/services/breakpoints.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ module ts.BreakpointResolver {
401401
if (forStatement.condition) {
402402
return textSpan(forStatement.condition);
403403
}
404-
if (forStatement.iterator) {
405-
return textSpan(forStatement.iterator);
404+
if (forStatement.incrementor) {
405+
return textSpan(forStatement.incrementor);
406406
}
407407
}
408408

0 commit comments

Comments
 (0)