just/src/compiler.rs

14 lines
281 B
Rust
Raw Normal View History

use super::*;
pub(crate) struct Compiler;
impl Compiler {
2023-01-26 19:03:04 -08:00
pub(crate) fn compile(src: &str) -> CompileResult<(Ast, Justfile)> {
let tokens = Lexer::lex(src)?;
let ast = Parser::parse(&tokens)?;
2023-01-26 19:03:04 -08:00
let justfile = Analyzer::analyze(&ast)?;
2023-01-26 19:03:04 -08:00
Ok((ast, justfile))
}
}