| 9914 | |
| 9915 | template <url_pattern_encoding_callback F> |
| 9916 | std::string url_pattern_parser<F>::consume_text() { |
| 9917 | // Let result be the empty string. |
| 9918 | std::string result{}; |
| 9919 | // While true: |
| 9920 | while (true) { |
| 9921 | // Let token be the result of running try to consume a token given parser |
| 9922 | // and "char". |
| 9923 | auto token = try_consume_token(token_type::CHAR); |
| 9924 | // If token is null, then set token to the result of running try to consume |
| 9925 | // a token given parser and "escaped-char". |
| 9926 | if (!token) token = try_consume_token(token_type::ESCAPED_CHAR); |
| 9927 | // If token is null, then break. |
| 9928 | if (!token) break; |
| 9929 | // Append token's value to the end of result. |
| 9930 | result.append(token->value); |
| 9931 | } |
| 9932 | // Return result. |
| 9933 | return result; |
| 9934 | } |
| 9935 | |
| 9936 | template <url_pattern_encoding_callback F> |
| 9937 | bool url_pattern_parser<F>::consume_required_token(token_type type) { |
no test coverage detected