This commit is contained in:
ConnorSkees 2020-03-23 22:13:11 -04:00
parent ae33efcc30
commit f69bbb3b69
2 changed files with 8 additions and 5 deletions

View File

@ -79,10 +79,13 @@ pub(crate) fn register(f: &mut HashMap<String, Builtin>) {
"inspect".to_owned(), "inspect".to_owned(),
Box::new(|args, _| { Box::new(|args, _| {
max_args!(args, 1); max_args!(args, 1);
Ok(Value::Ident(match arg!(args, 0, "value") { Ok(Value::Ident(
Value::List(v, ..) if v.is_empty() => "()".to_string(), match arg!(args, 0, "value") {
v => v.to_string(), Value::List(v, ..) if v.is_empty() => "()".to_string(),
}, QuoteKind::None)) v => v.to_string(),
},
QuoteKind::None,
))
}), }),
); );
f.insert( f.insert(

View File

@ -129,7 +129,7 @@ pub(crate) fn read_until_closing_quote<I: Iterator<Item = Token>>(
TokenKind::Symbol(Symbol::BackSlash) if !is_escaped => { TokenKind::Symbol(Symbol::BackSlash) if !is_escaped => {
t.push(tok); t.push(tok);
is_escaped = true is_escaped = true
}, }
TokenKind::Symbol(Symbol::BackSlash) => { TokenKind::Symbol(Symbol::BackSlash) => {
is_escaped = false; is_escaped = false;
t.push(tok); t.push(tok);