test(es/quote): Fix doctests (#7038)

This commit is contained in:
Anders Kaseorg 2023-03-08 20:10:47 -08:00 committed by GitHub
parent 0f09789c43
commit e698a34816
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

1
Cargo.lock generated
View File

@ -3781,6 +3781,7 @@ version = "0.44.4"
dependencies = [
"swc_atoms",
"swc_common",
"swc_core",
"swc_ecma_ast",
"swc_ecma_quote_macros",
"testing",

View File

@ -18,4 +18,5 @@ swc_ecma_ast = { version = "0.98.2", path = "../swc_ecma_ast" }
swc_ecma_quote_macros = { version = "0.39.4", path = "../swc_ecma_quote_macros" }
[dev-dependencies]
swc_core = { path = "../swc_core", features = ["ecma_quote"] }
testing = { version = "0.31.37", path = "../testing" }

View File

@ -105,6 +105,7 @@ pub(super) fn prepare_vars(
"Ident" => VarPos::Ident,
"Expr" => VarPos::Expr,
"Pat" => VarPos::Pat,
"Str" => VarPos::Str,
_ => panic!("Invalid type: {}", segment.ident),
}
}