move value parsing into separate directory

This commit is contained in:
Connor Skees 2020-07-02 19:08:04 -04:00
parent f437649103
commit 0f590b5cd2
2 changed files with 5 additions and 5 deletions

1
src/parse/value/mod.rs Normal file
View File

@ -0,0 +1 @@
mod parse;

View File

@ -19,15 +19,14 @@ use crate::{
peek_until_closing_curly_brace, peek_whitespace, read_until_char, read_until_closing_paren, peek_until_closing_curly_brace, peek_whitespace, read_until_char, read_until_closing_paren,
read_until_closing_square_brace, IsWhitespace, read_until_closing_square_brace, IsWhitespace,
}, },
value::Value, value::{Number, SassMap, Value},
value::{Number, SassMap},
Token, Token,
}; };
use super::Parser; use super::super::Parser;
impl<'a> Parser<'a> { impl<'a> Parser<'a> {
pub(super) fn parse_value(&mut self) -> SassResult<Spanned<Value>> { pub(crate) fn parse_value(&mut self) -> SassResult<Spanned<Value>> {
self.whitespace(); self.whitespace();
let span = match self.toks.peek() { let span = match self.toks.peek() {
Some(Token { pos, .. }) => *pos, Some(Token { pos, .. }) => *pos,
@ -142,7 +141,7 @@ impl<'a> Parser<'a> {
}) })
} }
pub(super) fn parse_value_from_vec(&mut self, toks: Vec<Token>) -> SassResult<Spanned<Value>> { pub(crate) fn parse_value_from_vec(&mut self, toks: Vec<Token>) -> SassResult<Spanned<Value>> {
Parser { Parser {
toks: &mut toks.into_iter().peekmore(), toks: &mut toks.into_iter().peekmore(),
map: self.map, map: self.map,