diff options
author | chriseth <chris@ethereum.org> | 2017-08-25 02:50:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-25 02:50:37 +0800 |
commit | d7661dd97460250b4e1127b9e7ea91e116143780 (patch) | |
tree | 0d909e7aeec373b0559b9d80f8ae9a9e03bdd92b /libsolidity/interface/CompilerStack.h | |
parent | bbb8e64fbee632d1594f6c132b1174591b961207 (diff) | |
parent | dd67e5966f41be0b2ef52041ea726930af74f7e9 (diff) | |
download | dexon-solidity-d7661dd97460250b4e1127b9e7ea91e116143780.tar dexon-solidity-d7661dd97460250b4e1127b9e7ea91e116143780.tar.gz dexon-solidity-d7661dd97460250b4e1127b9e7ea91e116143780.tar.bz2 dexon-solidity-d7661dd97460250b4e1127b9e7ea91e116143780.tar.lz dexon-solidity-d7661dd97460250b4e1127b9e7ea91e116143780.tar.xz dexon-solidity-d7661dd97460250b4e1127b9e7ea91e116143780.tar.zst dexon-solidity-d7661dd97460250b4e1127b9e7ea91e116143780.zip |
Merge pull request #2802 from ethereum/develop
Merge develop into release for 0.4.16
Diffstat (limited to 'libsolidity/interface/CompilerStack.h')
-rw-r--r-- | libsolidity/interface/CompilerStack.h | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h index d287f224..361b8a45 100644 --- a/libsolidity/interface/CompilerStack.h +++ b/libsolidity/interface/CompilerStack.h @@ -63,12 +63,6 @@ class Natspec; class Error; class DeclarationContainer; -enum class DocumentationType: uint8_t -{ - NatspecUser = 1, - NatspecDev -}; - /** * Easy to use and self-contained Solidity compiler with as few header dependencies as possible. * It holds state and can be used to either step through the compilation stages (and abort e.g. @@ -88,13 +82,13 @@ public: /// Creates a new compiler stack. /// @param _readFile callback to used to read files for import statements. Must return /// and must not emit exceptions. - explicit CompilerStack(ReadFile::Callback const& _readFile = ReadFile::Callback()): + explicit CompilerStack(ReadCallback::Callback const& _readFile = ReadCallback::Callback()): m_readFile(_readFile), m_errorList(), m_errorReporter(m_errorList) {} /// @returns the list of errors that occured during parsing and type checking. - ErrorList const& errors() { return m_errorReporter.errors(); } + ErrorList const& errors() const { return m_errorReporter.errors(); } /// @returns the current state. State state() const { return m_stackState; } @@ -203,11 +197,13 @@ public: /// Prerequisite: Successful call to parse or compile. Json::Value const& contractABI(std::string const& _contractName = "") const; - /// @returns a JSON representing the contract's documentation. + /// @returns a JSON representing the contract's user documentation. + /// Prerequisite: Successful call to parse or compile. + Json::Value const& natspecUser(std::string const& _contractName) const; + + /// @returns a JSON representing the contract's developer documentation. /// Prerequisite: Successful call to parse or compile. - /// @param type The type of the documentation to get. - /// Can be one of 4 types defined at @c DocumentationType - Json::Value const& natspec(std::string const& _contractName, DocumentationType _type) const; + Json::Value const& natspecDev(std::string const& _contractName) const; /// @returns a JSON representing a map of method identifiers (hashes) to function names. Json::Value methodIdentifiers(std::string const& _contractName) const; @@ -274,7 +270,8 @@ private: std::string createMetadata(Contract const& _contract) const; std::string computeSourceMapping(eth::AssemblyItems const& _items) const; Json::Value const& contractABI(Contract const&) const; - Json::Value const& natspec(Contract const&, DocumentationType _type) const; + Json::Value const& natspecUser(Contract const&) const; + Json::Value const& natspecDev(Contract const&) const; /// @returns the offset of the entry point of the given function into the list of assembly items /// or zero if it is not found or does not exist. @@ -290,7 +287,8 @@ private: std::string target; }; - ReadFile::Callback m_readFile; + ReadCallback::Callback m_readFile; + ReadCallback::Callback m_smtQuery; bool m_optimize = false; unsigned m_optimizeRuns = 200; std::map<std::string, h160> m_libraries; |