| 130 | } |
| 131 | |
| 132 | bool NameAndTypeResolver::resolveNamesAndTypes(SourceUnit& _source) |
| 133 | { |
| 134 | try |
| 135 | { |
| 136 | for (std::shared_ptr<ASTNode> const& node: _source.nodes()) |
| 137 | { |
| 138 | setScope(&_source); |
| 139 | if (!resolveNamesAndTypesInternal(*node, true)) |
| 140 | return false; |
| 141 | } |
| 142 | } |
| 143 | catch (FatalError const&) |
| 144 | { |
| 145 | if (!m_errorReporter.hasErrors()) |
| 146 | { |
| 147 | std::cerr << "Unreported fatal error:" << std::endl; |
| 148 | std::cerr << boost::current_exception_diagnostic_information() << std::endl; |
| 149 | solAssert(false, "Unreported fatal error."); |
| 150 | } |
| 151 | return false; |
| 152 | } |
| 153 | return true; |
| 154 | } |
| 155 | |
| 156 | bool NameAndTypeResolver::updateDeclaration(Declaration const& _declaration) |
| 157 | { |
no test coverage detected