diff --git a/src/lib.rs b/src/lib.rs index c26b77f..a4a9db8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -88,9 +88,6 @@ use codemap::{Span, Spanned}; use peekmore::{PeekMore, PeekMoreIterator}; -#[cfg(feature = "wasm")] -use wasm_bindgen::prelude::*; - use crate::atrule::{AtRule, AtRuleKind, Function, Mixin}; pub use crate::error::{SassError, SassResult}; use crate::scope::{insert_global_var, Scope}; diff --git a/src/main.rs b/src/main.rs index 4046e95..5932978 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,6 +21,10 @@ arg_enum! { } } +#[cfg(feature = "wasm")] +fn main() {} + +#[cfg(not(feature = "wasm"))] #[cfg_attr(feature = "profiling", inline(never))] fn main() -> std::io::Result<()> { let matches = App::new("grass") diff --git a/src/stylesheet.rs b/src/stylesheet.rs index aff2527..906d311 100644 --- a/src/stylesheet.rs +++ b/src/stylesheet.rs @@ -41,7 +41,7 @@ impl StyleSheet { StyleSheetParser { lexer: Lexer::new(&file).peekmore(), nesting: 0, - map: &map, + map: &mut map, path: Path::new(""), } .parse_toplevel() @@ -49,7 +49,7 @@ impl StyleSheet { .0, )) .map_err(|e| raw_to_parse_error(&map, e).to_string())? - .pretty_print() + .pretty_print(&map) .map_err(|e| raw_to_parse_error(&map, e).to_string())?) } }