tailwindcss/crates/core/src/compiler.rs

19 lines
274 B
Rust
Raw Permalink Normal View History

2024-10-12 19:36:25 -04:00
use std::error::Error;
use crate::css::parser::parse;
use crate::css::ast::Stylesheet;
struct Compiler {
ast: Stylesheet,
}
impl Compiler {
fn new(css: &[u8]) -> Result<Compiler, Box<dyn Error>> {
let ast = parse(css)?;
Ok(Compiler {
ast,
})
}
}