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
Tuple Fields of This
0: &'a ThisExpr<'a>
Tuple Fields of Array
0: &'a ArrayLit<'a>
Tuple Fields of Object
0: &'a ObjectLit<'a>
Tuple Fields of Fn
0: &'a FnExpr<'a>
Tuple Fields of Unary
0: &'a UnaryExpr<'a>
++v
, --v
, v++
, v--
Tuple Fields of Update
0: &'a UpdateExpr<'a>
Tuple Fields of Bin
0: &'a BinExpr<'a>
Tuple Fields of Assign
0: &'a AssignExpr<'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>
true ? ‘a’ : ‘b’
Tuple Fields of Cond
0: &'a CondExpr<'a>
Tuple Fields of Call
0: &'a CallExpr<'a>
new Cat()
Tuple Fields of New
0: &'a NewExpr<'a>
Tuple Fields of Seq
0: &'a SeqExpr<'a>
Tuple Fields of Ident
0: &'a Ident<'a>
Tuple Fields of Lit
0: Lit<'a>
Tuple Fields of Tpl
0: &'a Tpl<'a>
Tuple Fields of TaggedTpl
0: &'a TaggedTpl<'a>
Tuple Fields of Arrow
0: &'a ArrowExpr<'a>
Tuple Fields of Class
0: &'a ClassExpr<'a>
Tuple Fields of Yield
0: &'a YieldExpr<'a>
Tuple Fields of MetaProp
0: &'a MetaPropExpr<'a>
Tuple Fields of Await
0: &'a AwaitExpr<'a>
Tuple Fields of Paren
0: &'a ParenExpr<'a>
Tuple Fields of JSXMember
0: &'a JSXMemberExpr<'a>
Tuple Fields of JSXNamespacedName
0: &'a JSXNamespacedName<'a>
Tuple Fields of JSXEmpty
0: &'a JSXEmptyExpr<'a>
Tuple Fields of JSXElement
0: &'a JSXElement<'a>
Tuple Fields of JSXFragment
0: &'a JSXFragment<'a>
Tuple Fields of TsTypeAssertion
0: &'a TsTypeAssertion<'a>
Tuple Fields of TsConstAssertion
0: &'a TsConstAssertion<'a>
Tuple Fields of TsNonNull
0: &'a TsNonNullExpr<'a>
Tuple Fields of TsAs
0: &'a TsAsExpr<'a>
Tuple Fields of PrivateName
0: &'a PrivateName<'a>
Tuple Fields of OptChain
0: &'a OptChainExpr<'a>
Tuple Fields of Invalid
0: &'a Invalid<'a>
Implementations
Trait Implementations
fn ancestors(&self) -> AncestorIterator<'a>ⓘNotable traits for AncestorIterator<'a>impl<'a> Iterator for AncestorIterator<'a> type Item = Node<'a>;
Notable traits for AncestorIterator<'a>
impl<'a> Iterator for AncestorIterator<'a> type Item = Node<'a>;
Gets the previous siblings in the order they appear in the file.
Gets the next siblings in the order they appear in the file.
fn leading_comments(&self) -> CommentsIterator<'a>ⓘNotable traits for CommentsIterator<'a>impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment;
Notable traits for CommentsIterator<'a>
impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment;
fn trailing_comments(&self) -> CommentsIterator<'a>ⓘNotable traits for CommentsIterator<'a>impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment;
Notable traits for CommentsIterator<'a>
impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment;
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.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Expr<'a>
impl<'a> !UnwindSafe for Expr<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more