This function attempts to consume a character from the stream, if the next character matches the 'expect', take out it and return true, otherwise return false.
| 269 | /// This function attempts to consume a character from the stream, if the next character |
| 270 | /// matches the 'expect', take out it and return true, otherwise return false. |
| 271 | inline bool Consume(char expect) { |
| 272 | if (LIKELY(s_.Peek() == expect)) { |
| 273 | s_.Take(); |
| 274 | return true; |
| 275 | } |
| 276 | return false; |
| 277 | } |
| 278 | |
| 279 | inline void SkipWhitespace() { |
| 280 | char c; |