Enum badger::grammar::Expression [] [src]

pub enum Expression {
    This,
    Identifier(OwnedSlice),
    Literal(LiteralValue),
    Array(Vec<Expression>),
    Sequence(Vec<Expression>),
    Object(Vec<ObjectMember>),
    Member {
        object: Box<Expression>,
        property: OwnedSlice,
    },
    ComputedMember {
        object: Box<Expression>,
        property: Box<Expression>,
    },
    Call {
        callee: Box<Expression>,
        arguments: Vec<Expression>,
    },
    Binary {
        left: Box<Expression>,
        operator: OperatorType,
        right: Box<Expression>,
    },
    Prefix {
        operator: OperatorType,
        operand: Box<Expression>,
    },
    Postfix {
        operator: OperatorType,
        operand: Box<Expression>,
    },
    Conditional {
        test: Box<Expression>,
        consequent: Box<Expression>,
        alternate: Box<Expression>,
    },
    ArrowFunction {
        params: Vec<Parameter>,
        body: Box<Statement>,
    },
    Function {
        name: Option<OwnedSlice>,
        params: Vec<Parameter>,
        body: Vec<Statement>,
    },
}

Variants

Fields of Member

Fields of ComputedMember

Fields of Call

Fields of Binary

Fields of Prefix

Fields of Postfix

Fields of Conditional

Fields of ArrowFunction

Fields of Function

Methods

impl Expression
[src]

Trait Implementations

impl Debug for Expression
[src]

Formats the value using the given formatter.

impl PartialEq for Expression
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for Expression
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl From<&'static str> for Expression
[src]

Performs the conversion.

impl From<OwnedSlice> for Expression
[src]

Performs the conversion.

impl<'a> From<&'a OwnedSlice> for Expression
[src]

Performs the conversion.