-
Notifications
You must be signed in to change notification settings - Fork 2k
fix: patch solang-parser #10509
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
fix: patch solang-parser #10509
Conversation
makes sense to keep us going until fully move to solar, @DaniPopes is the solang parser change something we could contribute upstream? |
it's not exactly the right implementation plus unlikely to be merged/released in any reasonable time |
Could we inform the user of this limitation when they try to format, given it is valid in the language? Ref: https://docs.soliditylang.org/en/v0.8.29/contracts.html#custom-storage-layout
|
Can only do that in docs since error message is specific to the parser generator implementation |
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.
Tested, lgtm 👍
In favor of shipping this patch to unblock, we can document the limitation in the release notes
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.
👍
Why not use |
The formatter was written 3 years ago with solang, and we've been slowly ripping it out in favor of solar: #9317 |
Cool. Thanks for the instant response. I haven't read a lot of code of these parts so feel free to correct me. |
solc AST is just bindings and not very ergonomic to use, solar is designed specifically for use as a library and is feature complete |
* fix: patch solang-parser * layout at test * bump * chore: update * update * format layout * fix pragma * chore: update * chore: update * fix: pragma 2 * feat: re-implement pragma
* fix: patch solang-parser (#10509) * fix: patch solang-parser * layout at test * bump * chore: update * update * format layout * fix pragma * chore: update * chore: update * fix: pragma 2 * feat: re-implement pragma * fix(fmt): 'at' is not a keyword (#10556) --------- Co-authored-by: DaniPopes <[email protected]>
Hotpatch to foundry-solang-parser maintained at https://github.com/danipopes/solang (branch new-features) (diff) for the following fixes:
transient
keyword by moving to Solar #9088note that this does not support more than just number literals in "layout at" due to a bug in solang-parser / lalrpop (build script runs forever if we allow any expression in that position)