From 089436ec9d8ea249534b9caad79239e1f5be3959 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Fri, 14 Feb 2020 10:18:48 -0500 Subject: [PATCH] Revert "Allow unquote on all values" This reverts commit f4c5fbae274ddd545d34107e424fa3b9c842ea14. This change resulted in nine regressions in the spec tests. This is a change that we should make later when the `unquote()` function has the correct functionality. For right now, the implementation of `unquote()` is a hack to just get things working. --- src/utils.rs | 3 ++- src/value/mod.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index e715788..ddeb82f 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -60,8 +60,9 @@ 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 6f581de..39e7d0b 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), - _ => self, + _ => todo!(), } }