Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
lexy::token_kind< TokenKind > Class Template Reference

What sort of token it is. More...

#include <token.hpp>

Public Member Functions

constexpr _underlying_type get () const noexcept
 
constexpr bool ignore_if_empty () const noexcept
 
constexpr bool is_predefined () const noexcept
 
constexpr const char * name () const noexcept
 
constexpr operator bool () const noexcept
 
constexpr token_kind () noexcept
 Creates an unknown token kind. More...
 
constexpr token_kind (_underlying_type value) noexcept
 Creates the token kind with the specified value. More...
 
constexpr token_kind (predefined_token_kind value) noexcept
 Creates a predefined token kind. More...
 
template<typename TokenRule , typename = std::enable_if_t<lexy::is_token_rule<TokenRule>>>
constexpr token_kind (TokenRule) noexcept
 Creates the token kind of a token rule. More...
 

Static Public Member Functions

static constexpr token_kind< TokenKind > from_raw (std::uint_least16_t kind) noexcept
 
static constexpr std::uint_least16_t to_raw (token_kind< TokenKind > kind) noexcept
 

Private Types

using _underlying_type = lexy::_detail::type_or< TokenKind, int >
 

Private Member Functions

constexpr token_kind (std::uint_least16_t kind) noexcept
 

Static Private Member Functions

template<typename T >
static constexpr bool _is_compatible_kind_type ()
 

Private Attributes

std::uint_least16_t _value
 

Friends

constexpr friend bool operator!= (token_kind lhs, token_kind rhs) noexcept
 
constexpr friend bool operator== (token_kind lhs, token_kind rhs) noexcept
 
constexpr const friend char * token_kind_name (token_kind kind) noexcept
 

Detailed Description

template<typename TokenKind = void>
class lexy::token_kind< TokenKind >

What sort of token it is.

Definition at line 99 of file token.hpp.

Member Typedef Documentation

◆ _underlying_type

template<typename TokenKind = void>
using lexy::token_kind< TokenKind >::_underlying_type = lexy::_detail::type_or<TokenKind, int>
private

Definition at line 103 of file token.hpp.

Constructor & Destructor Documentation

◆ token_kind() [1/5]

template<typename TokenKind = void>
constexpr lexy::token_kind< TokenKind >::token_kind ( )
inlineconstexprnoexcept

Creates an unknown token kind.

Definition at line 123 of file token.hpp.

◆ token_kind() [2/5]

template<typename TokenKind = void>
constexpr lexy::token_kind< TokenKind >::token_kind ( predefined_token_kind< TokenKind >  value)
inlineconstexprnoexcept

Creates a predefined token kind.

Definition at line 126 of file token.hpp.

◆ token_kind() [3/5]

template<typename TokenKind = void>
constexpr lexy::token_kind< TokenKind >::token_kind ( _underlying_type  value)
inlineconstexprnoexcept

Creates the token kind with the specified value.

Definition at line 129 of file token.hpp.

◆ token_kind() [4/5]

template<typename TokenKind = void>
template<typename TokenRule , typename = std::enable_if_t<lexy::is_token_rule<TokenRule>>>
constexpr lexy::token_kind< TokenKind >::token_kind ( TokenRule  )
inlineconstexprnoexcept

Creates the token kind of a token rule.

Definition at line 138 of file token.hpp.

◆ token_kind() [5/5]

template<typename TokenKind = void>
constexpr lexy::token_kind< TokenKind >::token_kind ( std::uint_least16_t  kind)
inlineexplicitconstexprprivatenoexcept

Definition at line 209 of file token.hpp.

Member Function Documentation

◆ _is_compatible_kind_type()

template<typename TokenKind = void>
template<typename T >
static constexpr bool lexy::token_kind< TokenKind >::_is_compatible_kind_type ( )
inlinestaticconstexprprivate

Definition at line 106 of file token.hpp.

◆ from_raw()

template<typename TokenKind = void>
static constexpr token_kind<TokenKind> lexy::token_kind< TokenKind >::from_raw ( std::uint_least16_t  kind)
inlinestaticconstexprnoexcept

Definition at line 203 of file token.hpp.

◆ get()

template<typename TokenKind = void>
constexpr _underlying_type lexy::token_kind< TokenKind >::get ( ) const
inlineconstexprnoexcept

Definition at line 183 of file token.hpp.

◆ ignore_if_empty()

template<typename TokenKind = void>
constexpr bool lexy::token_kind< TokenKind >::ignore_if_empty ( ) const
inlineconstexprnoexcept

Definition at line 165 of file token.hpp.

◆ is_predefined()

template<typename TokenKind = void>
constexpr bool lexy::token_kind< TokenKind >::is_predefined ( ) const
inlineconstexprnoexcept

Definition at line 160 of file token.hpp.

◆ name()

template<typename TokenKind = void>
constexpr const char* lexy::token_kind< TokenKind >::name ( ) const
inlineconstexprnoexcept

Definition at line 171 of file token.hpp.

◆ operator bool()

template<typename TokenKind = void>
constexpr lexy::token_kind< TokenKind >::operator bool ( ) const
inlineexplicitconstexprnoexcept

Definition at line 155 of file token.hpp.

◆ to_raw()

template<typename TokenKind = void>
static constexpr std::uint_least16_t lexy::token_kind< TokenKind >::to_raw ( token_kind< TokenKind >  kind)
inlinestaticconstexprnoexcept

Definition at line 199 of file token.hpp.

Friends And Related Function Documentation

◆ operator!=

template<typename TokenKind = void>
constexpr friend bool operator!= ( token_kind< TokenKind >  lhs,
token_kind< TokenKind >  rhs 
)
friend

Definition at line 193 of file token.hpp.

◆ operator==

template<typename TokenKind = void>
constexpr friend bool operator== ( token_kind< TokenKind >  lhs,
token_kind< TokenKind >  rhs 
)
friend

Definition at line 189 of file token.hpp.

◆ token_kind_name

template<typename TokenKind = void>
constexpr const friend char* token_kind_name ( token_kind< TokenKind >  kind)
friend

Definition at line 178 of file token.hpp.

Member Data Documentation

◆ _value

template<typename TokenKind = void>
std::uint_least16_t lexy::token_kind< TokenKind >::_value
private

Definition at line 211 of file token.hpp.


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


behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Fri Dec 13 2024 03:19:19