From 623b8eb107a97861e3e7e0c13acee39c8d5f4075 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 10 Apr 2017 12:48:41 +0100 Subject: Pull out ReadFile from CompilerStack --- libsolidity/interface/CompilerStack.h | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'libsolidity/interface/CompilerStack.h') 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 #include #include +#include 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; - /// 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 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 m_libraries; -- cgit v1.2.3