aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-11-15 09:04:00 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-11-15 23:55:25 +0800
commit9719cf38e662e428ace8f3ebce9774a5338f0ce5 (patch)
tree07e441be8419b3161cedf449c2808bee082fe539 /libsolidity/ast
parent0072160d7772b2f30c2c6af4428728cb31641696 (diff)
downloaddexon-solidity-9719cf38e662e428ace8f3ebce9774a5338f0ce5.tar
dexon-solidity-9719cf38e662e428ace8f3ebce9774a5338f0ce5.tar.gz
dexon-solidity-9719cf38e662e428ace8f3ebce9774a5338f0ce5.tar.bz2
dexon-solidity-9719cf38e662e428ace8f3ebce9774a5338f0ce5.tar.lz
dexon-solidity-9719cf38e662e428ace8f3ebce9774a5338f0ce5.tar.xz
dexon-solidity-9719cf38e662e428ace8f3ebce9774a5338f0ce5.tar.zst
dexon-solidity-9719cf38e662e428ace8f3ebce9774a5338f0ce5.zip
Move InterfaceHandler from string to JSON
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/AST.cpp8
-rw-r--r--libsolidity/ast/AST.h13
2 files changed, 11 insertions, 10 deletions
diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp
index 695d9881..305668e7 100644
--- a/libsolidity/ast/AST.cpp
+++ b/libsolidity/ast/AST.cpp
@@ -160,22 +160,22 @@ vector<pair<FixedHash<4>, FunctionTypePointer>> const& ContractDefinition::inter
return *m_interfaceFunctionList;
}
-string const& ContractDefinition::devDocumentation() const
+Json::Value const& ContractDefinition::devDocumentation() const
{
return m_devDocumentation;
}
-string const& ContractDefinition::userDocumentation() const
+Json::Value const& ContractDefinition::userDocumentation() const
{
return m_userDocumentation;
}
-void ContractDefinition::setDevDocumentation(string const& _devDocumentation)
+void ContractDefinition::setDevDocumentation(Json::Value const& _devDocumentation)
{
m_devDocumentation = _devDocumentation;
}
-void ContractDefinition::setUserDocumentation(string const& _userDocumentation)
+void ContractDefinition::setUserDocumentation(Json::Value const& _userDocumentation)
{
m_userDocumentation = _userDocumentation;
}
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h
index 6c3f52bc..1b42c499 100644
--- a/libsolidity/ast/AST.h
+++ b/libsolidity/ast/AST.h
@@ -35,6 +35,7 @@
#include <libsolidity/ast/Types.h>
#include <libsolidity/interface/Exceptions.h>
#include <libsolidity/ast/ASTAnnotations.h>
+#include <json/json.h>
namespace dev
{
@@ -343,11 +344,11 @@ public:
/// Returns the fallback function or nullptr if no fallback function was specified.
FunctionDefinition const* fallbackFunction() const;
- std::string const& userDocumentation() const;
- void setUserDocumentation(std::string const& _userDocumentation);
+ Json::Value const& userDocumentation() const;
+ void setUserDocumentation(Json::Value const& _userDocumentation);
- std::string const& devDocumentation() const;
- void setDevDocumentation(std::string const& _devDocumentation);
+ Json::Value const& devDocumentation() const;
+ void setDevDocumentation(Json::Value const& _devDocumentation);
virtual TypePointer type() const override;
@@ -359,8 +360,8 @@ private:
bool m_isLibrary;
// parsed Natspec documentation of the contract.
- std::string m_userDocumentation;
- std::string m_devDocumentation;
+ Json::Value m_userDocumentation;
+ Json::Value m_devDocumentation;
std::vector<ContractDefinition const*> m_linearizedBaseContracts;
mutable std::unique_ptr<std::vector<std::pair<FixedHash<4>, FunctionTypePointer>>> m_interfaceFunctionList;