pub enum RhombusElementType {
Show 14 variants
SourceFile,
Whitespace,
Newline,
Comment,
LineComment,
NumberLiteral,
StringLiteral,
BooleanLiteral,
Identifier,
Block,
Statement,
Expression,
Error,
Eof,
}Expand description
Element types for the Rhombus language.
Variants§
SourceFile
A source file.
Whitespace
Whitespace.
Newline
A newline.
Comment
A comment.
LineComment
A line comment.
NumberLiteral
A numeric literal.
StringLiteral
A string literal.
BooleanLiteral
A boolean literal.
Identifier
An identifier.
Block
A block.
Statement
A statement.
Expression
An expression.
Error
An error token.
Eof
End of stream.
Trait Implementations§
Source§impl Clone for RhombusElementType
impl Clone for RhombusElementType
Source§fn clone(&self) -> RhombusElementType
fn clone(&self) -> RhombusElementType
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 RhombusElementType
impl Debug for RhombusElementType
Source§impl<'de> Deserialize<'de> for RhombusElementType
impl<'de> Deserialize<'de> for RhombusElementType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl ElementType for RhombusElementType
impl ElementType for RhombusElementType
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<RhombusTokenType> for RhombusElementType
impl From<RhombusTokenType> for RhombusElementType
Source§fn from(token: RhombusTokenType) -> Self
fn from(token: RhombusTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for RhombusElementType
impl Hash for RhombusElementType
Source§impl PartialEq for RhombusElementType
impl PartialEq for RhombusElementType
Source§impl Serialize for RhombusElementType
impl Serialize for RhombusElementType
impl Copy for RhombusElementType
impl Eq for RhombusElementType
impl StructuralPartialEq for RhombusElementType
Auto Trait Implementations§
impl Freeze for RhombusElementType
impl RefUnwindSafe for RhombusElementType
impl Send for RhombusElementType
impl Sync for RhombusElementType
impl Unpin for RhombusElementType
impl UnsafeUnpin for RhombusElementType
impl UnwindSafe for RhombusElementType
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