tailwindcss/crates/core/src/compiler.rs
2024-10-12 20:56:05 -04:00

18 lines
274 B
Rust

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,
})
}
}