MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / replaceExpression

Method replaceExpression

src/binder/binder_scope.cpp:12–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10}
11
12void 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
21void BinderScope::clear() {
22 expressions.clear();

Callers 1

Calls 3

eraseMethod · 0.80
containsMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected