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

Tuple Fields of This

0: &'a ThisExpr<'a>
Array

Tuple Fields of Array

0: &'a ArrayLit<'a>
Object

Tuple Fields of Object

0: &'a ObjectLit<'a>
Fn

Tuple Fields of Fn

0: &'a FnExpr<'a>
Unary

Tuple Fields of Unary

0: &'a UnaryExpr<'a>
Update

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

Tuple Fields of Update

0: &'a UpdateExpr<'a>
Bin

Tuple Fields of Bin

0: &'a BinExpr<'a>
Assign

Tuple Fields of Assign

0: &'a AssignExpr<'a>
Member

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

true ? ‘a’ : ‘b’

Tuple Fields of Cond

0: &'a CondExpr<'a>
Call

Tuple Fields of Call

0: &'a CallExpr<'a>
New

new Cat()

Tuple Fields of New

0: &'a NewExpr<'a>
Seq

Tuple Fields of Seq

0: &'a SeqExpr<'a>
Ident

Tuple Fields of Ident

0: &'a Ident<'a>
Lit

Tuple Fields of Lit

0: Lit<'a>
Tpl

Tuple Fields of Tpl

0: &'a Tpl<'a>
TaggedTpl

Tuple Fields of TaggedTpl

0: &'a TaggedTpl<'a>
Arrow

Tuple Fields of Arrow

0: &'a ArrowExpr<'a>
Class

Tuple Fields of Class

0: &'a ClassExpr<'a>
Yield

Tuple Fields of Yield

0: &'a YieldExpr<'a>
MetaProp

Tuple Fields of MetaProp

0: &'a MetaPropExpr<'a>
Await

Tuple Fields of Await

0: &'a AwaitExpr<'a>
Paren

Tuple Fields of Paren

0: &'a ParenExpr<'a>
JSXMember

Tuple Fields of JSXMember

0: &'a JSXMemberExpr<'a>
JSXNamespacedName

Tuple Fields of JSXNamespacedName

0: &'a JSXNamespacedName<'a>
JSXEmpty

Tuple Fields of JSXEmpty

0: &'a JSXEmptyExpr<'a>
JSXElement

Tuple Fields of JSXElement

0: &'a JSXElement<'a>
JSXFragment

Tuple Fields of JSXFragment

0: &'a JSXFragment<'a>
TsTypeAssertion

Tuple Fields of TsTypeAssertion

0: &'a TsTypeAssertion<'a>
TsConstAssertion

Tuple Fields of TsConstAssertion

0: &'a TsConstAssertion<'a>
TsNonNull

Tuple Fields of TsNonNull

0: &'a TsNonNullExpr<'a>
TsAs

Tuple Fields of TsAs

0: &'a TsAsExpr<'a>
PrivateName

Tuple Fields of PrivateName

0: &'a PrivateName<'a>
OptChain

Tuple Fields of OptChain

0: &'a OptChainExpr<'a>
Invalid

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.

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.