syntax.Lexer
trait pub LexerA type that turns a buffer into a token stream.
Required methods
buffer
Show source codeHide source code
fn pub mut buffer -> mut Bufferfn pub mut buffer -> mut BufferThe buffer to turn into a token stream.
next
Show source codeHide source code
fn pub mut next -> Option[Token]fn pub mut next -> Option[Token]Returns the next token in the token stream.
Default methods
to_array
Show source codeHide source code
fn pub move to_array -> Array[Token] {
let tokens = []
loop {
let Some(t) = self.next else break
tokens.push(t)
}
tokens
}fn pub move to_array -> Array[Token]Returns an Array containing all the tokens in the token stream.
Implementations
Lexer
impl Lexer for LexerLexer
impl Lexer for LexerLexer
impl Lexer for LexerLexer
impl Lexer for LexerLexer
impl Lexer for LexerLexer
impl Lexer for LexerLexer
impl Lexer for LexerLexer
impl Lexer for LexerLexer
impl Lexer for Lexer