@ -23,7 +23,7 @@ void Collection::add(ASTNodePtr node)
// -----------------------------------------
void HashMap::addElement(const std::string& key, ASTNodePtr value)
void HashMap::add(const std::string& key, ASTNodePtr value)
{
m_elements.emplace(key, value);
}
@ -101,7 +101,7 @@ public:
virtual bool isHashMap() const override { return true; }
void addElement(const std::string& key, ASTNodePtr value);
void add(const std::string& key, ASTNodePtr value);
const std::unordered_map<std::string, ASTNodePtr>& elements() const { return m_elements; }
size_t size() const { return m_elements.size(); }
@ -157,7 +157,7 @@ ASTNodePtr Eval::evalAst(ASTNodePtr ast, EnvironmentPtr env)
if (element_node == nullptr) {
return nullptr;
result->addElement(element.first, element_node);
result->add(element.first, element_node);
return result;
@ -197,7 +197,7 @@ ASTNodePtr Reader::readHashMap()
std::string keyString = is<String>(key.get()) ? std::static_pointer_cast<String>(key)->data() : std::static_pointer_cast<Keyword>(key)->keyword();
hash_map->addElement(keyString, value);
hash_map->add(keyString, value);
if (!consumeSpecific(Token { .type = Token::Type::BraceClose })) { // }