pub struct Compiler { /* private fields */ }Expand description
Accumulates statements from one or more sources, then interns + emits the IR.
Implementations§
Source§impl Compiler
impl Compiler
Sourcepub fn add_source(
&mut self,
source: &str,
src: &str,
) -> Result<(), CompileError>
pub fn add_source( &mut self, source: &str, src: &str, ) -> Result<(), CompileError>
Parse one source and accumulate its statements. source is a label used
in provenance (e.g. a file name or "<root>"). The source must declare its
DOMAIN; IMPORTs are recorded as pending (their domains cannot be bound
without a Resolver), so a single source may only reference its own
domain. Use compile for cross-domain references.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Compiler
impl RefUnwindSafe for Compiler
impl Send for Compiler
impl Sync for Compiler
impl Unpin for Compiler
impl UnsafeUnpin for Compiler
impl UnwindSafe for Compiler
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