SpECTRE  2021.08.02
Options::Context Struct Reference

Information about the nested operations being performed by the parser, for use in printing errors. A default-constructed Context is printed as an empty string. This struct is primarily used as an argument to PARSE_ERROR for reporting input file parsing errors. Users outside of the core option parsing code should not need to manipulate the contents. More...

#include <Options.hpp>

Public Member Functions

void append (const std::string &c) noexcept
 Append a line to the context. Automatically appends a colon.
 

Public Attributes

bool top_level {true}
 
std::string context
 (Part of) the parsing "backtrace" printed with an error
 
int line {-1}
 File line number (0 based)
 
int column {-1}
 File column number (0 based)
 

Detailed Description

Information about the nested operations being performed by the parser, for use in printing errors. A default-constructed Context is printed as an empty string. This struct is primarily used as an argument to PARSE_ERROR for reporting input file parsing errors. Users outside of the core option parsing code should not need to manipulate the contents.