mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
Merge pull request #2875 from Microsoft/incrementor
Rename iterator property of ForStatement to incrementor
This commit is contained in:
commit
60afbc1334
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user