diff --git a/src/common.rs b/src/common.rs index a09875a..6003c3c 100644 --- a/src/common.rs +++ b/src/common.rs @@ -359,3 +359,20 @@ impl Scope { self.functions.extend(other.functions); } } + +#[derive(Debug, Copy, Clone, Eq, PartialEq)] +pub(crate) enum QuoteKind { + Single, + Double, + None, +} + +impl QuoteKind { + pub fn as_str(self) -> &'static str { + match self { + Self::Single => "'", + Self::Double => "\"", + Self::None => "", + } + } +} diff --git a/src/value.rs b/src/value.rs index e86acbe..a12e6d3 100644 --- a/src/value.rs +++ b/src/value.rs @@ -6,7 +6,7 @@ use std::ops::Add; use crate::args::eat_call_args; use crate::builtin::GLOBAL_FUNCTIONS; use crate::color::Color; -use crate::common::{Keyword, Op, Scope, Symbol}; +use crate::common::{Keyword, Op, QuoteKind, Scope, Symbol}; use crate::units::Unit; use crate::utils::{devour_whitespace_or_comment, eat_interpolation}; use crate::{Token, TokenKind}; @@ -64,23 +64,6 @@ impl Display for ListSeparator { } } -#[derive(Debug, Copy, Clone, Eq, PartialEq)] -pub(crate) enum QuoteKind { - Single, - Double, - None, -} - -impl QuoteKind { - pub fn as_str(self) -> &'static str { - match self { - Self::Single => "'", - Self::Double => "\"", - Self::None => "", - } - } -} - #[derive(Debug, Clone, Eq, PartialEq)] pub(crate) enum Value { Important,