-
Notifications
You must be signed in to change notification settings - Fork 47
Ditching antlr4ts #103
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
Ditching antlr4ts #103
Conversation
b84b4db to
7322745
Compare
7322745 to
9975828
Compare
… can afford a slight increase in the final output
fvictorio
left a comment
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.
Thanks a lot for this, I didn't know that there was an official typescript target now!
| - name: Install | ||
| run: npm install | ||
| - name: Install ANTLR4 | ||
| run: pip install antlr4-tools |
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.
Do you mind updating the https://github.com/solidity-parser/parser/blob/master/DEVELOPING.md document? I know it wasn't up to date to begin with, but I think it would be a good idea to do it now that we (again) use something other than npm.
Also, I think we can remove the scripts/antlr.sh file (mentioned in that outdated document).
| sourcemap: true, | ||
| format: 'cjs', | ||
| platform: 'node', | ||
| target: 'node16', |
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.
Good catch, I hadn't updated this in a while.
…build on prettier-plugin-solidity
Removing
antlr4tsthat hasn't been updated in 3 years and relying in the officialantlr4Typescript target.Main changes.
arrayare now prepended by_listundefinednow generated functions returnnulllocandrangeattributes follow the naming standardSome details:
src/ASTBuilder.tshas a check forErrorNodebutantlr4doesn't expose this class nor is this check triggered in any tests.import.meta.urlthat is wrongly processed byesbuildThe built size is cut in half thanks to this.