pub enum AstNodeType {
Show 24 variants
Function,
Parameter,
Return,
Variable,
Assignment,
BinaryOp,
UnaryOp,
Conditional,
Loop,
Call,
Literal,
Index,
FieldAccess,
Block,
TypeAnnotation,
Generic,
Match,
MatchArm,
Struct,
Enum,
Trait,
Impl,
Module,
Import,
}Expand description
Types of AST nodes for code analysis
Variants§
Function
Function or method definition
Parameter
Function/method parameter
Return
Return statement or expression
Variable
Variable declaration
Assignment
Assignment expression
BinaryOp
Binary operation (e.g., +, -, *, /)
UnaryOp
Unary operation (e.g., !, -)
Conditional
If/else conditional
Loop
Loop construct (for, while, loop)
Call
Function call expression
Literal
Literal value (number, string, bool)
Index
Array/vector access
FieldAccess
Field access (e.g., obj.field)
Block
Block of statements
TypeAnnotation
Type annotation
Generic
Generic type parameter
Match
Match/switch expression
MatchArm
Match arm
Struct
Struct definition
Enum
Enum definition
Trait
Trait/interface definition
Impl
Implementation block
Module
Module declaration
Import
Import/use statement
Trait Implementations§
Source§impl Clone for AstNodeType
impl Clone for AstNodeType
Source§fn clone(&self) -> AstNodeType
fn clone(&self) -> AstNodeType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AstNodeType
impl Debug for AstNodeType
Source§impl Display for AstNodeType
impl Display for AstNodeType
Source§impl Hash for AstNodeType
impl Hash for AstNodeType
Source§impl PartialEq for AstNodeType
impl PartialEq for AstNodeType
impl Copy for AstNodeType
impl Eq for AstNodeType
impl StructuralPartialEq for AstNodeType
Auto Trait Implementations§
impl Freeze for AstNodeType
impl RefUnwindSafe for AstNodeType
impl Send for AstNodeType
impl Sync for AstNodeType
impl Unpin for AstNodeType
impl UnwindSafe for AstNodeType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more