Enum dprint_swc_ecma_ast_view::Expr [−][src]
pub enum Expr<'a> {}Show 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>)
Array(&'a ArrayLit<'a>)
Object(&'a ObjectLit<'a>)
Fn(&'a FnExpr<'a>)
Unary(&'a UnaryExpr<'a>)
Update(&'a UpdateExpr<'a>)
++v
, --v
, v++
, v--
Bin(&'a BinExpr<'a>)
Assign(&'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.
Cond(&'a CondExpr<'a>)
true ? ‘a’ : ‘b’
Call(&'a CallExpr<'a>)
New(&'a NewExpr<'a>)
new Cat()
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>)
Implementations
Trait Implementations
fn ancestors(&self) -> AncestorIterator<'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;
fn trailing_comments(&self) -> CommentsIterator<'a>ⓘ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