| 9898 | |
| 9899 | template <url_pattern_encoding_callback F> |
| 9900 | token* url_pattern_parser<F>::try_consume_token(token_type type) { |
| 9901 | ada_log("url_pattern_parser::try_consume_token called with type=", |
| 9902 | to_string(type)); |
| 9903 | // Assert: parser's index is less than parser's token list size. |
| 9904 | ADA_ASSERT_TRUE(index < tokens.size()); |
| 9905 | // Let next token be parser's token list[parser's index]. |
| 9906 | auto& next_token = tokens[index]; |
| 9907 | // If next token's type is not type return null. |
| 9908 | if (next_token.type != type) return nullptr; |
| 9909 | // Increase parser's index by 1. |
| 9910 | index++; |
| 9911 | // Return next token. |
| 9912 | return &next_token; |
| 9913 | } |
| 9914 | |
| 9915 | template <url_pattern_encoding_callback F> |
| 9916 | std::string url_pattern_parser<F>::consume_text() { |
no test coverage detected