aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/CompilerStack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/CompilerStack.cpp')
-rw-r--r--libsolidity/CompilerStack.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libsolidity/CompilerStack.cpp b/libsolidity/CompilerStack.cpp
index 12e49b58..03120f66 100644
--- a/libsolidity/CompilerStack.cpp
+++ b/libsolidity/CompilerStack.cpp
@@ -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