diff options
author | chriseth <c@ethdev.com> | 2015-12-15 22:46:03 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-12-18 19:46:56 +0800 |
commit | 603dc58040e62ef99d0a10084340dd4548a438a8 (patch) | |
tree | 2c9246af514f8023117800bd8675703fc8d02fb4 /libsolidity/interface | |
parent | d3c459b5a99715c96733825f78d63cc57265ee3c (diff) | |
download | dexon-solidity-603dc58040e62ef99d0a10084340dd4548a438a8.tar.gz dexon-solidity-603dc58040e62ef99d0a10084340dd4548a438a8.tar.zst dexon-solidity-603dc58040e62ef99d0a10084340dd4548a438a8.zip |
Simple aliasing during import.
Diffstat (limited to 'libsolidity/interface')
-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]); } |