[−][src]Trait moore::lexer::Reader
A trait that can supply a peekable stream of characters.
Required methods
fn peek(&mut self, offset: usize) -> Option<char>
fn consume(&mut self, amount: usize)
fn clear(&mut self)
fn to_string(&self) -> String
Implementors
impl Reader for AccumulatingReader
[src]
fn peek(&mut self, off: usize) -> Option<char>
[src]
Return the value of the byte that is off
bytes away from the current
position in the input file. If the off
lies beyond the end of file,
None
is returned.
fn consume(&mut self, amt: usize)
[src]
Consume the next amt
bytes of the input. All consumed bytes since the
last clear()
can be accessed via slice()
or to_string()
.
fn clear(&mut self)
[src]
Clear the consumed bytes.
fn to_string(&self) -> String
[src]
Convert the consumed bytes to a String.