Enum nessa::compilation::CompiledNessaExpr
source · pub enum CompiledNessaExpr {
Show 98 variants
Empty,
Bool(bool),
Int(Integer),
Float(f64),
Str(String),
Array(usize, Type),
Lambda(usize, usize, Type, Type),
Construct(usize, usize, Vec<Type>),
AttributeMove(usize),
AttributeRef(usize),
AttributeMut(usize),
AttributeCopy(usize),
AttributeDeref(usize),
Tuple(usize),
TupleElemMove(usize),
TupleElemRef(usize),
TupleElemMut(usize),
TupleElemCopy(usize),
TupleElemDeref(usize),
IdxMove,
IdxRef,
IdxMut,
IdxMoveRef,
StoreVariable(usize),
GetVariable(usize),
RefVariable(usize),
DerefVariable(usize),
CopyVariable(usize),
MoveVariable(usize),
Assign,
Drop,
Jump(usize),
RelativeJump(i32),
RelativeJumpIfFalse(usize, bool),
RelativeJumpIfTrue(usize, bool),
Call(usize),
LambdaCall,
LambdaCallRef,
Return,
NativeFunctionCall(usize, usize, Vec<Type>),
UnaryOperatorCall(usize, usize, Vec<Type>),
BinaryOperatorCall(usize, usize, Vec<Type>),
NaryOperatorCall(usize, usize, Vec<Type>),
NativeFunctionCallNoRet(usize, usize, Vec<Type>),
UnaryOperatorCallNoRet(usize, usize, Vec<Type>),
BinaryOperatorCallNoRet(usize, usize, Vec<Type>),
Ref,
Mut,
Copy,
Deref,
Demut,
Move,
ToFloat,
Inc,
Dec,
Addi,
Addf,
Subi,
Subf,
Muli,
Mulf,
Divi,
Divf,
Modi,
Modf,
Negi,
Negf,
AddStr,
NotB,
AndB,
OrB,
XorB,
Shr,
Shl,
Lti,
Ltf,
Gti,
Gtf,
Lteqi,
Lteqf,
Gteqi,
Gteqf,
Eqi,
Eqf,
Neqi,
Neqf,
EqBool,
NeqBool,
EqStr,
NeqStr,
Not,
Or,
And,
Xor,
Nand,
Nor,
Placeholder(PlaceholderType),
Halt,
}Variants§
Empty
Bool(bool)
Int(Integer)
Float(f64)
Str(String)
Array(usize, Type)
Lambda(usize, usize, Type, Type)
Construct(usize, usize, Vec<Type>)
AttributeMove(usize)
AttributeRef(usize)
AttributeMut(usize)
AttributeCopy(usize)
AttributeDeref(usize)
Tuple(usize)
TupleElemMove(usize)
TupleElemRef(usize)
TupleElemMut(usize)
TupleElemCopy(usize)
TupleElemDeref(usize)
IdxMove
IdxRef
IdxMut
IdxMoveRef
StoreVariable(usize)
GetVariable(usize)
RefVariable(usize)
DerefVariable(usize)
CopyVariable(usize)
MoveVariable(usize)
Assign
Drop
Jump(usize)
RelativeJump(i32)
RelativeJumpIfFalse(usize, bool)
RelativeJumpIfTrue(usize, bool)
Call(usize)
LambdaCall
LambdaCallRef
Return
NativeFunctionCall(usize, usize, Vec<Type>)
UnaryOperatorCall(usize, usize, Vec<Type>)
BinaryOperatorCall(usize, usize, Vec<Type>)
NaryOperatorCall(usize, usize, Vec<Type>)
NativeFunctionCallNoRet(usize, usize, Vec<Type>)
UnaryOperatorCallNoRet(usize, usize, Vec<Type>)
BinaryOperatorCallNoRet(usize, usize, Vec<Type>)
Ref
Mut
Copy
Deref
Demut
Move
ToFloat
Inc
Dec
Addi
Addf
Subi
Subf
Muli
Mulf
Divi
Divf
Modi
Modf
Negi
Negf
AddStr
NotB
AndB
OrB
XorB
Shr
Shl
Lti
Ltf
Gti
Gtf
Lteqi
Lteqf
Gteqi
Gteqf
Eqi
Eqf
Neqi
Neqf
EqBool
NeqBool
EqStr
NeqStr
Not
Or
And
Xor
Nand
Nor
Placeholder(PlaceholderType)
Halt
Implementations§
source§impl CompiledNessaExpr
impl CompiledNessaExpr
pub fn needs_float(&self) -> bool
pub fn needs_deref(&self) -> bool
pub fn needs_no_drop(&self) -> bool
pub fn to_string(&self, ctx: &NessaContext) -> String
Trait Implementations§
source§impl Clone for CompiledNessaExpr
impl Clone for CompiledNessaExpr
source§fn clone(&self) -> CompiledNessaExpr
fn clone(&self) -> CompiledNessaExpr
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for CompiledNessaExpr
impl Debug for CompiledNessaExpr
source§impl<'de> Deserialize<'de> for CompiledNessaExpr
impl<'de> Deserialize<'de> for CompiledNessaExpr
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<CompiledNessaExpr> for NessaInstruction
impl From<CompiledNessaExpr> for NessaInstruction
source§fn from(obj: CompiledNessaExpr) -> NessaInstruction
fn from(obj: CompiledNessaExpr) -> NessaInstruction
Converts to this type from the input type.
source§impl PartialEq for CompiledNessaExpr
impl PartialEq for CompiledNessaExpr
source§fn eq(&self, other: &CompiledNessaExpr) -> bool
fn eq(&self, other: &CompiledNessaExpr) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for CompiledNessaExpr
impl Serialize for CompiledNessaExpr
impl StructuralPartialEq for CompiledNessaExpr
Auto Trait Implementations§
impl Freeze for CompiledNessaExpr
impl RefUnwindSafe for CompiledNessaExpr
impl Send for CompiledNessaExpr
impl Sync for CompiledNessaExpr
impl Unpin for CompiledNessaExpr
impl UnwindSafe for CompiledNessaExpr
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