Parse a constant. If succesful, sp is updated to skip the constant and return true. */
| 375 | |
| 376 | /** Parse a constant. If succesful, sp is updated to skip the constant and return true. */ |
| 377 | bool Const(const std::string& str, Span<const char>& sp) |
| 378 | { |
| 379 | if ((size_t)sp.size() >= str.size() && std::equal(str.begin(), str.end(), sp.begin())) { |
| 380 | sp = sp.subspan(str.size()); |
| 381 | return true; |
| 382 | } |
| 383 | return false; |
| 384 | } |
| 385 | |
| 386 | /** Parse a function call. If succesful, sp is updated to be the function's argument(s). */ |
| 387 | bool Func(const std::string& str, Span<const char>& sp) |
no test coverage detected