diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2014-12-10 20:13:12 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2014-12-10 20:24:48 +0800 |
commit | fbc35003cee590b24bbbf8b68dad1cf4a81073c5 (patch) | |
tree | 7e83f579f063575b58ca294a02e2dc21cb817717 /InterfaceHandler.h | |
parent | 57e6827cb57708ed8f687bf9b0a304b1481cf742 (diff) | |
download | dexon-solidity-fbc35003cee590b24bbbf8b68dad1cf4a81073c5.tar.gz dexon-solidity-fbc35003cee590b24bbbf8b68dad1cf4a81073c5.tar.zst dexon-solidity-fbc35003cee590b24bbbf8b68dad1cf4a81073c5.zip |
Natspec title and author tag.
- Adding the title and author natspec documentation tags for contracts
- Also using the author tag for functions now
- Tests
Diffstat (limited to 'InterfaceHandler.h')
-rw-r--r-- | InterfaceHandler.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/InterfaceHandler.h b/InterfaceHandler.h index e6be9e6a..d71345b9 100644 --- a/InterfaceHandler.h +++ b/InterfaceHandler.h @@ -45,7 +45,15 @@ enum class DocTagType: uint8_t DEV, NOTICE, PARAM, - RETURN + RETURN, + AUTHOR, + TITLE +}; + +enum class CommentOwner +{ + CONTRACT, + FUNCTION }; class InterfaceHandler @@ -89,12 +97,14 @@ private: std::string::const_iterator _end); std::string::const_iterator appendDocTagParam(std::string::const_iterator _pos, std::string::const_iterator _end); - void parseDocString(std::string const& _string); + void parseDocString(std::string const& _string, CommentOwner _owner); std::string::const_iterator appendDocTag(std::string::const_iterator _pos, - std::string::const_iterator _end); + std::string::const_iterator _end, + CommentOwner _owner); std::string::const_iterator parseDocTag(std::string::const_iterator _pos, std::string::const_iterator _end, - std::string const& _tag); + std::string const& _tag, + CommentOwner _owner); Json::StyledWriter m_writer; @@ -103,6 +113,9 @@ private: std::string m_notice; std::string m_dev; std::string m_return; + std::string m_contractAuthor; + std::string m_author; + std::string m_title; std::vector<std::pair<std::string, std::string>> m_params; }; |