pub enum TokenState {
Word,
LDelimiter,
RDelimiter,
BDelimiter,
SymbolString,
NewLine,
WhiteSpace,
SLComment,
MLComment,
}
Expand description
Represents the type of a token in the tokenisation process.
Each token in the parsed text is classified as one of these types, which determines how it is interpreted and processed.
Variants§
Word
A sequence of non-special characters (excluding whitespace).
LDelimiter
A left delimiter of a pair (e.g., opening bracket).
RDelimiter
A right delimiter of a pair (e.g., closing bracket).
BDelimiter
A balanced delimiter that can open or close (e.g., quotation mark).
SymbolString
A sequence of special characters not recognized as delimiters or comments.
NewLine
A newline character sequence (\n, \r, or \r\n).
WhiteSpace
A sequence of whitespace characters (excluding newlines).
SLComment
A single-line comment.
MLComment
A multi-line comment.
Trait Implementations§
Source§impl Clone for TokenState
impl Clone for TokenState
Source§fn clone(&self) -> TokenState
fn clone(&self) -> TokenState
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 TokenState
impl Debug for TokenState
Source§impl PartialEq for TokenState
impl PartialEq for TokenState
impl Copy for TokenState
impl StructuralPartialEq for TokenState
Auto Trait Implementations§
impl Freeze for TokenState
impl RefUnwindSafe for TokenState
impl Send for TokenState
impl Sync for TokenState
impl Unpin for TokenState
impl UnwindSafe for TokenState
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