Enum lovm2::prelude::Expr[][src]

pub enum Expr {
    Access(Access),
    Call(Call),
    Conv(Conv),
    DynamicValue(Initialize),
    Iter(Iter),
    Operation1(Operator1Box<Expr, Global>),
    Operation2(Operator2Box<Expr, Global>, Box<Expr, Global>),
    Slice(Slice),
    Value {
        val: Value,
        boxed: bool,
    },
    Variable(Variable),
}

Expressions and operations that produce Values

Variants

Access(Access)
Call(Call)
Conv(Conv)
DynamicValue(Initialize)
Iter(Iter)
Operation1(Operator1Box<Expr, Global>)
Operation2(Operator2Box<Expr, Global>, Box<Expr, Global>)
Slice(Slice)
Value

Fields of Value

val: Valueboxed: bool
Variable(Variable)

Implementations

impl Expr[src]

pub fn from_opn(op: Operator2, args: Vec<Expr, Global>) -> Expr[src]

pub fn from_op(op: &Operator2, left: Expr, right: Expr) -> Expr[src]

impl Expr[src]

pub fn boxed(self) -> Expr[src]

pub fn is_const(&self) -> bool[src]

pub fn eval(&self, ctx: &Context) -> Result<Value, Lovm2Error>[src]

pub fn dict() -> Expr[src]

pub fn list() -> Expr[src]

pub fn pow<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

impl Expr[src]

pub fn add<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

pub fn sub<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

pub fn mul<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

pub fn div<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

pub fn rem<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

pub fn shl<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

pub fn shr<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

pub fn and<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

pub fn or<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

pub fn xor<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

pub fn eq<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

pub fn ne<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

pub fn ge<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

pub fn gt<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

pub fn le<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

pub fn lt<T, U>(left: T, right: U) -> Expr where
    T: Into<Expr>,
    U: Into<Expr>, 
[src]

pub fn not<T>(expr: T) -> Expr where
    T: Into<Expr>, 
[src]

Trait Implementations

impl Clone for Expr[src]

impl Debug for Expr[src]

impl<'_> From<&'_ Variable> for Expr[src]

impl From<Access> for Expr[src]

impl From<Call> for Expr[src]

impl From<Conv> for Expr[src]

impl From<Expr> for Access[src]

impl From<Initialize> for Expr[src]

impl From<Iter> for Expr[src]

impl From<Slice> for Expr[src]

impl<T> From<T> for Expr where
    T: Into<Value>, 
[src]

impl From<Variable> for Expr[src]

impl HirLowering for Expr[src]

Auto Trait Implementations

impl !RefUnwindSafe for Expr[src]

impl !Send for Expr[src]

impl !Sync for Expr[src]

impl Unpin for Expr[src]

impl !UnwindSafe for Expr[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.