Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Don't add 'await' property to ForInStatement #504

Merged
merged 1 commit into from May 2, 2017
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/parser/statement.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,9 @@ export default class StatementParser extends ExpressionParser {
} else {
this.next();
}
node.await = !!forAwait;
if (type === "ForOfStatement") {
node.await = !!forAwait;
}
node.left = init;
node.right = this.parseExpression();
this.expect(tt.parenR);
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/core/uncategorised/246/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"column": 26
}
},
"await": false,
"left": {
"type": "Identifier",
"start": 4,
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/core/uncategorised/247/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"column": 31
}
},
"await": false,
"left": {
"type": "VariableDeclaration",
"start": 5,
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/core/uncategorised/532/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"column": 31
}
},
"await": false,
"left": {
"type": "VariableDeclaration",
"start": 5,
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/es2015/uncategorised/310/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"column": 21
}
},
"await": false,
"left": {
"type": "ObjectPattern",
"start": 5,
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/es2015/uncategorised/323/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"column": 33
}
},
"await": false,
"left": {
"type": "VariableDeclaration",
"start": 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"column": 18
}
},
"await": false,
"left": {
"type": "VariableDeclaration",
"start": 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"column": 33
}
},
"await": false,
"left": {
"type": "VariableDeclaration",
"start": 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"column": 26
}
},
"await": false,
"left": {
"type": "Identifier",
"start": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"column": 31
}
},
"await": false,
"left": {
"type": "VariableDeclaration",
"start": 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"column": 31
}
},
"await": false,
"left": {
"type": "VariableDeclaration",
"start": 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"column": 21
}
},
"await": false,
"left": {
"type": "MemberExpression",
"start": 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"column": 24
}
},
"await": false,
"left": {
"type": "MemberExpression",
"start": 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"column": 16
}
},
"await": false,
"left": {
"type": "MemberExpression",
"start": 5,
Expand Down