-
Notifications
You must be signed in to change notification settings - Fork 45
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
Ditching antlr4ts #103
Conversation
b84b4db
to
7322745
Compare
7322745
to
9975828
Compare
… can afford a slight increase in the final output
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!
@@ -38,6 +38,8 @@ jobs: | |||
cache: 'npm' | |||
- 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
antlr4ts
that hasn't been updated in 3 years and relying in the officialantlr4
Typescript target.Main changes.
array
are now prepended by_list
undefined
now generated functions returnnull
loc
andrange
attributes follow the naming standardSome details:
src/ASTBuilder.ts
has a check forErrorNode
butantlr4
doesn't expose this class nor is this check triggered in any tests.import.meta.url
that is wrongly processed byesbuild
The built size is cut in half thanks to this.