Enum ratel::grammar::Expression [] [src]

pub enum Expression {
    This,
    Identifier(OwnedSlice),
    Literal(Value),
    Template {
        tag: Option<Box<Expression>>,
        expressions: Vec<Expression>,
        quasis: Vec<OwnedSlice>,
    },
    RegEx {
        pattern: OwnedSlice,
        flags: OwnedSlice,
    },
    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 {
        parenthesized: bool,
        operator: OperatorType,
        left: Box<Expression>,
        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

Fields

Fields

Fields

Fields

Fields

Fields

Fields

Fields

Fields

Fields

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.