HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Data Structures | Public Member Functions
hi::v1::detail::lexer< Config > Class Template Reference

#include <hikogui/parser/lexer.hpp>

Data Structures

struct  iterator
 
struct  proxy
 

Public Member Functions

constexpr command_type & get_command (state_type from, char c) noexcept
 
constexpr command_type const & get_command (state_type from, char c) const noexcept
 
template<typename It , std::sentinel_for< It > ItEnd>
constexpr iterator< It, ItEnd > parse (It first, ItEnd last) const noexcept
 Parse a range of UTF-8 characters.
 
constexpr auto parse (std::string_view str) const noexcept
 Parse a string of UTF-8 characters.
 

Detailed Description

template<lexer_config Config>
class hi::v1::detail::lexer< Config >

A configurable lexical analyzer with unicode Annex #31 support.

Member Function Documentation

◆ parse() [1/2]

template<lexer_config Config>
template<typename It , std::sentinel_for< It > ItEnd>
constexpr iterator< It, ItEnd > hi::v1::detail::lexer< Config >::parse ( It first,
ItEnd last ) const
inlineconstexprnoexcept

Parse a range of UTF-8 characters.

Parameters
firstAn iterator pointing to the first UTF-8 code-unit.
lastAn iterator pointing beyond the last UTF-8 code-unit to parse, or a sentinel.
Returns
A forward iterator returning tokens, can be compared to the std::default_iterator

◆ parse() [2/2]

template<lexer_config Config>
constexpr auto hi::v1::detail::lexer< Config >::parse ( std::string_view str) const
inlineconstexprnoexcept

Parse a string of UTF-8 characters.

Parameters
strA view of a UTF-8 character string.
Returns
A forward iterator returning tokens, can be compared to the std::default_iterator

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