Trait pom::Input
[−]
[src]
pub trait Input<T> where T: Copy { fn position(&self) -> usize; fn current(&self) -> Option<T>; fn advance(&mut self); fn jump_to(&mut self, position: usize); fn segment(&self, start: usize, end: usize) -> Vec<T>; }
Parser input is generic over terminal type, which is usually u8 or char.
Required Methods
fn position(&self) -> usize
Get current position.
fn current(&self) -> Option<T>
Peek current symbol.
fn advance(&mut self)
Advance to next symbol.
fn jump_to(&mut self, position: usize)
Jump to specified position.
fn segment(&self, start: usize, end: usize) -> Vec<T>
Get a segment from the input.