Do not catch InternalCompilerErrors as part of fatal error handling.

InternalCompilerErrors always have to end the whole compilation process because a serious inconsistency was detected.
This commit is contained in:
chriseth
2015-10-16 14:52:01 +02:00
parent 52eaa477d4
commit 7b56206a98
4 changed files with 15 additions and 9 deletions
+3 -1
View File
@@ -104,7 +104,9 @@ bool CompilerStack::parse()
for (auto& sourcePair: m_sources)
{
sourcePair.second.scanner->reset();
sourcePair.second.ast = Parser(m_errors).parse(sourcePair.second.scanner); // todo check for errors
sourcePair.second.ast = Parser(m_errors).parse(sourcePair.second.scanner);
if (!sourcePair.second.ast)
solAssert(!Error::containsOnlyWarnings(m_errors), "Parser returned null but did not report error.");
}
if (!Error::containsOnlyWarnings(m_errors))
// errors while parsing. sould stop before type checking