[−][src]Trait lrpar::NonStreamingLexer
A NonStreamingLexer
is one that takes input in one go, and is then able to hand out
substrings to that input and calculate line and column numbers from a Span.
Required methods
pub fn span_str(&self, span: Span) -> &'input str
[src]
pub fn span_lines_str(&self, span: Span) -> &'input str
[src]
Return the lines containing the input at span
(including all the text on the lines
that span
starts and ends on).
Panics
If the span exceeds the known input.
pub fn line_col(&self, span: Span) -> ((usize, usize), (usize, usize))
[src]
Return ((start line, start column), (end line, end column))
for span
. Note that column
characters (not bytes) are returned.
Panics
If the span exceeds the known input.