diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-05-10 17:56:21 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-05-19 23:11:04 +0800 |
commit | 81877cc59441f43a33ad7e7a09b92d3ea06b5f03 (patch) | |
tree | 39da83db8831ff4bb51414c35a8edf90948f7b83 | |
parent | 12328b784875bad30156a2c66912652f89fa8222 (diff) | |
download | dexon-solidity-81877cc59441f43a33ad7e7a09b92d3ea06b5f03.tar.gz dexon-solidity-81877cc59441f43a33ad7e7a09b92d3ea06b5f03.tar.zst dexon-solidity-81877cc59441f43a33ad7e7a09b92d3ea06b5f03.zip |
Rename InterfaceHandler to Natspec
-rw-r--r-- | libsolidity/interface/CompilerStack.cpp | 8 | ||||
-rw-r--r-- | libsolidity/interface/CompilerStack.h | 2 | ||||
-rw-r--r-- | libsolidity/interface/Natspec.cpp (renamed from libsolidity/interface/InterfaceHandler.cpp) | 10 | ||||
-rw-r--r-- | libsolidity/interface/Natspec.h (renamed from libsolidity/interface/InterfaceHandler.h) | 2 | ||||
-rw-r--r-- | libsolidity/parsing/Parser.cpp | 1 |
5 files changed, 11 insertions, 12 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 4b57b34c..7125adec 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -38,7 +38,7 @@ #include <libsolidity/analysis/SyntaxChecker.h> #include <libsolidity/codegen/Compiler.h> #include <libsolidity/interface/ABI.h> -#include <libsolidity/interface/InterfaceHandler.h> +#include <libsolidity/interface/Natspec.h> #include <libsolidity/interface/GasEstimator.h> #include <libsolidity/formal/Why3Translator.h> @@ -220,8 +220,8 @@ bool CompilerStack::analyze() TypeChecker typeChecker(m_errors); if (typeChecker.checkTypeRequirements(*contract)) { - contract->setDevDocumentation(InterfaceHandler::devDocumentation(*contract)); - contract->setUserDocumentation(InterfaceHandler::userDocumentation(*contract)); + contract->setDevDocumentation(Natspec::devDocumentation(*contract)); + contract->setUserDocumentation(Natspec::userDocumentation(*contract)); } else noErrors = false; @@ -492,7 +492,7 @@ Json::Value const& CompilerStack::metadata(Contract const& _contract, Documentat // caches the result if (!*doc) - doc->reset(new Json::Value(InterfaceHandler::documentation(*_contract.contract, _type))); + doc->reset(new Json::Value(Natspec::documentation(*_contract.contract, _type))); return *(*doc); } diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h index dd8d671e..cc5ba64c 100644 --- a/libsolidity/interface/CompilerStack.h +++ b/libsolidity/interface/CompilerStack.h @@ -59,7 +59,7 @@ class FunctionDefinition; class SourceUnit; class Compiler; class GlobalContext; -class InterfaceHandler; +class Natspec; class Error; class DeclarationContainer; diff --git a/libsolidity/interface/InterfaceHandler.cpp b/libsolidity/interface/Natspec.cpp index b73cf46e..70486e23 100644 --- a/libsolidity/interface/InterfaceHandler.cpp +++ b/libsolidity/interface/Natspec.cpp @@ -23,7 +23,7 @@ * Can generally deal with JSON files */ -#include <libsolidity/interface/InterfaceHandler.h> +#include <libsolidity/interface/Natspec.h> #include <boost/range/irange.hpp> #include <libsolidity/ast/AST.h> #include <libsolidity/interface/CompilerStack.h> @@ -32,7 +32,7 @@ using namespace std; using namespace dev; using namespace dev::solidity; -Json::Value InterfaceHandler::documentation( +Json::Value Natspec::documentation( ContractDefinition const& _contractDef, DocumentationType _type ) @@ -48,7 +48,7 @@ Json::Value InterfaceHandler::documentation( BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Unknown documentation type")); } -Json::Value InterfaceHandler::userDocumentation(ContractDefinition const& _contractDef) +Json::Value Natspec::userDocumentation(ContractDefinition const& _contractDef) { Json::Value doc; Json::Value methods(Json::objectValue); @@ -71,7 +71,7 @@ Json::Value InterfaceHandler::userDocumentation(ContractDefinition const& _contr return doc; } -Json::Value InterfaceHandler::devDocumentation(ContractDefinition const& _contractDef) +Json::Value Natspec::devDocumentation(ContractDefinition const& _contractDef) { Json::Value doc; Json::Value methods(Json::objectValue); @@ -120,7 +120,7 @@ Json::Value InterfaceHandler::devDocumentation(ContractDefinition const& _contra return doc; } -string InterfaceHandler::extractDoc(multimap<string, DocTag> const& _tags, string const& _name) +string Natspec::extractDoc(multimap<string, DocTag> const& _tags, string const& _name) { string value; auto range = _tags.equal_range(_name); diff --git a/libsolidity/interface/InterfaceHandler.h b/libsolidity/interface/Natspec.h index 883ef3b9..bec9acd2 100644 --- a/libsolidity/interface/InterfaceHandler.h +++ b/libsolidity/interface/Natspec.h @@ -58,7 +58,7 @@ enum class CommentOwner Function }; -class InterfaceHandler +class Natspec { public: /// Get the given type of documentation diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index b5130c8a..72150a3e 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -27,7 +27,6 @@ #include <libsolidity/parsing/Scanner.h> #include <libsolidity/inlineasm/AsmParser.h> #include <libsolidity/interface/Exceptions.h> -#include <libsolidity/interface/InterfaceHandler.h> using namespace std; |