[−][src]Trait mini_haskell::utils::char::Stream
A character stream, common interface for macros here.
Required methods
fn peek(&mut self) -> Option<char>
Peek the next character without consuming it.
fn next(&mut self) -> Option<char>
Take the next character and consume it.
Provided methods
fn match<'a>(&mut self, s: &'a str) -> Option<&'a str>
Match a string against the input.
fn span<T>(
&mut self,
f: impl FnMut(char) -> bool,
init: T,
join: impl FnMut(&mut T, char)
) -> T
&mut self,
f: impl FnMut(char) -> bool,
init: T,
join: impl FnMut(&mut T, char)
) -> T
Pop many characters until the predicate fails.
fn span_collect(&mut self, f: impl FnMut(char) -> bool) -> Vec<char>
Pop many characters until the predicate fails, collect them into a Vec.
fn span_collect_string(&mut self, f: impl FnMut(char) -> bool) -> String
Pop many characters until the predicate fails, collect them into a String.
fn span_(&mut self, f: impl FnMut(char) -> bool)
Pop many characters until the predicate fails, ignore the characters.