mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Solidity natspec docstring test improvements
- Adding a test for docstring being between function signature and function body - Properly checking for exceptions in parsing - Small parser fix
This commit is contained in:
parent
e3e90c4e6b
commit
db7b118ece
@ -118,12 +118,12 @@ ASTPointer<FunctionDefinition> Parser::parseFunctionDefinition(bool _isPublic)
|
||||
{
|
||||
ASTNodeFactory nodeFactory(*this);
|
||||
ASTPointer<ASTString> docstring;
|
||||
expectToken(Token::FUNCTION);
|
||||
if (m_scanner->getCurrentCommentLiteral() != "")
|
||||
{
|
||||
docstring = std::make_shared<ASTString>(m_scanner->getCurrentCommentLiteral());
|
||||
m_scanner->clearCurrentCommentLiteral();
|
||||
}
|
||||
expectToken(Token::FUNCTION);
|
||||
ASTPointer<ASTString> name(expectIdentifierToken());
|
||||
ASTPointer<ParameterList> parameters(parseParameterList());
|
||||
bool isDeclaredConst = false;
|
||||
|
Loading…
Reference in New Issue
Block a user