just/src/compiler.rs

14 lines
241 B
Rust
Raw Normal View History

use crate::common::*;
pub(crate) struct Compiler;
impl Compiler {
pub(crate) fn compile(src: &str) -> CompileResult<Justfile> {
let tokens = Lexer::lex(src)?;
let ast = Parser::parse(&tokens)?;
Analyzer::analyze(ast)
}
}