From 7222fac45680dd9955fd37c6245760014a19873a Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 27 Jul 2017 11:28:04 +0100 Subject: Remove DocumentationType from natspec --- libsolidity/interface/CompilerStack.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'libsolidity/interface/CompilerStack.h') diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h index d287f224..54e3e23f 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. @@ -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. -- cgit v1.2.3 From e2cfc9ee92158169b5dd058074f25d67959e9875 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 17 Aug 2017 01:14:15 +0100 Subject: Mark a lot of functions const (where possible) --- libsolidity/interface/CompilerStack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsolidity/interface/CompilerStack.h') diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h index 54e3e23f..bb0f4126 100644 --- a/libsolidity/interface/CompilerStack.h +++ b/libsolidity/interface/CompilerStack.h @@ -88,7 +88,7 @@ public: 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; } -- cgit v1.2.3 From 9ac2ac14c1819be2341c6947245bf63b02795528 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 13 Jul 2017 21:06:04 +0200 Subject: Rename read file callback. --- libsolidity/interface/CompilerStack.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libsolidity/interface/CompilerStack.h') diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h index bb0f4126..361b8a45 100644 --- a/libsolidity/interface/CompilerStack.h +++ b/libsolidity/interface/CompilerStack.h @@ -82,7 +82,7 @@ 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) {} @@ -287,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 m_libraries; -- cgit v1.2.3