| 9532 | |
| 9533 | template <url_pattern_regex::regex_concept regex_provider> |
| 9534 | constexpr const token* |
| 9535 | constructor_string_parser<regex_provider>::get_safe_token(size_t index) const { |
| 9536 | // If index is less than parser's token list's size, then return parser's |
| 9537 | // token list[index]. |
| 9538 | if (index < token_list.size()) [[likely]] { |
| 9539 | return &token_list[index]; |
| 9540 | } |
| 9541 | |
| 9542 | // Assert: parser's token list's size is greater than or equal to 1. |
| 9543 | ADA_ASSERT_TRUE(!token_list.empty()); |
| 9544 | |
| 9545 | // Let token be parser's token list[last index]. |
| 9546 | // Assert: token's type is "end". |
| 9547 | ADA_ASSERT_TRUE(token_list.back().type == token_type::END); |
| 9548 | |
| 9549 | // Return token. |
| 9550 | return &token_list.back(); |
| 9551 | } |
| 9552 | |
| 9553 | template <url_pattern_regex::regex_concept regex_provider> |
| 9554 | constexpr bool constructor_string_parser<regex_provider>::is_group_open() |