pub(super) enum Token<'a> {
Literal(Spanned<&'a [u8]>),
Bracket {
kind: BracketKind,
location: Location,
},
ComponentPart {
kind: ComponentKind,
value: Spanned<&'a [u8]>,
},
}
Expand description
A token emitted by the lexer. There is no semantic meaning at this stage.
Variants§
Literal(Spanned<&'a [u8]>)
A literal string, formatted and parsed as-is.
Bracket
An opening or closing bracket. May or may not be the start or end of a component.
Fields
§
kind: BracketKind
Whether the bracket is opening or closing.
ComponentPart
One part of a component. This could be its name, a modifier, or whitespace.
Fields
§
kind: ComponentKind
Whether the part is whitespace or not.
Auto Trait Implementations§
impl<'a> Freeze for Token<'a>
impl<'a> RefUnwindSafe for Token<'a>
impl<'a> Send for Token<'a>
impl<'a> Sync for Token<'a>
impl<'a> Unpin for Token<'a>
impl<'a> UnwindSafe for Token<'a>
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