mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Allow NatSpec documentation for local variable declarations
This won't be part of NatSpec JSON, but in AST, under the field documentation.
This commit is contained in:
parent
2856f56525
commit
39e3da1905
@ -721,9 +721,6 @@ ASTPointer<VariableDeclaration> Parser::parseVariableDeclaration(
|
||||
ASTPointer<TypeName> type = _lookAheadArrayType ? _lookAheadArrayType : parseTypeName();
|
||||
nodeFactory.setEndPositionFromNode(type);
|
||||
|
||||
if (_options.kind == VarDeclKind::Other && documentation != nullptr)
|
||||
parserError(2837_error, "Only state variables or file-level variables can have a docstring.");
|
||||
|
||||
if (dynamic_cast<FunctionTypeName*>(type.get()) && _options.kind == VarDeclKind::State && m_scanner->currentToken() == Token::LBrace)
|
||||
fatalParserError(
|
||||
2915_error,
|
||||
|
Loading…
Reference in New Issue
Block a user