pub struct Token<'src> {
pub column: usize,
pub kind: TokenKind,
pub length: usize,
pub line: usize,
pub offset: usize,
pub path: &'src Path,
pub src: &'src str,
}
Fieldsยง
ยงcolumn: usize
ยงkind: TokenKind
ยงlength: usize
ยงline: usize
ยงoffset: usize
ยงpath: &'src Path
ยงsrc: &'src str
Implementationsยง
Sourceยงimpl<'src> Token<'src>
impl<'src> Token<'src>
pub fn lexeme(&self) -> &'src str
pub fn error(&self, kind: CompileErrorKind<'src>) -> CompileError<'src>
Trait Implementationsยง
Sourceยงimpl<'src> ColorDisplay for Token<'src>
impl<'src> ColorDisplay for Token<'src>
Sourceยงimpl<'src> Ord for Token<'src>
impl<'src> Ord for Token<'src>
1.21.0 ยท Sourceยงfn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Sourceยงimpl<'src> PartialOrd for Token<'src>
impl<'src> PartialOrd for Token<'src>
impl<'src> Copy for Token<'src>
impl<'src> Eq for Token<'src>
impl<'src> StructuralPartialEq for Token<'src>
Auto Trait Implementationsยง
impl<'src> Freeze for Token<'src>
impl<'src> RefUnwindSafe for Token<'src>
impl<'src> Send for Token<'src>
impl<'src> Sync for Token<'src>
impl<'src> Unpin for Token<'src>
impl<'src> UnwindSafe for Token<'src>
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