diff options
Diffstat (limited to 'libsolidity/interface/CompilerStack.cpp')
-rw-r--r-- | libsolidity/interface/CompilerStack.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 3238423a..a6f6f224 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -111,6 +111,8 @@ bool CompilerStack::parse() 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."); + else + sourcePair.second.ast->annotation().path = sourcePair.first; sourceUnitsByName[sourcePair.first] = sourcePair.second.ast.get(); } if (!Error::containsOnlyWarnings(m_errors)) @@ -384,6 +386,7 @@ void CompilerStack::resolveImports() << errinfo_sourceLocation(import->location()) << errinfo_comment("Source not found.") ); + import->annotation().sourceUnit = m_sources.at(path).ast.get(); toposort(path, &m_sources[path]); } |