diff --git a/src/lib.rs b/src/lib.rs index 01d9a7e..912d401 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -119,7 +119,6 @@ mod parse; mod scope; mod selector; mod style; -mod stylesheet; mod token; mod unit; mod utils; diff --git a/src/parse/mod.rs b/src/parse/mod.rs index 89ef5e1..c5fe083 100644 --- a/src/parse/mod.rs +++ b/src/parse/mod.rs @@ -96,12 +96,7 @@ pub(crate) struct Parser<'a> { pub toks: &'a mut PeekMoreIterator>, pub map: &'a mut CodeMap, pub path: &'a Path, - // `pub` to allow meta functions pub global_scope: &'a mut Scope, - // todo: make these fields private. they are currently public to hack in - // `Value::to_selector`, which requires a scope and selector to parse. - // presumably we could pass in empty scope since no interpolation will ever be done - // maybe even empty selector pub scopes: &'a mut NeverEmptyVec, pub super_selectors: &'a mut NeverEmptyVec, pub span_before: Span, diff --git a/src/stylesheet.rs b/src/stylesheet.rs deleted file mode 100644 index adaf93e..0000000 --- a/src/stylesheet.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[cfg(feature = "wasm")] -#[wasm_bindgen] -impl StyleSheet { - pub fn new(input: String) -> Result { - let mut map = CodeMap::new(); - let file = map.add_file("stdin".into(), input); - Ok(Css::from_stylesheet(StyleSheet( - StyleSheetParser { - lexer: &mut Lexer::new(&file).peekmore(), - nesting: 0, - map: &mut map, - path: Path::new(""), - } - .parse_toplevel() - .map_err(|e| raw_to_parse_error(&map, e).to_string())? - .0, - )) - .map_err(|e| raw_to_parse_error(&map, e).to_string())? - .pretty_print(&map) - .map_err(|e| raw_to_parse_error(&map, e).to_string())?) - } -}