Skip to content
Snippets Groups Projects
Commit 50c298ca authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Remove dead code in SymbolTable

parent 27d9a80e
Branches
Tags
1 merge request!104Add missing tests for ASTNodeBuiltinFunctionExpressionBuilder
...@@ -353,15 +353,8 @@ class SymbolTable ...@@ -353,15 +353,8 @@ class SymbolTable
add(const std::string& symbol_name, const TAO_PEGTL_NAMESPACE::position& symbol_position) add(const std::string& symbol_name, const TAO_PEGTL_NAMESPACE::position& symbol_position)
{ {
for (auto i_stored_symbol = m_symbol_list.begin(); i_stored_symbol != m_symbol_list.end(); ++i_stored_symbol) { for (auto i_stored_symbol = m_symbol_list.begin(); i_stored_symbol != m_symbol_list.end(); ++i_stored_symbol) {
std::string_view stored_symbol_name = i_stored_symbol->name(); if (i_stored_symbol->name() == symbol_name) {
if (stored_symbol_name.size() == symbol_name.size()) {
if (stored_symbol_name == symbol_name) {
return std::make_pair(i_stored_symbol, false); return std::make_pair(i_stored_symbol, false);
} else if (stored_symbol_name.size() > symbol_name.size() and (stored_symbol_name[symbol_name.size()] == ':')) {
if (stored_symbol_name.substr(0, symbol_name.size()) == symbol_name) {
return std::make_pair(i_stored_symbol, false);
}
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment