fn replace_string_markers(input: &str) -> String {
    match input.chars().next().unwrap() {
        '"' => input.replace('"', "").to_string(),
        '\'' => input.replace('\'', "").to_string(),
        '`' => input.replace('`', "").to_string(),
        _ => unreachable!("How did you even get there"),
    }
}
/// Strings are delimited by double quotes, single quotes and backticks
/// We need to remove those before putting them in the AST
Strings are delimited by double quotes, single quotes and backticks
We need to remove those before putting them in the AST
Strings are delimited by double quotes single quotes and backticks We need to remove those before putting them in the AST
fn replace_string_markers(input: &str) -> String {
    match input.chars().next().unwrap() {
        '"' => input.replace('"', "").to_string(),
        '\'' => input.replace('\'', "").to_string(),
        '`' => input.replace('`', "").to_string(),
        _ => unreachable!("How did you even get there"),
    }
}
fn replace_string_markers ( input : & str ) -> String { match input . chars ( ) . next ( ) . unwrap ( ) { '"' => input . replace ( '"' , " " ) . to_string ( ) , '\'' => input . replace ( '\'' , " " ) . to_string ( ) , '`' => input . replace ( '`' , " " ) . to_string ( ) , _ => unreachable ! ( " " ) , } }
Strings are delimited by double quotes, single quotes and backticks
We need to remove those before putting them in the AST
Strings are delimited by double quotes single quotes and backticks We need to remove those before putting them in the AST
input
&str
input
&str