logos 0.9.3

Create ridiculously fast Lexers
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// Trait used by the functions contained in the `Lexicon`.
///
/// # WARNING!
///
/// **This trait, and it's methods, are not meant to be used outside of the
/// code produced by `#[derive(Logos)]` macro.**
pub trait LexerInternal {
    /// Read the byte at current position.
    fn read(&self) -> u8;

    /// Bump the position by 1 and read the following byte.
    fn next(&mut self) -> u8;

    /// Bump the position by 1.
    fn bump(&mut self);
}