fix(es/codegen): Fix codegen of synthesized template literals. (#2440)

swc_ecma_codegen:
 - Don't handle synthesized backtick specially.
This commit is contained in:
Donny/강동윤 2021-10-15 18:12:40 +09:00 committed by GitHub
parent 4c983e9158
commit d045244089
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 8 deletions

6
Cargo.lock generated
View File

@ -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",

View File

@ -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"

View File

@ -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);