| 174 | } |
| 175 | |
| 176 | void NameAndTypeResolver::activateVariable(std::string const& _name) |
| 177 | { |
| 178 | solAssert(m_currentScope, ""); |
| 179 | // Scoped local variables are invisible before activation. |
| 180 | // When a local variable is activated, its name is removed |
| 181 | // from a scope's invisible variables. |
| 182 | // This is used to avoid activation of variables of same name |
| 183 | // in the same scope (an error is returned). |
| 184 | if (m_currentScope->isInvisible(_name)) |
| 185 | m_currentScope->activateVariable(_name); |
| 186 | } |
| 187 | |
| 188 | std::vector<Declaration const*> NameAndTypeResolver::resolveName(ASTString const& _name, ASTNode const* _scope) const |
| 189 | { |