Exporting Natspec documentation to a JSON interface

- Adding a getDocumentation() function to solidity compiler stack
  so that we can obtain the natspec interface for a contract

- Adding libjsoncpp as a dependency of libsolidity. This is done
  in a dirty way, using libjsonrpc-cpp s an intermediate dependency
  for the moment. Will fix soon.

- Start of a test file for Natspec exporting to JSON
This commit is contained in:
Lefteris Karapetsas
2014-12-01 17:03:04 +01:00
parent 3fc2708d65
commit 43d6726dd7
4 changed files with 35 additions and 1 deletions
+4
View File
@@ -62,6 +62,9 @@ public:
/// Returns a string representing the contract interface in JSON.
/// Prerequisite: Successful call to parse or compile.
std::string const& getInterface();
/// Returns a string representing the contract documentation in JSON.
/// Prerequisite: Successful call to parse or compile.
std::string const& getDocumentation();
/// Returns the previously used scanner, useful for counting lines during error reporting.
Scanner const& getScanner() const { return *m_scanner; }
@@ -77,6 +80,7 @@ private:
std::shared_ptr<ContractDefinition> m_contractASTNode;
bool m_parseSuccessful;
std::string m_interface;
std::string m_documentation;
std::shared_ptr<Compiler> m_compiler;
bytes m_bytecode;
};