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

#include <peglib.h>

Public Member Functions

void clear ()
void add (const char *error_literal, const Definition *error_rule)
void output_log (const Log &log, const char *s, size_t n)

Public Attributes

const char * error_pos = nullptr
std::vector< std::pair< const char *, const Definition * > > expected_tokens
const char * message_pos = nullptr
std::string message
std::string label
const char * last_output_pos = nullptr
bool keep_previous_token = false

Private Member Functions

int cast_char (char c) const
std::string heuristic_error_token (const char *s, size_t n, const char *pos) const
std::string replace_all (std::string str, const std::string &from, const std::string &to) const

Member Function Documentation

◆ add()

void peg::ErrorInfo::add ( const char * error_literal,
const Definition * error_rule )
inline

◆ cast_char()

int peg::ErrorInfo::cast_char ( char c) const
inlineprivate
Here is the caller graph for this function:

◆ clear()

void peg::ErrorInfo::clear ( )
inline
Here is the caller graph for this function:

◆ heuristic_error_token()

std::string peg::ErrorInfo::heuristic_error_token ( const char * s,
size_t n,
const char * pos ) const
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ output_log()

void peg::ErrorInfo::output_log ( const Log & log,
const char * s,
size_t n )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ replace_all()

std::string peg::ErrorInfo::replace_all ( std::string str,
const std::string & from,
const std::string & to ) const
inlineprivate
Here is the caller graph for this function:

Member Data Documentation

◆ error_pos

const char* peg::ErrorInfo::error_pos = nullptr

◆ expected_tokens

std::vector<std::pair<const char *, const Definition *> > peg::ErrorInfo::expected_tokens

◆ keep_previous_token

bool peg::ErrorInfo::keep_previous_token = false

◆ label

std::string peg::ErrorInfo::label

◆ last_output_pos

const char* peg::ErrorInfo::last_output_pos = nullptr

◆ message

std::string peg::ErrorInfo::message

◆ message_pos

const char* peg::ErrorInfo::message_pos = nullptr

The documentation for this struct was generated from the following file:
  • libcockatrice_utility/libcockatrice/utility/peglib.h