| 33 | } |
| 34 | |
| 35 | Variable* Scope::getVariable(std::string_view name) { |
| 36 | VariableMap::iterator itr = m_variables.find(name); |
| 37 | if (itr == m_variables.end()) { |
| 38 | if (m_parentScope) { |
| 39 | Variable* var = m_parentScope->getVariable(name); |
| 40 | if (var) return var; |
| 41 | } |
| 42 | return nullptr; |
| 43 | } else { |
| 44 | return (*itr).second; |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | DataType* Scope::getUsedDataType(std::string_view name) { |
| 49 | DataTypeMap::iterator itr = m_usedDataTypes.find(name); |
no outgoing calls
no test coverage detected