pub fn compile(defs: &Defs, options: &CodegenOptions) -> Result<String, Errors>
Expand description

Compile the given AST definitions into Rust source code.

Examples found in repository?
src/compile.rs (line 24)
18
19
20
21
22
23
24
25
pub fn from_files<P: AsRef<Path>>(
    inputs: impl IntoIterator<Item = P>,
    options: &codegen::CodegenOptions,
) -> Result<String, Errors> {
    let lexer = crate::lexer::Lexer::from_files(inputs)?;
    let defs = crate::parser::parse(lexer)?;
    compile(&defs, options)
}