blob: 74bd8d02992643e1d5cf204f6e151b3cf92319a9 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use {crate::ast::BanjoAst, failure::Error, std::io};
pub use self::{
abigen::AbigenBackend, ast::AstBackend, c::CBackend, cpp::CppBackend, cpp::CppSubtype,
kernel::KernelBackend, kernel::KernelSubtype, syzkaller::SyzkallerBackend,
};
mod abigen;
mod ast;
mod c;
mod cpp;
mod kernel;
mod syzkaller;
mod util;
pub trait Backend<'a, W: io::Write> {
fn codegen(&mut self, ast: BanjoAst) -> Result<(), Error>;
}