Skip to content

Commit

Permalink
Implementation for SymbolTable::hasSymbol() function.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Sep 10, 2024
1 parent 1f1a480 commit 062fb66
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/SymbolTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ DynamicObject SymbolTable::getSymbol(const std::string& name) {
void SymbolTable::setSymbol(const std::string& name, DynamicObject value) {
this->table[name] = std::move(value);
}

bool SymbolTable::hasSymbol(const std::string& name) {
return this->table.find(name) != this->table.end();
}

0 comments on commit 062fb66

Please sign in to comment.