diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-09-18 00:04:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-18 07:04:46 +0800 |
commit | 0f0759ec15d32673333b2397882a7f3e043d4cf9 (patch) | |
tree | 55633bccad8bd19282e9d2d4239e7f7027735c7e | |
parent | 7f501f9fedfb72faf7665cf223a313e9dbb30484 (diff) | |
download | tracifyjs-0f0759ec15d32673333b2397882a7f3e043d4cf9.tar.gz tracifyjs-0f0759ec15d32673333b2397882a7f3e043d4cf9.zip |
remove redundant transform (#4123)
-rw-r--r-- | lib/compress.js | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/compress.js b/lib/compress.js index 4c070f9c..61d6079c 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -7660,29 +7660,6 @@ merge(Compressor.prototype, { }) }); } - // (x + "foo") + ("bar" + y) => (x + "foobar") + y - if (self.left instanceof AST_Binary - && self.left.operator == "+" - && self.left.is_string(compressor) - && self.left.right instanceof AST_Constant - && self.right instanceof AST_Binary - && self.right.operator == "+" - && self.right.left instanceof AST_Constant - && self.right.is_string(compressor)) { - self = make_node(AST_Binary, self, { - operator: "+", - left: make_node(AST_Binary, self.left, { - operator: "+", - left: self.left.left, - right: make_node(AST_String, self.left.right, { - value: "" + self.left.right.value + self.right.left.value, - start: self.left.right.start, - end: self.right.left.end - }) - }), - right: self.right.right - }); - } // a + -b => a - b if (self.right instanceof AST_UnaryPrefix && self.right.operator == "-" |