Return the next character that will be scanned, or if there are no more characters to scan. Note that if a scan operation has failed (so GetResult() returns false), then the value of Peek may or may not have advanced since the scan operation that failed.
| 152 | // then the value of Peek may or may not have advanced since the scan |
| 153 | // operation that failed. |
| 154 | char Peek(char default_value = '\0') const { |
| 155 | return cur_.empty() ? default_value : cur_[0]; |
| 156 | } |
| 157 | |
| 158 | // Returns false if there are no remaining characters to consume. |
| 159 | int empty() const { return cur_.empty(); } |