pub enum AstNode {
Show 15 variants
Expr(ExprNode),
Value(ValueNode),
ContextItem(ContextItemNode),
VarRef(VarRefNode),
If(IfNode),
For(ForNode),
Quantified(QuantifiedNode),
FunctionCall(FunctionCallNode),
PathExpr(PathExprNode),
FilterExpr(FilterExprNode),
Range(RangeNode),
UnaryOp(UnaryOpNode),
BinaryOp(BinaryOpNode),
PathStep(PathStepNode),
TypeExpr(TypeExprNode),
}Expand description
The main AST node type, encompassing all possible expression types.
Variants§
Expr(ExprNode)
Comma-separated sequence of expressions.
Value(ValueNode)
Literal value (string, number, boolean, empty).
ContextItem(ContextItemNode)
Context item reference (.).
VarRef(VarRefNode)
Variable reference ($name).
If(IfNode)
Conditional expression (if ... then ... else).
For(ForNode)
For expression (for $x in ... return).
Quantified(QuantifiedNode)
Quantified expression (some/every ... satisfies).
FunctionCall(FunctionCallNode)
Function call (name(...)).
PathExpr(PathExprNode)
Path expression (absolute or relative).
FilterExpr(FilterExprNode)
Filter expression (expr[predicate]).
Range(RangeNode)
Range expression (expr to expr).
UnaryOp(UnaryOpNode)
Unary operator (+ or -).
BinaryOp(BinaryOpNode)
Binary operator (arithmetic, comparison, logical, etc.).
PathStep(PathStepNode)
Single path step (axis + node test + predicates).
TypeExpr(TypeExprNode)
Type expression (instance of, treat as, cast as, castable as).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AstNode
impl RefUnwindSafe for AstNode
impl Send for AstNode
impl Sync for AstNode
impl Unpin for AstNode
impl UnsafeUnpin for AstNode
impl UnwindSafe for AstNode
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