Electroneum
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
mstch::token Class Reference

#include <token.hpp>

Public Types

enum  type {
  type::text, type::variable, type::section_open, type::section_close,
  type::inverted_section_open, type::unescaped_variable, type::comment, type::partial,
  type::delimiter_change
}
 

Public Member Functions

 token (const std::string &str, std::size_t left=0, std::size_t right=0)
 
type token_type () const
 
const std::string & raw () const
 
const std::string & name () const
 
const std::string & partial_prefix () const
 
const delim_typedelims () const
 
void partial_prefix (const std::string &p_partial_prefix)
 
bool eol () const
 
void eol (bool eol)
 
bool ws_only () const
 

Private Member Functions

type token_info (char c)
 

Private Attributes

type m_type
 
std::string m_name
 
std::string m_raw
 
std::string m_partial_prefix
 
delim_type m_delims
 
bool m_eol
 
bool m_ws_only
 

Member Enumeration Documentation

◆ type

enum mstch::token::type
strong
Enumerator
text 
variable 
section_open 
section_close 
inverted_section_open 
unescaped_variable 
comment 
partial 
delimiter_change 

Constructor & Destructor Documentation

◆ token()

token::token ( const std::string &  str,
std::size_t  left = 0,
std::size_t  right = 0 
)

Member Function Documentation

◆ delims()

const delim_type& mstch::token::delims ( ) const
inline

◆ eol() [1/2]

bool mstch::token::eol ( ) const
inline

◆ eol() [2/2]

void mstch::token::eol ( bool  eol)
inline

◆ name()

const std::string& mstch::token::name ( ) const
inline

◆ partial_prefix() [1/2]

const std::string& mstch::token::partial_prefix ( ) const
inline

◆ partial_prefix() [2/2]

void mstch::token::partial_prefix ( const std::string &  p_partial_prefix)
inline

◆ raw()

const std::string& mstch::token::raw ( ) const
inline

◆ token_info()

token::type token::token_info ( char  c)
private

◆ token_type()

type mstch::token::token_type ( ) const
inline

◆ ws_only()

bool mstch::token::ws_only ( ) const
inline

Member Data Documentation

◆ m_delims

delim_type mstch::token::m_delims
private

◆ m_eol

bool mstch::token::m_eol
private

◆ m_name

std::string mstch::token::m_name
private

◆ m_partial_prefix

std::string mstch::token::m_partial_prefix
private

◆ m_raw

std::string mstch::token::m_raw
private

◆ m_type

type mstch::token::m_type
private

◆ m_ws_only

bool mstch::token::m_ws_only
private

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