[natspec] Introduce AST node for structured documentation - #7834
Merged
Conversation
4 tasks
chriseth
reviewed
Nov 28, 2019
chriseth
reviewed
Nov 28, 2019
erak
commented
Nov 28, 2019
erak
force-pushed
the
docstring-ast-node
branch
from
November 28, 2019 15:20
8b8f512 to
eaf27b5
Compare
1 task
erak
force-pushed
the
docstring-ast-node
branch
from
January 23, 2020 11:23
eaf27b5 to
5d6b554
Compare
erak
commented
Jan 23, 2020
erak
commented
Jan 23, 2020
erak
force-pushed
the
docstring-ast-node
branch
from
January 25, 2020 16:56
5d6b554 to
4f5ffba
Compare
Marenz
reviewed
Jan 28, 2020
erak
force-pushed
the
docstring-ast-node
branch
2 times, most recently
from
January 29, 2020 22:27
f8f8511 to
0334aef
Compare
erak
marked this pull request as ready for review
January 29, 2020 22:33
erak
commented
Jan 29, 2020
erak
commented
Jan 29, 2020
erak
commented
Jan 29, 2020
chriseth
reviewed
Jan 29, 2020
erak
commented
Jan 29, 2020
erak
commented
Jan 29, 2020
| ASTPointer<FormalDocumentation> Parser::parseFormalDocumentation() | ||
| { | ||
| ASTNodeFactory nodeFactory{*this}; | ||
| nodeFactory.setLocation(m_scanner->currentCommentLocation()); |
Collaborator
Author
There was a problem hiding this comment.
Here the location is set manually, and therefore https://github.com/ethereum/solidity/pull/7834/files#r372670260 is needed.
chriseth
reviewed
Jan 29, 2020
chriseth
reviewed
Jan 29, 2020
chriseth
reviewed
Jan 29, 2020
erak
force-pushed
the
docstring-ast-node
branch
from
January 30, 2020 16:21
0334aef to
c4f2f1d
Compare
erak
commented
Jan 30, 2020
erak
force-pushed
the
docstring-ast-node
branch
from
January 30, 2020 16:35
ed1b089 to
574b30d
Compare
chriseth
reviewed
Jan 30, 2020
chriseth
reviewed
Jan 30, 2020
chriseth
reviewed
Jan 30, 2020
Marenz
previously approved these changes
Jan 30, 2020
chriseth
reviewed
Jan 30, 2020
| } | ||
|
|
||
| ASTPointer<ASTString> FunctionType::documentation() const | ||
| ASTPointer<StructuredDocumentation> FunctionType::documentation() const |
Contributor
There was a problem hiding this comment.
We should maybe change this later so that it returns a plain pointer to StructuredDocumentation. I don't see why we should create a new shared_ptr below in the failure case.
Contributor
|
Looks good apart from the small changes to the comments! |
erak
force-pushed
the
docstring-ast-node
branch
from
January 30, 2020 17:26
574b30d to
306f6d9
Compare
chriseth
approved these changes
Jan 30, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #7835.
The idea behind this PR is to introduce a new AST node which is added as a subnode for all AST nodes that can be documented using a formal specification, here NatSpec (contract, function, event and modifier definitions). For all other nodes the documentation is still a plain string.