| 352 | } |
| 353 | |
| 354 | bool accept_text(TokenStream &in, const std::string &c_str, bool take = true) |
| 355 | { |
| 356 | auto tok = in.peek(); |
| 357 | if (tok.type == TokenType::Text && tok.value == c_str) |
| 358 | { |
| 359 | if (take) |
| 360 | { |
| 361 | in.take(); |
| 362 | } |
| 363 | return true; |
| 364 | } |
| 365 | return false; |
| 366 | } |
| 367 | |
| 368 | void expect_text(TokenStream &in, const std::string &str, bool &valid) |
| 369 | { |
no test coverage detected