HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
hi::v1::token Struct Reference

Public Types

enum class  kind_type : uint8_t {
  none , error_unexepected_character , error_invalid_digit , error_incomplete_exponent ,
  error_incomplete_string , error_incomplete_comment , error_after_lt_bang , integer ,
  real , sstr , dstr , bstr ,
  istr , color , lcomment , bcomment ,
  ws , id , other
}

Public Member Functions

constexpr token (token const &) noexcept=default
constexpr token (token &&) noexcept=default
constexpr token & operator= (token const &) noexcept=default
constexpr token & operator= (token &&) noexcept=default
constexpr token (kind_type kind, std::string_view capture, size_t column_nr) noexcept
constexpr token (kind_type kind, std::string_view capture, size_t line_nr, size_t column_nr) noexcept
constexpr bool operator== (kind_type rhs) const noexcept
constexpr bool operator== (std::string_view rhs) const noexcept
constexpr bool operator== (char rhs) const noexcept
constexpr operator std::string () const noexcept
template<std::integral T>
constexpr operator T () const
template<std::floating_point T>
 operator T () const
 operator::hi::color () const

Data Fields

std::vector< char > capture = {}
size_t line_nr = 0
size_t column_nr = 0
kind_type kind = kind_type::none

Static Public Attributes

static constexpr auto kind_type_metadata
static constexpr auto none = kind_type::none
static constexpr auto error_unexepected_character = kind_type::error_unexepected_character
static constexpr auto error_invalid_digit = kind_type::error_invalid_digit
static constexpr auto error_incomplete_exponent = kind_type::error_incomplete_exponent
static constexpr auto error_incomplete_string = kind_type::error_incomplete_string
static constexpr auto error_incomplete_comment = kind_type::error_incomplete_comment
static constexpr auto error_after_lt_bang = kind_type::error_after_lt_bang
static constexpr auto integer = kind_type::integer
static constexpr auto real = kind_type::real
static constexpr auto sstr = kind_type::sstr
static constexpr auto dstr = kind_type::dstr
static constexpr auto bstr = kind_type::bstr
static constexpr auto istr = kind_type::istr
static constexpr auto color = kind_type::color
static constexpr auto lcomment = kind_type::lcomment
static constexpr auto bcomment = kind_type::bcomment
static constexpr auto ws = kind_type::ws
static constexpr auto id = kind_type::id
static constexpr auto other = kind_type::other

Friends

constexpr friend bool operator== (token const &, token const &) noexcept=default

Field Documentation

◆ kind_type_metadata

auto hi::v1::token::kind_type_metadata
staticconstexpr
Initial value:
kind_type::none, "none",
kind_type::error_unexepected_character, "error:unexpected character",
kind_type::error_invalid_digit, "error:invalid digit",
kind_type::error_incomplete_exponent, "error:incomplete exponent",
kind_type::error_incomplete_string, "error:incomplete string",
kind_type::error_incomplete_comment, "error:incomplete comment",
kind_type::error_after_lt_bang, "error:after_lt_bang",
kind_type::integer, "integer",
kind_type::real, "read",
kind_type::sstr, "single-quote string",
kind_type::dstr, "double-quote string",
kind_type::bstr, "back-quote string",
kind_type::istr, "ini string",
kind_type::color, "color",
kind_type::lcomment, "line comment",
kind_type::bcomment, "block comment",
kind_type::ws, "ws",
kind_type::id, "id",
kind_type::other, "other"
}
A object that holds enum-values and strings.
Definition enum_metadata.hpp:36

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