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 /Parser.cpp | |
parent | 57e6827cb57708ed8f687bf9b0a304b1481cf742 (diff) | |
download | dexon-solidity-fbc35003cee590b24bbbf8b68dad1cf4a81073c5.tar dexon-solidity-fbc35003cee590b24bbbf8b68dad1cf4a81073c5.tar.gz dexon-solidity-fbc35003cee590b24bbbf8b68dad1cf4a81073c5.tar.bz2 dexon-solidity-fbc35003cee590b24bbbf8b68dad1cf4a81073c5.tar.lz dexon-solidity-fbc35003cee590b24bbbf8b68dad1cf4a81073c5.tar.xz 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 'Parser.cpp')
-rw-r--r-- | Parser.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -112,6 +112,9 @@ ASTPointer<ImportDirective> Parser::parseImportDirective() ASTPointer<ContractDefinition> Parser::parseContractDefinition() { ASTNodeFactory nodeFactory(*this); + ASTPointer<ASTString> docstring; + if (m_scanner->getCurrentCommentLiteral() != "") + docstring = make_shared<ASTString>(m_scanner->getCurrentCommentLiteral()); expectToken(Token::CONTRACT); ASTPointer<ASTString> name = expectIdentifierToken(); expectToken(Token::LBRACE); @@ -146,7 +149,7 @@ ASTPointer<ContractDefinition> Parser::parseContractDefinition() } nodeFactory.markEndPosition(); expectToken(Token::RBRACE); - return nodeFactory.createNode<ContractDefinition>(name, structs, stateVariables, functions); + return nodeFactory.createNode<ContractDefinition>(name, docstring, structs, stateVariables, functions); } ASTPointer<FunctionDefinition> Parser::parseFunctionDefinition(bool _isPublic) |