Enum swc_ecma_ast::Expr [−][src]
pub enum Expr {
Show 35 variants
This(ThisExpr),
Array(ArrayLit),
Object(ObjectLit),
Fn(FnExpr),
Unary(UnaryExpr),
Update(UpdateExpr),
Bin(BinExpr),
Assign(AssignExpr),
Member(MemberExpr),
Cond(CondExpr),
Call(CallExpr),
New(NewExpr),
Seq(SeqExpr),
Ident(Ident),
Lit(Lit),
Tpl(Tpl),
TaggedTpl(TaggedTpl),
Arrow(ArrowExpr),
Class(ClassExpr),
Yield(YieldExpr),
MetaProp(MetaPropExpr),
Await(AwaitExpr),
Paren(ParenExpr),
JSXMember(JSXMemberExpr),
JSXNamespacedName(JSXNamespacedName),
JSXEmpty(JSXEmptyExpr),
JSXElement(Box<JSXElement>),
JSXFragment(JSXFragment),
TsTypeAssertion(TsTypeAssertion),
TsConstAssertion(TsConstAssertion),
TsNonNull(TsNonNullExpr),
TsAs(TsAsExpr),
PrivateName(PrivateName),
OptChain(OptChainExpr),
Invalid(Invalid),
}
Variants
This(ThisExpr)
Tuple Fields of This
0: ThisExpr
Array(ArrayLit)
Tuple Fields of Array
0: ArrayLit
Object(ObjectLit)
Tuple Fields of Object
0: ObjectLit
Fn(FnExpr)
Tuple Fields of Fn
0: FnExpr
Unary(UnaryExpr)
Tuple Fields of Unary
0: UnaryExpr
Update(UpdateExpr)
++v
, --v
, v++
, v--
Tuple Fields of Update
0: UpdateExpr
Bin(BinExpr)
Tuple Fields of Bin
0: BinExpr
Assign(AssignExpr)
Tuple Fields of Assign
0: AssignExpr
Member(MemberExpr)
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: MemberExpr
Cond(CondExpr)
true ? ‘a’ : ‘b’
Tuple Fields of Cond
0: CondExpr
Call(CallExpr)
Tuple Fields of Call
0: CallExpr
New(NewExpr)
new Cat()
Tuple Fields of New
0: NewExpr
Seq(SeqExpr)
Tuple Fields of Seq
0: SeqExpr
Ident(Ident)
Tuple Fields of Ident
0: Ident
Lit(Lit)
Tuple Fields of Lit
0: Lit
Tpl(Tpl)
Tuple Fields of Tpl
0: Tpl
TaggedTpl(TaggedTpl)
Tuple Fields of TaggedTpl
0: TaggedTpl
Arrow(ArrowExpr)
Tuple Fields of Arrow
0: ArrowExpr
Class(ClassExpr)
Tuple Fields of Class
0: ClassExpr
Yield(YieldExpr)
Tuple Fields of Yield
0: YieldExpr
MetaProp(MetaPropExpr)
Tuple Fields of MetaProp
0: MetaPropExpr
Await(AwaitExpr)
Tuple Fields of Await
0: AwaitExpr
Paren(ParenExpr)
Tuple Fields of Paren
0: ParenExpr
JSXMember(JSXMemberExpr)
Tuple Fields of JSXMember
JSXNamespacedName(JSXNamespacedName)
Tuple Fields of JSXNamespacedName
JSXEmpty(JSXEmptyExpr)
Tuple Fields of JSXEmpty
0: JSXEmptyExpr
JSXElement(Box<JSXElement>)
Tuple Fields of JSXElement
0: Box<JSXElement>
JSXFragment(JSXFragment)
Tuple Fields of JSXFragment
0: JSXFragment
TsTypeAssertion(TsTypeAssertion)
Tuple Fields of TsTypeAssertion
TsConstAssertion(TsConstAssertion)
Tuple Fields of TsConstAssertion
TsNonNull(TsNonNullExpr)
Tuple Fields of TsNonNull
TsAs(TsAsExpr)
Tuple Fields of TsAs
0: TsAsExpr
PrivateName(PrivateName)
Tuple Fields of PrivateName
0: PrivateName
OptChain(OptChainExpr)
Tuple Fields of OptChain
0: OptChainExpr
Invalid(Invalid)
Tuple Fields of Invalid
0: Invalid
Implementations
Returns Some
if self
is of variant This
, and None
otherwise.
Returns Some
if self
is of variant Array
, and None
otherwise.
Returns Some
if self
is of variant Object
, and None
otherwise.
Returns true
if self
is of variant Fn
.
Returns Some
if self
is of variant Fn
, and None
otherwise.
Returns Some
if self
is of variant Unary
, and None
otherwise.
Returns Some
if self
is of variant Update
, and None
otherwise.
Returns Some
if self
is of variant Assign
, and None
otherwise.
Returns Some
if self
is of variant Member
, and None
otherwise.
Returns Some
if self
is of variant Cond
, and None
otherwise.
Returns Some
if self
is of variant Call
, and None
otherwise.
Returns Some
if self
is of variant Ident
, and None
otherwise.
Returns true
if self
is of variant TaggedTpl
.
Returns Some
if self
is of variant TaggedTpl
, and None
otherwise.
Returns Some
if self
is of variant Arrow
, and None
otherwise.
Returns Some
if self
is of variant Class
, and None
otherwise.
Returns true
if self
is of variant Yield
.
Returns Some
if self
is of variant Yield
, and None
otherwise.
Returns true
if self
is of variant MetaProp
.
Returns Some
if self
is of variant MetaProp
, and None
otherwise.
Returns true
if self
is of variant Await
.
Returns Some
if self
is of variant Await
, and None
otherwise.
Returns Some
if self
is of variant Paren
, and None
otherwise.
Returns true
if self
is of variant JSXMember
.
Returns Some
if self
is of variant JSXMember
, and None
otherwise.
Returns true
if self
is of variant JSXNamespacedName
.
Unwraps the value, yielding the content of JSXNamespacedName
.
Panics
Panics if the value is not JSXNamespacedName
, with a panic message including the content of self
.
Returns Some
if self
is of variant JSXNamespacedName
, and None
otherwise.
Returns true
if self
is of variant JSXEmpty
.
Returns Some
if self
is of variant JSXEmpty
, and None
otherwise.
Returns true
if self
is of variant JSXElement
.
Unwraps the value, yielding the content of JSXElement
.
Panics
Panics if the value is not JSXElement
, with a panic message including the content of self
.
Returns Some
if self
is of variant JSXElement
, and None
otherwise.
Returns true
if self
is of variant JSXFragment
.
Unwraps the value, yielding the content of JSXFragment
.
Panics
Panics if the value is not JSXFragment
, with a panic message including the content of self
.
Returns Some
if self
is of variant JSXFragment
, and None
otherwise.
Returns true
if self
is of variant TsTypeAssertion
.
Unwraps the value, yielding the content of TsTypeAssertion
.
Panics
Panics if the value is not TsTypeAssertion
, with a panic message including the content of self
.
Returns Some
if self
is of variant TsTypeAssertion
, and None
otherwise.
Returns true
if self
is of variant TsConstAssertion
.
Unwraps the value, yielding the content of TsConstAssertion
.
Panics
Panics if the value is not TsConstAssertion
, with a panic message including the content of self
.
Returns Some
if self
is of variant TsConstAssertion
, and None
otherwise.
Returns true
if self
is of variant TsNonNull
.
Returns Some
if self
is of variant TsNonNull
, and None
otherwise.
Returns Some
if self
is of variant TsAs
, and None
otherwise.
Returns true
if self
is of variant PrivateName
.
Unwraps the value, yielding the content of PrivateName
.
Panics
Panics if the value is not PrivateName
, with a panic message including the content of self
.
Returns Some
if self
is of variant PrivateName
, and None
otherwise.
Returns true
if self
is of variant OptChain
.
Returns Some
if self
is of variant OptChain
, and None
otherwise.
Returns true
if self
is of variant Invalid
.
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Expr
impl UnwindSafe for Expr
Blanket Implementations
Mutably borrows from an owned value. Read more
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