Struct pom::TextInput
[−]
[src]
pub struct TextInput<'a> { pub text: &'a str, pub position: usize, }
Wrap &str as input to parser.
Fields
text: &'a str
position: usize
Methods
impl<'a> TextInput<'a>
[src]
Trait Implementations
impl<'a> Input<char> for TextInput<'a>
[src]
fn position(&self) -> usize
Get current position.
fn current(&self) -> Option<char>
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<char>
Get a segment from the input.