pub enum Expr {
Prefix(PrefixExpr),
Postfix(PostfixExpr),
Infix(InfixExpr),
Paren(ParenExpr),
FunctionCall(FunctionCall),
IntegerLit(IntegerLit),
FloatLit(FloatLit),
StringLit(StringLit),
BooleanLit(BooleanLit),
Path(Path),
ListExpr(ListExpr),
DivertTarget(DivertTargetExpr),
}Expand description
A typed expression node.
Covers every node kind the Pratt expression parser can produce.
Variants§
Prefix(PrefixExpr)
Postfix(PostfixExpr)
Infix(InfixExpr)
Paren(ParenExpr)
FunctionCall(FunctionCall)
IntegerLit(IntegerLit)
FloatLit(FloatLit)
StringLit(StringLit)
BooleanLit(BooleanLit)
Path(Path)
ListExpr(ListExpr)
DivertTarget(DivertTargetExpr)
Trait Implementations§
Source§impl AstNode for Expr
impl AstNode for Expr
Source§fn can_cast(kind: SyntaxKind) -> bool
fn can_cast(kind: SyntaxKind) -> bool
Returns
true if a node with the given kind can be cast to Self.Source§fn cast(node: SyntaxNode) -> Option<Self>
fn cast(node: SyntaxNode) -> Option<Self>
Try to cast a generic
SyntaxNode into this typed wrapper.Source§fn syntax(&self) -> &SyntaxNode
fn syntax(&self) -> &SyntaxNode
Access the underlying
SyntaxNode.impl Eq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl !RefUnwindSafe for Expr
impl !Send for Expr
impl !Sync for Expr
impl !UnwindSafe for Expr
impl Freeze for Expr
impl Unpin for Expr
impl UnsafeUnpin for Expr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more