parse interpolated strings
This commit is contained in:
parent
62671094a0
commit
b6c4c6375b
|
@ -58,7 +58,7 @@ use crate::base::*;
|
|||
|
||||
pub fn main() {
|
||||
let src = "
|
||||
\"{} {foobar}\"
|
||||
\"thing\"
|
||||
";
|
||||
let (tokens, lex_errs) = lexer().parse(src).into_output_errors();
|
||||
if !lex_errs.is_empty() {
|
||||
|
|
|
@ -397,7 +397,7 @@ fn parse_string(s: &str, span: SimpleSpan) -> Result<Vec<Spanned<StringPart>>, S
|
|||
parts.push((
|
||||
if is_word {
|
||||
StringPart::Word(current_part)
|
||||
} else if current_part == s.to_string() {
|
||||
} else if current_part == s {
|
||||
StringPart::Inline(current_part)
|
||||
} else {
|
||||
StringPart::Data(current_part)
|
||||
|
|
Loading…
Reference in New Issue
Block a user