[][src]Enum zeta::parser::ast::ExpressionData

pub enum ExpressionData {
    Primary(Primary),
    AddressOf {
        mutable: bool,
        value: Box<Expression>,
    },
    Unary {
        op: OperatorType,
        operand: Box<Expression>,
    },
    Binary {
        op: OperatorType,
        left: Box<Expression>,
        right: Box<Expression>,
    },
    MatchExpression {
        left: Box<Expression>,
        right: Box<Expression>,
    },
    Member {
        operand: Box<Expression>,
        member_name: Identifier,
    },
    Subscript {
        operand: Box<Expression>,
        subscript: Box<Expression>,
    },
    Call {
        callee: Box<Expression>,
        parameters: Vec<Expression>,
    },
    Cast {
        operand: Box<Expression>,
        as_ty: Option<Box<TypeExpression>>,
    },
    Compound {
        value_ty: Option<Box<TypeExpression>>,
        fields: Vec<CompoundField>,
    },
    Block(Box<Block>),
    Conditional(Box<ConditionalBlock>),
    Match(Box<MatchBlock>),
}

Variants

Primary(Primary)AddressOf

Fields of AddressOf

mutable: boolvalue: Box<Expression>
Unary

Fields of Unary

op: OperatorTypeoperand: Box<Expression>
Binary

Fields of Binary

op: OperatorTypeleft: Box<Expression>right: Box<Expression>
MatchExpression

Fields of MatchExpression

left: Box<Expression>right: Box<Expression>
Member

Fields of Member

operand: Box<Expression>member_name: Identifier
Subscript

Fields of Subscript

operand: Box<Expression>subscript: Box<Expression>
Call

Fields of Call

callee: Box<Expression>parameters: Vec<Expression>
Cast

Fields of Cast

operand: Box<Expression>as_ty: Option<Box<TypeExpression>>
Compound

Fields of Compound

value_ty: Option<Box<TypeExpression>>fields: Vec<CompoundField>
Block(Box<Block>)Conditional(Box<ConditionalBlock>)Match(Box<MatchBlock>)

Methods

impl ExpressionData[src]

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

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

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

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

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

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

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

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

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

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

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

Trait Implementations

impl Clone for ExpressionData[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for ExpressionData[src]

Auto Trait Implementations

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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