| 341 | } |
| 342 | |
| 343 | std::string text_val(TokenStream &in, bool &valid) |
| 344 | { |
| 345 | LOG_TOKEN_POS(in, pos); |
| 346 | auto tok = in.take(); |
| 347 | if (tok.type != TokenType::Text || tok.value.empty()) |
| 348 | { |
| 349 | FAIL_WITH_MSG_DEFAULT(valid, "", pos, "Expect a non-empty text token"); |
| 350 | } |
| 351 | return tok.value; |
| 352 | } |
| 353 | |
| 354 | bool accept_text(TokenStream &in, const std::string &c_str, bool take = true) |
| 355 | { |
no test coverage detected