#[repr(u8)]pub enum DotTokenType {
Show 26 variants
Identifier = 0,
String = 1,
Number = 2,
Whitespace = 3,
Newline = 4,
Graph = 5,
Digraph = 6,
Subgraph = 7,
Node = 8,
Edge = 9,
Strict = 10,
Arrow = 11,
Line = 12,
Equal = 13,
Semicolon = 14,
Comma = 15,
LeftBrace = 16,
RightBrace = 17,
LeftBracket = 18,
RightBracket = 19,
LeftParen = 20,
RightParen = 21,
Comment = 22,
Root = 23,
Error = 24,
Eof = 25,
}Expand description
Token types for the DOT language.
Variants§
Identifier = 0
An identifier.
String = 1
A string literal.
Number = 2
A number literal.
Whitespace = 3
Whitespace.
Newline = 4
A newline.
Graph = 5
The graph keyword.
Digraph = 6
The digraph keyword.
Subgraph = 7
The subgraph keyword.
Node = 8
The node keyword.
Edge = 9
The edge keyword.
Strict = 10
The strict keyword.
Arrow = 11
The -> arrow operator.
Line = 12
The -- line operator.
Equal = 13
The = equal operator.
Semicolon = 14
The ; semicolon.
Comma = 15
The , comma.
LeftBrace = 16
The { left brace.
RightBrace = 17
The } right brace.
LeftBracket = 18
The [ left bracket.
RightBracket = 19
The ] right bracket.
LeftParen = 20
The ( left paren.
RightParen = 21
The ) right paren.
Comment = 22
A comment.
Root = 23
The root token.
Error = 24
An error token.
Eof = 25
End of stream marker.
Trait Implementations§
Source§impl Clone for DotTokenType
impl Clone for DotTokenType
Source§fn clone(&self) -> DotTokenType
fn clone(&self) -> DotTokenType
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 DotTokenType
impl Debug for DotTokenType
Source§impl<'de> Deserialize<'de> for DotTokenType
impl<'de> Deserialize<'de> for DotTokenType
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 From<DotTokenType> for DotElementType
impl From<DotTokenType> for DotElementType
Source§fn from(token: DotTokenType) -> Self
fn from(token: DotTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for DotTokenType
impl Hash for DotTokenType
Source§impl PartialEq for DotTokenType
impl PartialEq for DotTokenType
Source§impl Serialize for DotTokenType
impl Serialize for DotTokenType
Source§impl TokenType for DotTokenType
impl TokenType for DotTokenType
Source§const END_OF_STREAM: Self = Self::Eof
const END_OF_STREAM: Self = Self::Eof
A constant representing the end of the input stream.
Source§type Role = UniversalTokenRole
type Role = UniversalTokenRole
The associated role type for this token kind.
Source§fn is_ignored(&self) -> bool
fn is_ignored(&self) -> bool
Returns true if this token represents trivia (whitespace, comments, etc.).
Source§fn is_role(&self, role: Self::Role) -> bool
fn is_role(&self, role: Self::Role) -> bool
Returns true if this token matches the specified language-specific role.
Source§fn is_universal(&self, role: UniversalTokenRole) -> bool
fn is_universal(&self, role: UniversalTokenRole) -> bool
Returns true if this token matches the specified universal role.
Source§fn is_comment(&self) -> bool
fn is_comment(&self) -> bool
Returns true if this token represents a comment.
Source§fn is_whitespace(&self) -> bool
fn is_whitespace(&self) -> bool
Returns true if this token represents whitespace.
Source§fn is_end_of_stream(&self) -> bool
fn is_end_of_stream(&self) -> bool
Returns true if this token represents the end of the input stream.
impl Copy for DotTokenType
impl Eq for DotTokenType
impl StructuralPartialEq for DotTokenType
Auto Trait Implementations§
impl Freeze for DotTokenType
impl RefUnwindSafe for DotTokenType
impl Send for DotTokenType
impl Sync for DotTokenType
impl Unpin for DotTokenType
impl UnsafeUnpin for DotTokenType
impl UnwindSafe for DotTokenType
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