fix corner cases with template literals (#4780)

This commit is contained in:
Alex Lam S.L
2021-03-15 13:54:05 +00:00
committed by GitHub
parent 01aa078e9c
commit 176581d732
4 changed files with 46 additions and 2 deletions

View File

@@ -746,6 +746,8 @@ function OutputStream(options) {
|| p instanceof AST_PropAccess && p.expression === this
// ...(foo, bar, baz)
|| p instanceof AST_Spread
// (foo, bar)`baz`
|| p instanceof AST_Template && p.tag === this
// !(foo, bar, baz)
|| p instanceof AST_Unary
// var a = (1, 2), b = a + a; ---> b == 4