Skip to content

Commit

Permalink
Update Token.arity to include FOR_IN
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159139093
  • Loading branch information
tbreisacher committed Jun 16, 2017
1 parent 63a9bd5 commit 7df8330
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/AstValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ private void validateFor(Node n) {

private void validateForIn(Node n) {
validateNodeType(Token.FOR_IN, n);
validateChildCount(n, 3);
validateChildCount(n);
validateVarOrAssignmentTarget(n.getFirstChild());
validateExpression(n.getSecondChild());
validateBlock(n.getLastChild());
Expand Down
1 change: 1 addition & 0 deletions src/com/google/javascript/rhino/Token.java
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ public static int arity(Token token) {
case WITH:
return 2;
case CLASS:
case FOR_IN:
case FOR_OF:
case FUNCTION:
case HOOK:
Expand Down

0 comments on commit 7df8330

Please sign in to comment.