Remove inner _parse_interpolation()

This commit is contained in:
ConnorSkees 2020-02-24 17:08:49 -05:00
parent a645424186
commit c2e339fb5b

View File

@ -41,7 +41,7 @@ pub(crate) fn devour_whitespace_or_comment<I: Iterator<Item = W>, W: IsWhitespac
found_whitespace found_whitespace
} }
fn _parse_interpolation<I: Iterator<Item = Token>>( pub(crate) fn parse_interpolation<I: Iterator<Item = Token>>(
tokens: &mut Peekable<I>, tokens: &mut Peekable<I>,
scope: &Scope, scope: &Scope,
) -> SassResult<Vec<Token>> { ) -> SassResult<Vec<Token>> {
@ -60,7 +60,7 @@ fn _parse_interpolation<I: Iterator<Item = Token>>(
val.push_str(&scope.get_var(v)?.clone().unquote().to_string()) val.push_str(&scope.get_var(v)?.clone().unquote().to_string())
} }
TokenKind::Interpolation => val.push_str( TokenKind::Interpolation => val.push_str(
&_parse_interpolation(tokens, scope)? &parse_interpolation(tokens, scope)?
.iter() .iter()
.map(|x| x.kind.to_string()) .map(|x| x.kind.to_string())
.collect::<String>(), .collect::<String>(),
@ -77,13 +77,6 @@ fn _parse_interpolation<I: Iterator<Item = Token>>(
.collect()) .collect())
} }
pub(crate) fn parse_interpolation<I: Iterator<Item = Token>>(
tokens: &mut Peekable<I>,
scope: &Scope,
) -> SassResult<Vec<Token>> {
_parse_interpolation(tokens, scope)
}
pub(crate) struct VariableDecl { pub(crate) struct VariableDecl {
pub val: Value, pub val: Value,
pub default: bool, pub default: bool,