Skip to main content

ExpressionType

Enum ExpressionType 

Source
pub enum ExpressionType {
Show 22 variants ExpressionWhichCanBePattern(ExpressionPatternType), Literal(LiteralData), MemberExpression(MemberExpressionType), ThisExpression { meta: Meta, }, ArrayExpression { meta: Meta, elements: Vec<Option<ExpressionOrSpreadElement>>, }, ObjectExpression { meta: Meta, properties: Vec<PropertyData<Box<ExpressionType>>>, }, FunctionOrGeneratorExpression(FunctionData), UnaryExpression { meta: Meta, operator: UnaryOperator, argument: Box<ExpressionType>, }, UpdateExpression { meta: Meta, operator: UpdateOperator, argument: Box<ExpressionType>, prefix: bool, }, BinaryExpression { meta: Meta, operator: BinaryOperator, left: Box<ExpressionType>, right: Box<ExpressionType>, }, AssignmentExpression { meta: Meta, operator: AssignmentOperator, left: PatternOrExpression, right: Box<ExpressionType>, }, LogicalExpression { meta: Meta, operator: LogicalOperator, left: Box<ExpressionType>, right: Box<ExpressionType>, }, ConditionalExpression { meta: Meta, test: Box<ExpressionType>, consequent: Box<ExpressionType>, alternate: Box<ExpressionType>, }, CallExpression { meta: Meta, callee: ExpressionOrSuper, arguments: Vec<ExpressionOrSpreadElement>, }, NewExpression { meta: Meta, callee: Box<ExpressionType>, arguments: Vec<ExpressionOrSpreadElement>, }, SequenceExpression { meta: Meta, expressions: Vec<Box<ExpressionType>>, }, ArrowFunctionExpression { meta: Meta, params: Vec<PatternType>, body: Box<FunctionBodyOrExpression>, }, YieldExpression { meta: Meta, argument: Option<Box<ExpressionType>>, delegate: bool, }, TemplateLiteral(TemplateLiteralData), TaggedTemplateExpression { meta: Meta, tag: Box<ExpressionType>, quasi: TemplateLiteralData, }, ClassExpression(ClassData), MetaProperty { meta: Meta, meta_object: IdentifierData, property: IdentifierData, },
}

Variants§

§

ExpressionWhichCanBePattern(ExpressionPatternType)

§

Literal(LiteralData)

§

MemberExpression(MemberExpressionType)

§

ThisExpression

Fields

§meta: Meta
§

ArrayExpression

§

ObjectExpression

Fields

§meta: Meta
§

FunctionOrGeneratorExpression(FunctionData)

§

UnaryExpression

Fields

§meta: Meta
§operator: UnaryOperator
§

UpdateExpression

Fields

§meta: Meta
§prefix: bool
§

BinaryExpression

§

AssignmentExpression

§

LogicalExpression

§

ConditionalExpression

Fields

§meta: Meta
§consequent: Box<ExpressionType>
§alternate: Box<ExpressionType>
§

CallExpression

§

NewExpression

§

SequenceExpression

Fields

§meta: Meta
§expressions: Vec<Box<ExpressionType>>
§

ArrowFunctionExpression

§

YieldExpression

Fields

§meta: Meta
§delegate: bool
§

TemplateLiteral(TemplateLiteralData)

§

TaggedTemplateExpression

§

ClassExpression(ClassData)

§

MetaProperty

Fields

§meta: Meta
§meta_object: IdentifierData

Trait Implementations§

Source§

impl Debug for ExpressionType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl HasMeta for ExpressionType

Source§

fn get_meta(&self) -> &Meta

Source§

fn to_formatted_string(&self, script: &str) -> String

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.