[−][src]Struct spaik::compile::R8Compiler
Compile Value into R8C code.
Implementations
impl<'a, 'b> R8Compiler<'a, 'b>
[src]
pub fn new(vm: &'a mut R8VM<'b>) -> R8Compiler<'a, 'b>
[src]
pub fn compile_top(&mut self, ret: bool, code: &Value) -> Result<(), Error>
[src]
pub fn globals(&self) -> Option<impl Iterator<Item = (&SymID, &usize)>>
[src]
pub fn enter_fn(&mut self, args: Vec<SymID>, spec: ArgSpec) -> Result<(), Error>
[src]
pub fn compile_fn(
&mut self,
_name: SymID,
args: &Value,
body: &Value
) -> Result<ArgSpec, Error>
[src]
&mut self,
_name: SymID,
args: &Value,
body: &Value
) -> Result<ArgSpec, Error>
pub fn argument_clinic(mut code: &Value) -> Result<(bool, &Value), Error>
[src]
Reduces nested applications of not
Arguments
code
: The root of the AST tree to be reduced.
Examples
(not <_>)
➙(true, <_>)
(not (not (not <_>)))
➙(true, <_>)
(not (not (not (not <_>))))
➙(false, <_>)
Where the boolean represents whether or not the expression has been negated.
Errors
Returns an ArgError
if not
is given fewer or more than 1 argument.
Algorithm
pub fn link(self) -> Result<Linked, Error>
[src]
pub fn bt_eval_when(&mut self, code: &Value) -> Result<Value, Error>
[src]
pub fn compile_atom(&mut self, atom: &Value) -> Result<(), Error>
[src]
pub fn compile_app(
&mut self,
ret: bool,
op: SymID,
code: &Value
) -> Result<(), Error>
[src]
&mut self,
ret: bool,
op: SymID,
code: &Value
) -> Result<(), Error>
Auto Trait Implementations
impl<'a, 'b> !RefUnwindSafe for R8Compiler<'a, 'b>
[src]
impl<'a, 'b> !Send for R8Compiler<'a, 'b>
[src]
impl<'a, 'b> !Sync for R8Compiler<'a, 'b>
[src]
impl<'a, 'b> Unpin for R8Compiler<'a, 'b> where
'b: 'a,
[src]
'b: 'a,
impl<'a, 'b> !UnwindSafe for R8Compiler<'a, 'b>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,