[−][src]Trait moore::lexer::Reader
A trait that can supply a peekable stream of characters.
Required methods
pub fn peek(&mut self, offset: usize) -> Option<char>
[src]
pub fn consume(&mut self, amount: usize)
[src]
pub fn clear(&mut self)
[src]
pub fn to_string(&self) -> String
[src]
Implementors
impl Reader for AccumulatingReader
[src]
pub 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.
pub 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()
.
pub fn clear(&mut self)
[src]
Clear the consumed bytes.
pub fn to_string(&self) -> String
[src]
Convert the consumed bytes to a String.