move value parsing into separate directory
This commit is contained in:
parent
f437649103
commit
0f590b5cd2
1
src/parse/value/mod.rs
Normal file
1
src/parse/value/mod.rs
Normal file
@ -0,0 +1 @@
|
|||||||
|
mod parse;
|
@ -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,
|
Loading…
x
Reference in New Issue
Block a user