-
Notifications
You must be signed in to change notification settings - Fork 45
Feature: return comments with the parser #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thanks a lot @Janther!
I left two very optional comments, feel free to merge whether you apply them or not.
Co-authored-by: Franco Victorio <victorio.franco@gmail.com>
Co-authored-by: Franco Victorio <victorio.franco@gmail.com>
Just saying the comment parsing seems to be incorrect for some functions. For instance, this one: /**
@notice Returns square-root spot price, lower and upper bounds of the AMM position.
*/
function getAMMState() |
@tonisives what does the parser produce and why do you think it's wrong? I tried it and got: [
{
type: 'BlockComment',
value: '*\n' +
' @notice Returns square-root spot price, lower and upper bounds of the AMM position. \n' +
' '
}
] which looks correct to me. |
added the
comments
option and when it's set totrue
, the AST will have an extra property with an array of all of the comments within the source.Also fixed a bug where the
loc
of a token will display the wrongend
property if the token contained new lines.Once this is published
prettier-plugin-solidity
won't needsolidity-comments-extractor
anymore.