header_utils
Loading...
Searching...
No Matches
ghassanpl::parsing Namespace Reference

Functions

size_t find_line_number (std::string_view of_string, std::string_view in_document) noexcept
 
std::pair< size_t, size_tfind_line_and_column (std::string_view of_string, std::string_view in_document) noexcept
 
std::string_view consume_c_identifier (std::string_view &str)
 
std::string_view consume_c_identifier_with (std::string_view &str, std::string_view additional_chars)
 
bool try_eat (std::string_view &str, std::string_view what)
 
bool try_eat (std::string_view &str, char what)
 
void eat (std::string_view &str, std::string_view what)
 
void eat (std::string_view &str, char what)
 
std::string_view try_eat_identifier (std::string_view &str)
 
std::string_view eat_identifier (std::string_view &str)
 
std::string_view try_eat_identifier_with (std::string_view &str, std::string_view additional_chars)
 
std::string_view eat_identifier_with (std::string_view &str, std::string_view additional_chars)
 
std::string_view eat_whitespace (std::string_view &str)
 
bool try_eat_line_comment (std::string_view &str, std::string_view comment_start="//")
 
bool try_eat_unsigned (std::string_view &str, uint64_t &result, int base=10)
 
std::optional< uint64_ttry_eat_unsigned (std::string_view &str, int base=10)
 
bool try_eat_integer (std::string_view &str, int64_t &result, int base=10)
 
std::optional< int64_ttry_eat_integer (std::string_view &str, int base=10)
 
uint64_t eat_unsigned (std::string_view &str, int base=10)
 
int64_t eat_integer (std::string_view &str, int base=10)
 
char32_t try_eat_utf8_codepoint (std::string_view &str)
 
char32_t eat_utf8_codepoint (std::string_view &str)
 

Detailed Description

Function Documentation

◆ consume_c_identifier()

std::string_view ghassanpl::parsing::consume_c_identifier ( std::string_view &  str)
inline

Definition at line 50 of file parsing.h.

◆ consume_c_identifier_with()

std::string_view ghassanpl::parsing::consume_c_identifier_with ( std::string_view &  str,
std::string_view  additional_chars 
)
inline

Definition at line 61 of file parsing.h.

◆ eat() [1/2]

void ghassanpl::parsing::eat ( std::string_view &  str,
char  what 
)
inline

Definition at line 291 of file parsing.h.

◆ eat() [2/2]

void ghassanpl::parsing::eat ( std::string_view &  str,
std::string_view  what 
)
inline

Definition at line 285 of file parsing.h.

◆ eat_identifier()

std::string_view ghassanpl::parsing::eat_identifier ( std::string_view &  str)
inline

Definition at line 303 of file parsing.h.

◆ eat_identifier_with()

std::string_view ghassanpl::parsing::eat_identifier_with ( std::string_view &  str,
std::string_view  additional_chars 
)
inline

Definition at line 317 of file parsing.h.

◆ eat_integer()

int64_t ghassanpl::parsing::eat_integer ( std::string_view &  str,
int  base = 10 
)
inline

Definition at line 379 of file parsing.h.

◆ eat_unsigned()

uint64_t ghassanpl::parsing::eat_unsigned ( std::string_view &  str,
int  base = 10 
)
inline

Definition at line 371 of file parsing.h.

◆ eat_utf8_codepoint()

char32_t ghassanpl::parsing::eat_utf8_codepoint ( std::string_view &  str)
inline

Definition at line 392 of file parsing.h.

◆ eat_whitespace()

std::string_view ghassanpl::parsing::eat_whitespace ( std::string_view &  str)
inline

Definition at line 325 of file parsing.h.

◆ find_line_and_column()

std::pair< size_t, size_t > ghassanpl::parsing::find_line_and_column ( std::string_view  of_string,
std::string_view  in_document 
)
inlinenoexcept

Definition at line 28 of file parsing.h.

◆ find_line_number()

size_t ghassanpl::parsing::find_line_number ( std::string_view  of_string,
std::string_view  in_document 
)
inlinenoexcept

Definition at line 17 of file parsing.h.

◆ try_eat() [1/2]

bool ghassanpl::parsing::try_eat ( std::string_view &  str,
char  what 
)
inline

Definition at line 276 of file parsing.h.

◆ try_eat() [2/2]

bool ghassanpl::parsing::try_eat ( std::string_view &  str,
std::string_view  what 
)
inline

Definition at line 267 of file parsing.h.

◆ try_eat_identifier()

std::string_view ghassanpl::parsing::try_eat_identifier ( std::string_view &  str)
inline

Definition at line 297 of file parsing.h.

◆ try_eat_identifier_with()

std::string_view ghassanpl::parsing::try_eat_identifier_with ( std::string_view &  str,
std::string_view  additional_chars 
)
inline

Definition at line 311 of file parsing.h.

◆ try_eat_integer() [1/2]

std::optional< int64_t > ghassanpl::parsing::try_eat_integer ( std::string_view &  str,
int  base = 10 
)
inline

Definition at line 364 of file parsing.h.

◆ try_eat_integer() [2/2]

bool ghassanpl::parsing::try_eat_integer ( std::string_view &  str,
int64_t result,
int  base = 10 
)
inline

Definition at line 355 of file parsing.h.

◆ try_eat_line_comment()

bool ghassanpl::parsing::try_eat_line_comment ( std::string_view &  str,
std::string_view  comment_start = "//" 
)
inline

Definition at line 330 of file parsing.h.

◆ try_eat_unsigned() [1/2]

std::optional< uint64_t > ghassanpl::parsing::try_eat_unsigned ( std::string_view &  str,
int  base = 10 
)
inline

Definition at line 348 of file parsing.h.

◆ try_eat_unsigned() [2/2]

bool ghassanpl::parsing::try_eat_unsigned ( std::string_view &  str,
uint64_t result,
int  base = 10 
)
inline

Definition at line 339 of file parsing.h.

◆ try_eat_utf8_codepoint()

char32_t ghassanpl::parsing::try_eat_utf8_codepoint ( std::string_view &  str)
inline

Definition at line 387 of file parsing.h.