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
 

Detailed Description

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

What sort of token it is.

Definition at line 102 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 106 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 126 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 129 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 132 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 141 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 211 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 109 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 205 of file token.hpp.

◆ get()

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

Definition at line 185 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 168 of file token.hpp.

◆ is_predefined()

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

Definition at line 163 of file token.hpp.

◆ name()

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

Definition at line 174 of file token.hpp.

◆ operator bool()

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

Definition at line 158 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 201 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 195 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 191 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 213 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 Jun 28 2024 02:20:09