Peek at the next character in the input without advancing the parser. If the input has been exhausted, then this returns `None`.
(&self)
| 581 | /// |
| 582 | /// If the input has been exhausted, then this returns `None`. |
| 583 | fn peek(&self) -> Option<char> { |
| 584 | if self.is_eof() { |
| 585 | return None; |
| 586 | } |
| 587 | self.pattern()[self.offset() + self.char().len_utf8()..].chars().next() |
| 588 | } |
| 589 | |
| 590 | /// Like peek, but will ignore spaces when the parser is in whitespace |
| 591 | /// insensitive mode. |