hatter 0.1.4

positively mad, zero dependency html templating language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
pub mod lexer;
pub mod parser;
pub mod stmt;
pub mod syntax;
pub mod tag;
pub mod token;

/// Compile source code into a Vec of Stmt, aka the AST.
pub fn compile<S: AsRef<str>>(s: S) -> crate::Result<Vec<stmt::Stmt>> {
    use {lexer::scan, parser::parse};
    scan(s.as_ref()).and_then(|t| parse(&t))
}