add parenthesis around sequence in yield (#2833)

fixes #2832
This commit is contained in:
Alex Lam S.L
2018-01-22 14:57:23 +08:00
committed by GitHub
parent c7c7960b5f
commit bc01a85ba0
2 changed files with 41 additions and 0 deletions

View File

@@ -772,6 +772,7 @@ function OutputStream(options) {
|| p instanceof AST_DefaultAssign // x => (x = (0, function(){}))
|| p instanceof AST_Expansion // [...(a, b)]
|| p instanceof AST_ForOf && this === p.object // for (e of (foo, bar)) {}
|| p instanceof AST_Yield // yield (foo, bar)
;
});