From d0452440895be0d02b85d6892eddba0a9d6193f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Fri, 15 Oct 2021 18:12:40 +0900 Subject: [PATCH] fix(es/codegen): Fix codegen of synthesized template literals. (#2440) swc_ecma_codegen: - Don't handle synthesized backtick specially. --- Cargo.lock | 6 +++--- ecmascript/codegen/Cargo.toml | 2 +- ecmascript/codegen/src/lib.rs | 4 ---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d3e58e4b437..16f687b6c64 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -75,9 +75,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "991984e3fd003e7ba02eb724f87a0f997b78677c46c0e91f8424ad7394c9886a" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ "const-random", "getrandom 0.2.3", @@ -2598,7 +2598,7 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.75.0" +version = "0.75.1" dependencies = [ "bitflags", "memchr", diff --git a/ecmascript/codegen/Cargo.toml b/ecmascript/codegen/Cargo.toml index 5e229a6f573..a4bb3a4660d 100644 --- a/ecmascript/codegen/Cargo.toml +++ b/ecmascript/codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0/MIT" name = "swc_ecma_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.75.0" +version = "0.75.1" [dependencies] bitflags = "1" diff --git a/ecmascript/codegen/src/lib.rs b/ecmascript/codegen/src/lib.rs index 1d8b32d4583..f713dbaaa92 100644 --- a/ecmascript/codegen/src/lib.rs +++ b/ecmascript/codegen/src/lib.rs @@ -2929,10 +2929,6 @@ fn unescape_tpl_lit(s: &str, is_synthesized: bool) -> String { result.push_str("\n"); } - '`' if is_synthesized => { - result.push_str("\\`"); - } - // TODO: Handle all escapes _ => { result.push(c);