Ada 3.0.1
Fast spec-compliant URL parser
Loading...
Searching...
No Matches
ada::url_pattern_helpers::Tokenizer Class Reference

#include <url_pattern_helpers.h>

Public Member Functions

 Tokenizer (std::string_view new_input, token_policy new_policy)
 
void get_next_code_point ()
 
void seek_and_get_next_code_point (size_t index)
 
void add_token (token_type type, size_t next_position, size_t value_position, size_t value_length)
 
void add_token_with_default_length (token_type type, size_t next_position, size_t value_position)
 
void add_token_with_defaults (token_type type)
 
std::optional< errorsprocess_tokenizing_error (size_t next_position, size_t value_position) ada_warn_unused
 

Friends

tl::expected< std::vector< token >, errorstokenize (std::string_view input, token_policy policy)
 

Detailed Description

Definition at line 104 of file url_pattern_helpers.h.

Constructor & Destructor Documentation

◆ Tokenizer()

ada::url_pattern_helpers::Tokenizer::Tokenizer ( std::string_view new_input,
token_policy new_policy )
inlineexplicit

Definition at line 106 of file url_pattern_helpers.h.

Referenced by tokenize.

Member Function Documentation

◆ add_token()

void ada::url_pattern_helpers::Tokenizer::add_token ( token_type type,
size_t next_position,
size_t value_position,
size_t value_length )
inline

◆ add_token_with_default_length()

void ada::url_pattern_helpers::Tokenizer::add_token_with_default_length ( token_type type,
size_t next_position,
size_t value_position )
inline

Definition at line 406 of file url_pattern_helpers-inl.h.

References add_token().

Referenced by add_token_with_defaults(), and process_tokenizing_error().

◆ add_token_with_defaults()

void ada::url_pattern_helpers::Tokenizer::add_token_with_defaults ( token_type type)
inline

◆ get_next_code_point()

void ada::url_pattern_helpers::Tokenizer::get_next_code_point ( )
inline

Definition at line 332 of file url_pattern_helpers-inl.h.

References ADA_ASSERT_TRUE.

Referenced by seek_and_get_next_code_point().

◆ process_tokenizing_error()

ada_warn_unused std::optional< errors > ada::url_pattern_helpers::Tokenizer::process_tokenizing_error ( size_t next_position,
size_t value_position )
inline

◆ seek_and_get_next_code_point()

void ada::url_pattern_helpers::Tokenizer::seek_and_get_next_code_point ( size_t index)
inline

Definition at line 379 of file url_pattern_helpers-inl.h.

References get_next_code_point().

Friends And Related Symbol Documentation

◆ tokenize


The documentation for this class was generated from the following files: