From f125a4b5057a4f1377a9fdf3ba61d56d0c088b57 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 9 Jan 2015 08:09:30 +0100 Subject: [PATCH] CLI tweaks. --- libsolidity/CompilerStack.cpp | 6 +++--- libsolidity/CompilerStack.h | 2 +- solc/CommandLineInterface.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libsolidity/CompilerStack.cpp b/libsolidity/CompilerStack.cpp index a0d6691dd..174f9cd22 100644 --- a/libsolidity/CompilerStack.cpp +++ b/libsolidity/CompilerStack.cpp @@ -141,15 +141,15 @@ void CompilerStack::streamAssembly(ostream& _outStream, string const& _contractN string const& CompilerStack::getInterface(string const& _contractName) const { - return getJsonDocumentation(_contractName, DocumentationType::ABI_INTERFACE); + return getMetadata(_contractName, DocumentationType::ABI_INTERFACE); } string const& CompilerStack::getSolidityInterface(string const& _contractName) const { - return getJsonDocumentation(_contractName, DocumentationType::ABI_SOLIDITY_INTERFACE); + return getMetadata(_contractName, DocumentationType::ABI_SOLIDITY_INTERFACE); } -string const& CompilerStack::getJsonDocumentation(string const& _contractName, DocumentationType _type) const +string const& CompilerStack::getMetadata(string const& _contractName, DocumentationType _type) const { if (!m_parseSuccessful) BOOST_THROW_EXCEPTION(CompilerError() << errinfo_comment("Parsing was not successful.")); diff --git a/libsolidity/CompilerStack.h b/libsolidity/CompilerStack.h index 918365850..afc9a5162 100644 --- a/libsolidity/CompilerStack.h +++ b/libsolidity/CompilerStack.h @@ -90,7 +90,7 @@ public: /// 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 - std::string const& getJsonDocumentation(std::string const& _contractName, DocumentationType _type) const; + std::string const& getMetadata(std::string const& _contractName, DocumentationType _type) const; /// @returns the previously used scanner, useful for counting lines during error reporting. Scanner const& getScanner(std::string const& _sourceName = "") const; diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 46a293a7b..c03b60d41 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -160,7 +160,7 @@ void CommandLineInterface::handleMeta(DocumentationType _type, string const& _co case DocumentationType::ABI_INTERFACE: argName = g_argAbiStr; suffix = ".abi"; - title = "Contract ABI"; + title = "Contract JSON ABI"; break; case DocumentationType::ABI_SOLIDITY_INTERFACE: argName = g_argSolAbiStr; @@ -188,7 +188,7 @@ void CommandLineInterface::handleMeta(DocumentationType _type, string const& _co if (outputToStdout(choice)) { cout << title << endl; - cout << m_compiler.getMetadata(_contract, _type); + cout << m_compiler.getMetadata(_contract, _type) << endl; } if (outputToFile(choice))