Enum dprint_swc_ecma_ast_view::Expr[][src]

pub enum Expr<'a> {
Show 35 variants This(&'a ThisExpr<'a>), Array(&'a ArrayLit<'a>), Object(&'a ObjectLit<'a>), Fn(&'a FnExpr<'a>), Unary(&'a UnaryExpr<'a>), Update(&'a UpdateExpr<'a>), Bin(&'a BinExpr<'a>), Assign(&'a AssignExpr<'a>), Member(&'a MemberExpr<'a>), Cond(&'a CondExpr<'a>), Call(&'a CallExpr<'a>), New(&'a NewExpr<'a>), Seq(&'a SeqExpr<'a>), Ident(&'a Ident<'a>), Lit(Lit<'a>), Tpl(&'a Tpl<'a>), TaggedTpl(&'a TaggedTpl<'a>), Arrow(&'a ArrowExpr<'a>), Class(&'a ClassExpr<'a>), Yield(&'a YieldExpr<'a>), MetaProp(&'a MetaPropExpr<'a>), Await(&'a AwaitExpr<'a>), Paren(&'a ParenExpr<'a>), JSXMember(&'a JSXMemberExpr<'a>), JSXNamespacedName(&'a JSXNamespacedName<'a>), JSXEmpty(&'a JSXEmptyExpr<'a>), JSXElement(&'a JSXElement<'a>), JSXFragment(&'a JSXFragment<'a>), TsTypeAssertion(&'a TsTypeAssertion<'a>), TsConstAssertion(&'a TsConstAssertion<'a>), TsNonNull(&'a TsNonNullExpr<'a>), TsAs(&'a TsAsExpr<'a>), PrivateName(&'a PrivateName<'a>), OptChain(&'a OptChainExpr<'a>), Invalid(&'a Invalid<'a>),
}

Variants

This(&'a ThisExpr<'a>)

Tuple Fields of This

0: &'a ThisExpr<'a>
Array(&'a ArrayLit<'a>)

Tuple Fields of Array

0: &'a ArrayLit<'a>
Object(&'a ObjectLit<'a>)

Tuple Fields of Object

0: &'a ObjectLit<'a>
Fn(&'a FnExpr<'a>)

Tuple Fields of Fn

0: &'a FnExpr<'a>
Unary(&'a UnaryExpr<'a>)

Tuple Fields of Unary

0: &'a UnaryExpr<'a>
Update(&'a UpdateExpr<'a>)

++v, --v, v++, v--

Tuple Fields of Update

0: &'a UpdateExpr<'a>
Bin(&'a BinExpr<'a>)

Tuple Fields of Bin

0: &'a BinExpr<'a>
Assign(&'a AssignExpr<'a>)

Tuple Fields of Assign

0: &'a AssignExpr<'a>
Member(&'a MemberExpr<'a>)

A member expression. If computed is true, the node corresponds to a computed (a[b]) member expression and property is an Expression. If computed is false, the node corresponds to a static (a.b) member expression and property is an Identifier.

Tuple Fields of Member

0: &'a MemberExpr<'a>
Cond(&'a CondExpr<'a>)

true ? ‘a’ : ‘b’

Tuple Fields of Cond

0: &'a CondExpr<'a>
Call(&'a CallExpr<'a>)

Tuple Fields of Call

0: &'a CallExpr<'a>
New(&'a NewExpr<'a>)

new Cat()

Tuple Fields of New

0: &'a NewExpr<'a>
Seq(&'a SeqExpr<'a>)

Tuple Fields of Seq

0: &'a SeqExpr<'a>
Ident(&'a Ident<'a>)

Tuple Fields of Ident

0: &'a Ident<'a>
Lit(Lit<'a>)

Tuple Fields of Lit

0: Lit<'a>
Tpl(&'a Tpl<'a>)

Tuple Fields of Tpl

0: &'a Tpl<'a>
TaggedTpl(&'a TaggedTpl<'a>)

Tuple Fields of TaggedTpl

0: &'a TaggedTpl<'a>
Arrow(&'a ArrowExpr<'a>)

Tuple Fields of Arrow

0: &'a ArrowExpr<'a>
Class(&'a ClassExpr<'a>)

Tuple Fields of Class

0: &'a ClassExpr<'a>
Yield(&'a YieldExpr<'a>)

Tuple Fields of Yield

0: &'a YieldExpr<'a>
MetaProp(&'a MetaPropExpr<'a>)

Tuple Fields of MetaProp

0: &'a MetaPropExpr<'a>
Await(&'a AwaitExpr<'a>)

Tuple Fields of Await

0: &'a AwaitExpr<'a>
Paren(&'a ParenExpr<'a>)

Tuple Fields of Paren

0: &'a ParenExpr<'a>
JSXMember(&'a JSXMemberExpr<'a>)

Tuple Fields of JSXMember

0: &'a JSXMemberExpr<'a>
JSXNamespacedName(&'a JSXNamespacedName<'a>)

Tuple Fields of JSXNamespacedName

0: &'a JSXNamespacedName<'a>
JSXEmpty(&'a JSXEmptyExpr<'a>)

Tuple Fields of JSXEmpty

0: &'a JSXEmptyExpr<'a>
JSXElement(&'a JSXElement<'a>)

Tuple Fields of JSXElement

0: &'a JSXElement<'a>
JSXFragment(&'a JSXFragment<'a>)

Tuple Fields of JSXFragment

0: &'a JSXFragment<'a>
TsTypeAssertion(&'a TsTypeAssertion<'a>)

Tuple Fields of TsTypeAssertion

0: &'a TsTypeAssertion<'a>
TsConstAssertion(&'a TsConstAssertion<'a>)

Tuple Fields of TsConstAssertion

0: &'a TsConstAssertion<'a>
TsNonNull(&'a TsNonNullExpr<'a>)

Tuple Fields of TsNonNull

0: &'a TsNonNullExpr<'a>
TsAs(&'a TsAsExpr<'a>)

Tuple Fields of TsAs

0: &'a TsAsExpr<'a>
PrivateName(&'a PrivateName<'a>)

Tuple Fields of PrivateName

0: &'a PrivateName<'a>
OptChain(&'a OptChainExpr<'a>)

Tuple Fields of OptChain

0: &'a OptChainExpr<'a>
Invalid(&'a Invalid<'a>)

Tuple Fields of Invalid

0: &'a Invalid<'a>

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Performs the conversion.

Performs the conversion.

Gets the previous siblings in the order they appear in the file.

Gets the next siblings in the order they appear in the file.

Gets the root node.

Gets the root node if the view was created from a Module; otherwise panics.

Gets the root node if the view was created from a Script; otherwise panics.

Gets the previous tokens in the order they appear in the file.

Gets the next tokens in the order they appear in the file.

Get span of self.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more