Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
peg::AstBase< Annotation > Struct Template Reference

#include <peglib.h>

Inheritance diagram for peg::AstBase< Annotation >:
[legend]
Collaboration diagram for peg::AstBase< Annotation >:
[legend]

Public Member Functions

 AstBase (const char *path, size_t line, size_t column, const char *name, const std::vector< std::shared_ptr< AstBase > > &nodes, size_t position=0, size_t length=0, size_t choice_count=0, size_t choice=0)
 AstBase (const char *path, size_t line, size_t column, const char *name, const std::string_view &token, size_t position=0, size_t length=0, size_t choice_count=0, size_t choice=0)
 AstBase (const AstBase &ast, const char *original_name, size_t position=0, size_t length=0, size_t original_choice_count=0, size_t original_choice=0)
std::string token_to_string () const
template<typename T>
token_to_number () const

Public Attributes

const std::string path
const size_t line = 1
const size_t column = 1
const std::string name
size_t position
size_t length
const size_t choice_count
const size_t choice
const std::string original_name
const size_t original_choice_count
const size_t original_choice
const unsigned int tag
const unsigned int original_tag
const bool is_token
const std::string_view token
std::vector< std::shared_ptr< AstBase< Annotation > > > nodes
std::weak_ptr< AstBase< Annotation > > parent

Constructor & Destructor Documentation

◆ AstBase() [1/3]

template<typename Annotation>
peg::AstBase< Annotation >::AstBase ( const char * path,
size_t line,
size_t column,
const char * name,
const std::vector< std::shared_ptr< AstBase< Annotation > > > & nodes,
size_t position = 0,
size_t length = 0,
size_t choice_count = 0,
size_t choice = 0 )
inline

◆ AstBase() [2/3]

template<typename Annotation>
peg::AstBase< Annotation >::AstBase ( const char * path,
size_t line,
size_t column,
const char * name,
const std::string_view & token,
size_t position = 0,
size_t length = 0,
size_t choice_count = 0,
size_t choice = 0 )
inline

◆ AstBase() [3/3]

template<typename Annotation>
peg::AstBase< Annotation >::AstBase ( const AstBase< Annotation > & ast,
const char * original_name,
size_t position = 0,
size_t length = 0,
size_t original_choice_count = 0,
size_t original_choice = 0 )
inline

Member Function Documentation

◆ token_to_number()

template<typename Annotation>
template<typename T>
T peg::AstBase< Annotation >::token_to_number ( ) const
inline

◆ token_to_string()

template<typename Annotation>
std::string peg::AstBase< Annotation >::token_to_string ( ) const
inline

Member Data Documentation

◆ choice

template<typename Annotation>
const size_t peg::AstBase< Annotation >::choice

◆ choice_count

template<typename Annotation>
const size_t peg::AstBase< Annotation >::choice_count

◆ column

template<typename Annotation>
const size_t peg::AstBase< Annotation >::column = 1

◆ is_token

template<typename Annotation>
const bool peg::AstBase< Annotation >::is_token

◆ length

template<typename Annotation>
size_t peg::AstBase< Annotation >::length

◆ line

template<typename Annotation>
const size_t peg::AstBase< Annotation >::line = 1

◆ name

template<typename Annotation>
const std::string peg::AstBase< Annotation >::name

◆ nodes

template<typename Annotation>
std::vector<std::shared_ptr<AstBase<Annotation> > > peg::AstBase< Annotation >::nodes

◆ original_choice

template<typename Annotation>
const size_t peg::AstBase< Annotation >::original_choice

◆ original_choice_count

template<typename Annotation>
const size_t peg::AstBase< Annotation >::original_choice_count

◆ original_name

template<typename Annotation>
const std::string peg::AstBase< Annotation >::original_name

◆ original_tag

template<typename Annotation>
const unsigned int peg::AstBase< Annotation >::original_tag

◆ parent

template<typename Annotation>
std::weak_ptr<AstBase<Annotation> > peg::AstBase< Annotation >::parent

◆ path

template<typename Annotation>
const std::string peg::AstBase< Annotation >::path

◆ position

template<typename Annotation>
size_t peg::AstBase< Annotation >::position

◆ tag

template<typename Annotation>
const unsigned int peg::AstBase< Annotation >::tag

◆ token

template<typename Annotation>
const std::string_view peg::AstBase< Annotation >::token

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