diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-07-03 18:58:24 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-07-03 19:06:41 +0800 |
commit | 08069bf4a426247d8fa6fb0e1a2002a9ea2f9ded (patch) | |
tree | 2cc48fa042b0a3bbc3817800f8af4acfd3aedd5f /libsolidity/interface/CompilerStack.h | |
parent | d230048dc8385744203528115aa9bb5c0fba4339 (diff) | |
download | dexon-solidity-08069bf4a426247d8fa6fb0e1a2002a9ea2f9ded.tar.gz dexon-solidity-08069bf4a426247d8fa6fb0e1a2002a9ea2f9ded.tar.zst dexon-solidity-08069bf4a426247d8fa6fb0e1a2002a9ea2f9ded.zip |
Export CompilerStack state
Diffstat (limited to 'libsolidity/interface/CompilerStack.h')
-rw-r--r-- | libsolidity/interface/CompilerStack.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h index c51ae9c9..03a1b806 100644 --- a/libsolidity/interface/CompilerStack.h +++ b/libsolidity/interface/CompilerStack.h @@ -77,6 +77,14 @@ enum class DocumentationType: uint8_t class CompilerStack: boost::noncopyable { public: + enum State { + Empty, + SourcesSet, + ParsingSuccessful, + AnalysisSuccessful, + CompilationSuccessful + }; + /// Creates a new compiler stack. /// @param _readFile callback to used to read files for import statements. Must return /// and must not emit exceptions. @@ -194,6 +202,8 @@ public: /// @returns the list of errors that occured during parsing and type checking. ErrorList const& errors() { return m_errorReporter.errors(); } + State state() const { return m_stackState; } + private: /** * Information pertaining to one source unit, filled gradually during parsing and compilation. @@ -220,14 +230,6 @@ private: mutable std::unique_ptr<std::string const> sourceMapping; mutable std::unique_ptr<std::string const> runtimeSourceMapping; }; - enum State { - Empty, - SourcesSet, - ParsingSuccessful, - AnalysisSuccessful, - CompilationSuccessful - }; - /// Loads the missing sources from @a _ast (named @a _path) using the callback /// @a m_readFile and stores the absolute paths of all imports in the AST annotations. /// @returns the newly loaded sources. |