aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface/CompilerStack.h
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-04-10 20:56:00 +0800
committerGitHub <noreply@github.com>2017-04-10 20:56:00 +0800
commit8cbe87b4089bfb19dafd0b700586eaeeda30e271 (patch)
tree4fe0a7d7e461844578091fd43575cb34297f53c8 /libsolidity/interface/CompilerStack.h
parent9fe206505b3e864ccd8a2f4e288b9a5f31d1ff46 (diff)
parent623b8eb107a97861e3e7e0c13acee39c8d5f4075 (diff)
downloaddexon-solidity-8cbe87b4089bfb19dafd0b700586eaeeda30e271.tar
dexon-solidity-8cbe87b4089bfb19dafd0b700586eaeeda30e271.tar.gz
dexon-solidity-8cbe87b4089bfb19dafd0b700586eaeeda30e271.tar.bz2
dexon-solidity-8cbe87b4089bfb19dafd0b700586eaeeda30e271.tar.lz
dexon-solidity-8cbe87b4089bfb19dafd0b700586eaeeda30e271.tar.xz
dexon-solidity-8cbe87b4089bfb19dafd0b700586eaeeda30e271.tar.zst
dexon-solidity-8cbe87b4089bfb19dafd0b700586eaeeda30e271.zip
Merge pull request #2111 from ethereum/readfile
Pull out ReadFile from CompilerStack
Diffstat (limited to 'libsolidity/interface/CompilerStack.h')
-rw-r--r--libsolidity/interface/CompilerStack.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h
index 65850683..9c37eead 100644
--- a/libsolidity/interface/CompilerStack.h
+++ b/libsolidity/interface/CompilerStack.h
@@ -36,6 +36,7 @@
#include <libevmasm/SourceLocation.h>
#include <libevmasm/LinkerObject.h>
#include <libsolidity/interface/Exceptions.h>
+#include <libsolidity/interface/ReadFile.h>
namespace dev
{
@@ -77,18 +78,9 @@ enum class DocumentationType: uint8_t
class CompilerStack: boost::noncopyable
{
public:
- struct ReadFileResult
- {
- bool success;
- std::string contentsOrErrorMessage;
- };
-
- /// File reading callback.
- using ReadFileCallback = std::function<ReadFileResult(std::string const&)>;
-
/// Creates a new compiler stack.
/// @param _readFile callback to used to read files for import statements. Should return
- explicit CompilerStack(ReadFileCallback const& _readFile = ReadFileCallback());
+ explicit CompilerStack(ReadFile::Callback const& _readFile = ReadFile::Callback());
/// Sets path remappings in the format "context:prefix=target"
void setRemappings(std::vector<std::string> const& _remappings);
@@ -263,7 +255,7 @@ private:
std::string target;
};
- ReadFileCallback m_readFile;
+ ReadFile::Callback m_readFile;
bool m_optimize = false;
unsigned m_optimizeRuns = 200;
std::map<std::string, h160> m_libraries;