-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add ImportAttribute
for import attributes (stage 3 Estree)
#253
Comments
Note for implementationhttps://github.com/estree/estree/blob/master/stage3/import-attributes.md EStree which meriyah implements has different definition of this syntax. |
BTW I don't think the typescript screenshot is a correct reference :-) The typescript parser thinks that's the legacy with statement, not part of the import declaration. You can see they appear as two sibling nodes in the syntax tree. |
@3cp thanks for the note, yes, the link to Estree is much more useful than the TypeScript image. |
It will be great to replace the TypeScript parser that I used in this plugin with Meriyah, which is much faster! |
I cannot guarantee a time frame for this feature as I don't have enough bandwidth on open source projects right now. But I will put it on my TODO list :) |
Bun has a native parser. Maybe you can talk to them to expose some APIs. It's probably not in extree syntax, but nothing beats Bun's performance.
|
Yes, I have discussed it several times on discord but I really don't know if they have plans to do it in the short term. Maybe @Jarred-Sumner can confirm |
WithStatement
for import attributesImportAttribute
for import attributes (stage 3 Estree)
@3cp Is there any news on this? 😊 if I can help in contributing I am open although I am not familiar with it. |
Sorry I have not put on any effort. You are more than welcome to try. |
Now that runtimes like Bun supports macros and the proposal is in stage 3 it would be nice to support import attributes.
https://github.com/tc39/proposal-import-attributes
Example in TypeScript:
The text was updated successfully, but these errors were encountered: