-
Notifications
You must be signed in to change notification settings - Fork 77
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
Formatter
: Support comments
#1172
Conversation
Set the location of the `Let` node as the start of the `let` keyword in the source code. This is necessary for the formatter implementation.
This is not finished work. We need to support: + top-level comments + comments between components And test it properly. Closes Zilliqa#1086
0250bd5
to
8db2eaf
Compare
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.
Looks good.
It would be fun to stress-test the formatter with some really weirdly placed comments, but it's not a high priority.
@jjcnn Thanks! I tried the formatter on marketplace-contracts and the formatted code seems good. I also ran it on the dump of all deployed contracts (see #1120) and, at least, it doesn't crush and generates readable code. Of course, there may be cases that we have not taken into account, but we could fix them in the next release. |
Closes #1086