[][src]Enum dyon::ast::Expression

pub enum Expression {
    Link(Box<Link>),
    Object(Box<Object>),
    Array(Box<Array>),
    ArrayFill(Box<ArrayFill>),
    Return(Box<Expression>),
    ReturnVoid(Box<Range>),
    Break(Box<Break>),
    Continue(Box<Continue>),
    Block(Box<Block>),
    Go(Box<Go>),
    Call(Box<Call>),
    CallVoid(Box<CallVoid>),
    CallReturn(Box<CallReturn>),
    CallLazy(Box<CallLazy>),
    CallLoaded(Box<CallLoaded>),
    CallBinOp(Box<CallBinOp>),
    CallUnOp(Box<CallUnOp>),
    Item(Box<Item>),
    Assign(Box<Assign>),
    Vec4(Box<Vec4>),
    Mat4(Box<Mat4>),
    For(Box<For>),
    ForN(Box<ForN>),
    ForIn(Box<ForIn>),
    Sum(Box<ForN>),
    SumIn(Box<ForIn>),
    SumVec4(Box<ForN>),
    Prod(Box<ForN>),
    ProdIn(Box<ForIn>),
    ProdVec4(Box<ForN>),
    Min(Box<ForN>),
    MinIn(Box<ForIn>),
    Max(Box<ForN>),
    MaxIn(Box<ForIn>),
    Sift(Box<ForN>),
    SiftIn(Box<ForIn>),
    Any(Box<ForN>),
    AnyIn(Box<ForIn>),
    All(Box<ForN>),
    AllIn(Box<ForIn>),
    LinkFor(Box<ForN>),
    LinkIn(Box<ForIn>),
    If(Box<If>),
    Variable(Box<(Range, Variable)>),
    Try(Box<Expression>),
    Swizzle(Box<Swizzle>),
    Closure(Arc<Closure>),
    CallClosure(Box<CallClosure>),
    Grab(Box<Grab>),
    TryExpr(Box<TryExpr>),
    In(Box<In>),
}

Expression.

Variants

Link expression.

Object(Box<Object>)

Object expression.

Array(Box<Array>)

Array expression.

ArrayFill(Box<ArrayFill>)

Array fill expression.

Return(Box<Expression>)

Return expression.

ReturnVoid(Box<Range>)

Returns with value expression.

Break(Box<Break>)

Break expression.

Continue(Box<Continue>)

Continue expression.

Block(Box<Block>)

Block expression.

Go(Box<Go>)

Go call expression.

Call(Box<Call>)

Call expression.

CallVoid(Box<CallVoid>)

Call external function.

CallReturn(Box<CallReturn>)

Call external function that returns something.

CallLazy(Box<CallLazy>)

Call external function with lazy invariant.

CallLoaded(Box<CallLoaded>)

Call loaded function.

CallBinOp(Box<CallBinOp>)

Binary operator.

CallUnOp(Box<CallUnOp>)

Unary operator.

Item(Box<Item>)

Item expression.

Assign(Box<Assign>)

Assignment expression.

Vec4(Box<Vec4>)

4D vector expression.

Mat4(Box<Mat4>)

4D matrix expression.

For(Box<For>)

For expression, e.g. for i := 0; i < 10; i += 1 { ... }.

ForN(Box<ForN>)

For-n expression.

ForIn(Box<ForIn>)

For-in expression.

Sum(Box<ForN>)

Sum for-n expression.

SumIn(Box<ForIn>)

Sum-in for-n expression.

SumVec4(Box<ForN>)

Component-wise 4D vector sum for-n-loop.

Prod(Box<ForN>)

Product for-n expression.

ProdIn(Box<ForIn>)

Product-in for-n loop.

ProdVec4(Box<ForN>)

Component-wise 4D vector product for-n-loop.

Min(Box<ForN>)

Min for-n expression.

MinIn(Box<ForIn>)

Min-in for-n expression.

Max(Box<ForN>)

Max for-n expression.

MaxIn(Box<ForIn>)

Max-in for-n expression.

Sift(Box<ForN>)

Sift for-n expression.

SiftIn(Box<ForIn>)

Sift-in expression.

Any(Box<ForN>)

Any expression.

AnyIn(Box<ForIn>)

Any-in expression.

All(Box<ForN>)

All-for expression.

AllIn(Box<ForIn>)

All-in expression.

LinkFor(Box<ForN>)

Link-for expression.

LinkIn(Box<ForIn>)

Link-in expression.

If(Box<If>)

If-expression.

Variable(Box<(Range, Variable)>)

Variable.

This means it contains no members that depends on other expressions.

Try expression using ?.

Swizzle(Box<Swizzle>)

4D vector swizzle expression.

Closure(Arc<Closure>)

Closure expression.

CallClosure(Box<CallClosure>)

Call closure expression.

Grab(Box<Grab>)

Grab expression.

TryExpr(Box<TryExpr>)

Try expression, e.g. try x.

In(Box<In>)

In-type expression.

Implementations

impl Expression[src]

pub fn from_meta_data(
    file: &Arc<String>,
    source: &Arc<String>,
    node: &str,
    convert: Convert,
    ignored: &mut Vec<Range>
) -> Result<(Range, Expression), ()>
[src]

Creates expression from meta data.

pub fn source_range(&self) -> Range[src]

Gets the range in source.

Trait Implementations

impl Clone for Expression[src]

impl Debug for Expression[src]

impl Sync for Expression[src]

Auto Trait Implementations

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.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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