pub struct Program { /* private fields */ }
Expand description
Programs are containers holding statics and a pointer to the main parselet.
A program is the result of a successful compiler run.
Implementations§
source§impl Program
impl Program
pub fn new(statics: Vec<RefValue>) -> Self
pub fn dump(&self)
pub fn run_from_reader(&self, reader: Reader) -> Result<Option<RefValue>, Error>
pub fn run_from_str(&self, src: &'static str) -> Result<Option<RefValue>, Error>
pub fn run_from_string(&self, src: String) -> Result<Option<RefValue>, Error>
pub fn run_from_file(&self, filename: &str) -> Result<Option<RefValue>, Error>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Program
impl !Send for Program
impl !Sync for Program
impl Unpin for Program
impl !UnwindSafe for Program
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