You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 27, 2020. It is now read-only.
Internally, the reference implementation of Solidity uses an ExpressionStatement, so I would approach this change carefully.
The definition of ExpressionStatement is an expression followed by a semicolon though. If it’s difficult to special case this in prettier then I’m open to accepting a pull request to update the parser. Make sure you include the change in the changelog too.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The loop expression of the for statement gest the type
ExpressionStatement
added:solidity-parser-antlr/src/ASTBuilder.js
Lines 690 to 693 in ded9c70
This is causing issues in prettier-solidity, where is difficult to know if an ExpressionStatement should have a semicolon or not (see prettier-solidity/prettier-plugin-solidity#46 and prettier-solidity/prettier-plugin-solidity#64 for the details). Since the loop expression of a for doesn't have a semicolon, calling it an ExpressionStatement feels wrong.
My question is if there's a good reason to do this, and if there's a chance of modifying it.
Thanks!
The text was updated successfully, but these errors were encountered: