Struct moore_common::lexer::BufferedLexer [] [src]

pub struct BufferedLexer<T> { /* fields omitted */ }

A buffered lexer that allows tokens to be peeked at before they are actually consumed.

Methods

impl<T: Clone + PartialEq> BufferedLexer<T>
[src]

[src]

Create a new buffered lexer.

[src]

Peek at a token not yet consumed. This function merely returns a reference to said token. Use pop() to advance the lexer.

[src]

Insert a token in front of the stream such that it becomes the next token to be returned from peek(0) or pop().

[src]

Consume and return the current token. This is the same token that would be returned by peek(0).

[src]

[src]