Use SmartString for buffers and literal_syntax can panic.

This commit is contained in:
Stephen Chung
2022-11-22 23:30:43 +08:00
parent 05c7d00a8e
commit d911327242
16 changed files with 225 additions and 174 deletions

View File

@@ -688,8 +688,7 @@ impl Engine {
name: &str,
module: SharedModule,
) {
let separator = crate::tokenizer::Token::DoubleColon.syntax();
let separator = separator.as_ref();
let separator = crate::tokenizer::Token::DoubleColon.literal_syntax();
if name.contains(separator) {
let mut iter = name.splitn(2, separator);