pub struct BufferedLexer<T> { /* private fields */ }
Expand description

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

Implementations

Create a new buffered lexer.

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

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

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.