mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-11-13 22:55:29 +00:00
Added NOTREACHED.
This commit is contained in:
parent
f8da5085aa
commit
2b734978d1
@ -188,15 +188,19 @@ struct Environment
|
||||
|
||||
Value get(const std::string& s) const {
|
||||
assert(has(s));
|
||||
|
||||
if (dic_.find(s) != dic_.end()) {
|
||||
return dic_.at(s);
|
||||
}
|
||||
|
||||
for (auto& outer: outers_) {
|
||||
if (outer->has(s)) {
|
||||
return outer->get(s);
|
||||
}
|
||||
}
|
||||
// NOT REACHED
|
||||
|
||||
// NOTREACHED
|
||||
throw std::logic_error("invalid internal condition.");
|
||||
}
|
||||
|
||||
void set(const std::string& s, const Value& val) {
|
||||
|
Loading…
Reference in New Issue
Block a user