| 10 | } |
| 11 | |
| 12 | void BinderScope::replaceExpression(const std::string& oldName, const std::string& newName, |
| 13 | std::shared_ptr<Expression> expression) { |
| 14 | DASSERT(nameToExprIdx.contains(oldName)); |
| 15 | auto idx = nameToExprIdx.at(oldName); |
| 16 | expressions[idx] = std::move(expression); |
| 17 | nameToExprIdx.erase(oldName); |
| 18 | nameToExprIdx.insert({newName, idx}); |
| 19 | } |
| 20 | |
| 21 | void BinderScope::clear() { |
| 22 | expressions.clear(); |
no test coverage detected