Refactor await/yield production parameter tracking (#10956)
* test: add test fixtures * refactor: track AWAIT and YIELD in separate handler * fix flow errors * add flow type annotation to production-parameter * address review comments * refactor: track [Return] parameter
This commit is contained in:
@@ -60,7 +60,7 @@ tt.name.updateContext = function(prevType) {
|
||||
if (prevType !== tt.dot) {
|
||||
if (
|
||||
(this.state.value === "of" && !this.state.exprAllowed) ||
|
||||
(this.state.value === "yield" && this.scope.inGenerator)
|
||||
(this.state.value === "yield" && this.prodParam.hasYield)
|
||||
) {
|
||||
allowed = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user