diff options
author | Emilio Almansi <ealmansi@gmail.com> | 2018-02-17 01:37:11 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-02-19 23:45:38 +0800 |
commit | ca6957da37454ddd474b1feeaf02f7d06cba06b0 (patch) | |
tree | 7acda3958b63743157d05b36b607b8ad9a2ccc9b /libsolidity | |
parent | 839acafb9590c24da9446fc66f8a26939210eeb3 (diff) | |
download | dexon-solidity-ca6957da37454ddd474b1feeaf02f7d06cba06b0.tar.gz dexon-solidity-ca6957da37454ddd474b1feeaf02f7d06cba06b0.tar.zst dexon-solidity-ca6957da37454ddd474b1feeaf02f7d06cba06b0.zip |
Added property _documentation_ to Function, Event, and Modifier definition classes.
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/ast/ASTJsonConverter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp index 51249f20..cd9f7eca 100644 --- a/libsolidity/ast/ASTJsonConverter.cpp +++ b/libsolidity/ast/ASTJsonConverter.cpp @@ -324,6 +324,7 @@ bool ASTJsonConverter::visit(FunctionDefinition const& _node) { std::vector<pair<string, Json::Value>> attributes = { make_pair("name", _node.name()), + make_pair("documentation", _node.documentation() ? Json::Value(*_node.documentation()) : Json::nullValue), // FIXME: remove with next breaking release make_pair(m_legacy ? "constant" : "isDeclaredConst", _node.stateMutability() <= StateMutability::View), make_pair("payable", _node.isPayable()), @@ -365,6 +366,7 @@ bool ASTJsonConverter::visit(ModifierDefinition const& _node) { setJsonNode(_node, "ModifierDefinition", { make_pair("name", _node.name()), + make_pair("documentation", _node.documentation() ? Json::Value(*_node.documentation()) : Json::nullValue), make_pair("visibility", Declaration::visibilityToString(_node.visibility())), make_pair("parameters", toJson(_node.parameterList())), make_pair("body", toJson(_node.body())) @@ -386,6 +388,7 @@ bool ASTJsonConverter::visit(EventDefinition const& _node) m_inEvent = true; setJsonNode(_node, "EventDefinition", { make_pair("name", _node.name()), + make_pair("documentation", _node.documentation() ? Json::Value(*_node.documentation()) : Json::nullValue), make_pair("parameters", toJson(_node.parameterList())), make_pair("anonymous", _node.isAnonymous()) }); |