#include <Parser.h>
|
virtual void | walk (const std::string &fullpath, const std::string &, hit::Node *n) override |
|
|
std::vector< hit::ErrorMessage > | errors |
|
|
std::map< std::string, hit::Node * > | _have |
|
Definition at line 36 of file Parser.h.
◆ walk()
void DupParamWalker::walk |
( |
const std::string & |
fullpath, |
|
|
const std::string & |
, |
|
|
hit::Node * |
n |
|
) |
| |
|
overridevirtual |
Definition at line 164 of file Parser.C.
Referenced by Parser::parse().
166 const auto it =
_have.try_emplace(fullpath, n);
169 const std::string type = n->type() == hit::NodeType::Field ?
"parameter" :
"section";
170 const std::string error = type +
" '" + fullpath +
"' supplied multiple times";
173 const auto existing = it.first->second;
174 if (std::find_if(
errors.begin(),
176 [&existing](
const auto &
err)
177 {
return err.node == existing; }) ==
errors.end())
178 errors.emplace_back(error, existing);
180 errors.emplace_back(error, n);
std::vector< hit::ErrorMessage > errors
std::map< std::string, hit::Node * > _have
◆ _have
std::map<std::string, hit::Node *> DupParamWalker::_have |
|
private |
◆ errors
std::vector<hit::ErrorMessage> DupParamWalker::errors |
The documentation for this class was generated from the following files: