From f4c5fbae274ddd545d34107e424fa3b9c842ea14 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Fri, 14 Feb 2020 10:11:26 -0500 Subject: [PATCH] Allow unquote on all values --- src/utils.rs | 3 +-- src/value/mod.rs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index ddeb82f..e715788 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -60,9 +60,8 @@ pub(crate) fn parse_interpolation>( Lexer::new( &Value::from_tokens(&mut val.into_iter().peekable(), scope) .unwrap() + .unquote() .to_string() - .replace("\"", "") - .replace("'", ""), ) .collect::>() } diff --git a/src/value/mod.rs b/src/value/mod.rs index 39e7d0b..6f581de 100644 --- a/src/value/mod.rs +++ b/src/value/mod.rs @@ -65,7 +65,7 @@ impl Value { pub fn unquote(self) -> Self { match self { Self::Ident(s1, _) => Self::Ident(s1, QuoteKind::None), - _ => todo!(), + _ => self, } }