pub struct Builder { /* private fields */ }
Expand description
The builder is a wrapper around the entire code generation
via the classes:
Function
, StaticValue
, ExternFunction
, AdressManager
It also create the object file via the faerie
crate
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn add_function(&mut self, name: &str) -> &mut Function
pub fn add_function(&mut self, name: &str) -> &mut Function
Adds a new global function with the name name
To the builder
Sourcepub fn add_static(&mut self, name: &str, global: bool) -> &mut StaticValue
pub fn add_static(&mut self, name: &str, global: bool) -> &mut StaticValue
Adds referenc to static value to the builder.
name
- name of the static value
global
- import/export from/to other file
Sourcepub fn add_extern_fn(&mut self, name: &str) -> &mut ExternFunction
pub fn add_extern_fn(&mut self, name: &str) -> &mut ExternFunction
Adds function import from another file
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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