pub enum ElementType {
Show 17 variants
Expression,
Statement,
For,
ListComprehension,
Block,
Identifier,
Number,
String,
Boolean,
BinaryExpression,
UnaryExpression,
Call,
Index,
Tuple,
List,
Map,
Eof,
}Expand description
Element types for the Racket language parser.
This enum represents all possible element types in Racket, including expressions, statements, and special constructs.
Variants§
Expression
Expression element.
Statement
Statement element.
For
For loop construct.
ListComprehension
List comprehension construct.
Block
Block element.
Identifier
Identifier element.
Number
Number literal element.
String
String literal element.
Boolean
Boolean literal element.
BinaryExpression
Binary expression element.
UnaryExpression
Unary expression element.
Call
Function call element.
Index
Index access element.
Tuple
Tuple element.
List
List element.
Map
Map/dictionary element.
Eof
End of file marker.
Trait Implementations§
Source§impl Clone for ElementType
impl Clone for ElementType
Source§fn clone(&self) -> ElementType
fn clone(&self) -> ElementType
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 ElementType
impl Debug for ElementType
Source§impl ElementType for ElementType
impl ElementType for ElementType
Source§type Role = UniversalElementRole
type Role = UniversalElementRole
The associated role type for this element kind.
Source§fn is_role(&self, role: Self::Role) -> bool
fn is_role(&self, role: Self::Role) -> bool
Returns true if this element matches the specified language-specific role.
Source§fn is_universal(&self, role: UniversalElementRole) -> bool
fn is_universal(&self, role: UniversalElementRole) -> bool
Returns true if this element matches the specified universal role.
Source§impl From<TokenType> for ElementType
impl From<TokenType> for ElementType
Source§impl Hash for ElementType
impl Hash for ElementType
Source§impl PartialEq for ElementType
impl PartialEq for ElementType
impl Copy for ElementType
impl Eq for ElementType
impl StructuralPartialEq for ElementType
Auto Trait Implementations§
impl Freeze for ElementType
impl RefUnwindSafe for ElementType
impl Send for ElementType
impl Sync for ElementType
impl Unpin for ElementType
impl UnsafeUnpin for ElementType
impl UnwindSafe for ElementType
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