Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9367,7 +9367,7 @@ module ts {
}

if (node.condition) checkExpression(node.condition);
if (node.iterator) checkExpression(node.iterator);
if (node.incrementor) checkExpression(node.incrementor);
checkSourceElement(node.statement);
}

Expand Down
2 changes: 1 addition & 1 deletion src/compiler/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/services/breakpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down