pub enum Expr {
Show 46 variants
Literal(Literal),
StringLiteral(StringLiteral),
CmdLiteral(CmdLiteral),
NonstandardIdentifier(NonstandardIdentifier),
Interpolation(Interpolation),
Name(Name),
BinaryExpr(BinaryExpr),
UnaryExpr(UnaryExpr),
ParenExpr(ParenExpr),
TupleExpr(TupleExpr),
VectExpr(VectExpr),
MatrixExpr(MatrixExpr),
Comprehension(Comprehension),
Generator(Generator),
CallExpr(CallExpr),
IndexExpr(IndexExpr),
DotCallExpr(DotCallExpr),
CurlyExpr(CurlyExpr),
Braces(Braces),
AssignmentExpr(AssignmentExpr),
ArrowExpr(ArrowExpr),
TernaryExpr(TernaryExpr),
IfExpr(IfExpr),
BeginExpr(BeginExpr),
QuoteExpr(QuoteExpr),
WhileExpr(WhileExpr),
ForExpr(ForExpr),
LetExpr(LetExpr),
TryExpr(TryExpr),
DoExpr(DoExpr),
FunctionDef(FunctionDef),
MacroCall(MacroCall),
SplatExpr(SplatExpr),
BeginMarker(BeginMarker),
EndMarker(EndMarker),
WhereExpr(WhereExpr),
TypeAnnotation(TypeAnnotation),
ReturnExpr(ReturnExpr),
BreakExpr(BreakExpr),
ContinueExpr(ContinueExpr),
QuoteSym(QuoteSym),
StructDef(StructDef),
AbstractDef(AbstractDef),
PrimitiveDef(PrimitiveDef),
ModuleDef(ModuleDef),
Other(SyntaxNode),
}Expand description
The expression sum: any node that can appear in value position, cast to a
dedicated variant when one exists and to Expr::Other otherwise.
Other keeps the sum total over expression kinds — the Julia grammar is a
growing skeleton, so a kind that has no wrapper yet (e.g. RANGE_EXPR,
COMPARISON_EXPR) still round-trips through Expr instead of being silently
dropped from an operand accessor. Match Other’s SyntaxNode (or its
kind) for those.
Variants§
Literal(Literal)
StringLiteral(StringLiteral)
CmdLiteral(CmdLiteral)
NonstandardIdentifier(NonstandardIdentifier)
Interpolation(Interpolation)
Name(Name)
BinaryExpr(BinaryExpr)
UnaryExpr(UnaryExpr)
ParenExpr(ParenExpr)
TupleExpr(TupleExpr)
VectExpr(VectExpr)
MatrixExpr(MatrixExpr)
Comprehension(Comprehension)
Generator(Generator)
CallExpr(CallExpr)
IndexExpr(IndexExpr)
DotCallExpr(DotCallExpr)
CurlyExpr(CurlyExpr)
Braces(Braces)
AssignmentExpr(AssignmentExpr)
ArrowExpr(ArrowExpr)
TernaryExpr(TernaryExpr)
IfExpr(IfExpr)
BeginExpr(BeginExpr)
QuoteExpr(QuoteExpr)
WhileExpr(WhileExpr)
ForExpr(ForExpr)
LetExpr(LetExpr)
TryExpr(TryExpr)
DoExpr(DoExpr)
FunctionDef(FunctionDef)
MacroCall(MacroCall)
SplatExpr(SplatExpr)
BeginMarker(BeginMarker)
EndMarker(EndMarker)
WhereExpr(WhereExpr)
TypeAnnotation(TypeAnnotation)
ReturnExpr(ReturnExpr)
BreakExpr(BreakExpr)
ContinueExpr(ContinueExpr)
QuoteSym(QuoteSym)
StructDef(StructDef)
AbstractDef(AbstractDef)
PrimitiveDef(PrimitiveDef)
ModuleDef(ModuleDef)
Other(SyntaxNode)
An expression-position node without a dedicated variant (see the type
docs). Guaranteed to satisfy is_expr_kind.
Implementations§
Trait Implementations§
Source§impl AstNode for Expr
impl AstNode for Expr
type Language = JuliaLanguage
fn can_cast(kind: SyntaxKind) -> bool
fn cast(syntax: SyntaxNode) -> Option<Self>
fn syntax(&self) -> &SyntaxNode
fn clone_subtree(&self) -> Selfwhere
Self: Sized,
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 Forget for Expr
impl Freeze for Expr
impl Move 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