pub struct Compiler<'a> { /* private fields */ }Expand description
A configured compiler: Options and, optionally, a Locate for the
line tables.
§Examples
use bcgen_lang::{Compiler, LineIndex, Options};
use hir_lang::Builder;
use intern_lang::Interner;
let lines = LineIndex::new("main.mox", 0, "");
let mut b = Builder::new();
let root = b.module(None, &[]);
let hir = b.finish(root)?;
let out = Compiler::new(Options::new())
.with_locator(&lines)
.compile(&hir, &Interner::new())?;
assert!(out.start().is_none());Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Compiler<'a>
impl<'a> !Send for Compiler<'a>
impl<'a> !Sync for Compiler<'a>
impl<'a> !UnwindSafe for Compiler<'a>
impl<'a> Freeze for Compiler<'a>
impl<'a> Unpin for Compiler<'a>
impl<'a> UnsafeUnpin for Compiler<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more