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
Tuple Fields of This
0: ThisExpr
Tuple Fields of Array
0: ArrayLit
Tuple Fields of Object
0: ObjectLit
Tuple Fields of Fn
0: FnExpr
Tuple Fields of Unary
0: UnaryExpr
++v
, --v
, v++
, v--
Tuple Fields of Update
0: UpdateExpr
Tuple Fields of Bin
0: BinExpr
Tuple Fields of Assign
0: AssignExpr
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
true ? ‘a’ : ‘b’
Tuple Fields of Cond
0: CondExpr
Tuple Fields of Call
0: CallExpr
new Cat()
Tuple Fields of New
0: NewExpr
Tuple Fields of Seq
0: SeqExpr
Tuple Fields of Ident
0: Ident
Tuple Fields of Lit
0: Lit
Tuple Fields of Tpl
0: Tpl
Tuple Fields of TaggedTpl
0: TaggedTpl
Tuple Fields of Arrow
0: ArrowExpr
Tuple Fields of Class
0: ClassExpr
Tuple Fields of Yield
0: YieldExpr
Tuple Fields of MetaProp
0: MetaPropExpr
Tuple Fields of Await
0: AwaitExpr
Tuple Fields of Paren
0: ParenExpr
Tuple Fields of JSXMember
Tuple Fields of JSXNamespacedName
Tuple Fields of JSXEmpty
0: JSXEmptyExpr
Tuple Fields of JSXElement
0: Box<JSXElement>
Tuple Fields of JSXFragment
0: JSXFragment
Tuple Fields of TsTypeAssertion
Tuple Fields of TsConstAssertion
Tuple Fields of TsNonNull
Tuple Fields of TsAs
0: TsAsExpr
Tuple Fields of PrivateName
0: PrivateName
Tuple Fields of OptChain
0: OptChainExpr
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