mstring  1.3.1
Generates C++ message functions and classes from localized message definitions
ParseContext Struct Reference

State shared by the parser of the main file and the parsers of the files it $IMPORTs — an imported file changes the same settings and adds to the same module, exactly as if it were inline. More...

#include <MStringParser.hh>

+ Collaboration diagram for ParseContext:

Public Member Functions

 ParseContext (Module &module)
 
bool failed () const
 Whether a diagnostic other than a warning was recorded. More...
 

Public Attributes

Module & module
 
MessageSettings settings
 Settings the next $MESSAGE copies. More...
 
std::string language { "C" }
 $LANGUAGE. More...
 
std::string charset { "UTF-8" }
 $CHARSET. More...
 
std::vector< std::string > importFolders
 -I folders. More...
 
std::vector< std::string > importStack
 Canonical paths being parsed (recursion guard). More...
 
std::vector< fedem::parser::ParseError > diagnostics
 
bool trace { false }
 

Detailed Description

State shared by the parser of the main file and the parsers of the files it $IMPORTs — an imported file changes the same settings and adds to the same module, exactly as if it were inline.

Constructor & Destructor Documentation

◆ ParseContext()

ParseContext::ParseContext ( Module &  module)
explicit

Member Function Documentation

◆ failed()

bool ParseContext::failed ( ) const

Whether a diagnostic other than a warning was recorded.

References diagnostics.

Referenced by MStringParser::parseFile(), and MStringParser::parseStream().

+ Here is the caller graph for this function:

Member Data Documentation

◆ module

◆ settings

◆ language

std::string ParseContext::language { "C" }

◆ charset

std::string ParseContext::charset { "UTF-8" }

◆ importFolders

std::vector<std::string> ParseContext::importFolders

-I folders.

Referenced by main(), and MStringParser::resolveImport().

◆ importStack

std::vector<std::string> ParseContext::importStack

Canonical paths being parsed (recursion guard).

Referenced by MStringParser::parseFile().

◆ diagnostics

std::vector<fedem::parser::ParseError> ParseContext::diagnostics

◆ trace

bool ParseContext::trace { false }

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