String interpolation (#1849)

* Add string interpolation

* fix coloring

* A few more fixups + tests

* merge master again
This commit is contained in:
Jonathan Turner
2020-05-19 12:27:26 -07:00
committed by GitHub
parent ae87582cb6
commit ed80933806
6 changed files with 303 additions and 13 deletions

View File

@ -69,7 +69,7 @@ fn bare(src: &mut Input, span_offset: usize) -> Result<Spanned<String>, ParseErr
if c == delimiter {
inside_quote = false;
}
} else if c == '\'' || c == '"' {
} else if c == '\'' || c == '"' || c == '`' {
inside_quote = true;
delimiter = c;
} else if c == '[' {
@ -154,12 +154,6 @@ fn pipeline(src: &mut Input, span_offset: usize) -> Result<LiteBlock, ParseError
break;
}
}
// '"' | '\'' => {
// let c = *c;
// // quoted string
// let arg = quoted(src, c, span_offset)?;
// cmd.args.push(arg);
// }
_ => {
// basic argument
let arg = bare(src, span_offset)?;