pub struct LRNonStreamingLexer<'lexer, 'input: 'lexer, LexemeT, StorageT: Debug> { /* private fields */ }
Expand description

An LRNonStreamingLexer holds a reference to a string and can lex it into lrpar::Lexemes. Although the struct is tied to a single string, no guarantees are made about whether the lexemes are cached or not.

Implementations

Create a new LRNonStreamingLexer that read in: the input s; and derived lexemes and newlines.

Note that if one or more lexemes or newlines was not created from s, subsequent calls to the LRNonStreamingLexer may cause panics.

Trait Implementations

Iterate over all the lexemes in this lexer. Note that: Read more

Return the user input associated with a Span. Read more

Return the lines containing the input at span (including all the text on the lines that span starts and ends on). Read more

Return ((start line, start column), (end line, end column)) for span. Note that column characters (not bytes) are returned. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.