RESSA icon indicating copy to clipboard operation
RESSA copied to clipboard

Unsupported export syntax

Open Fee0 opened this issue 2 years ago • 5 comments

Following syntax seems to be not supported:

export * as A from "M";

Tested on source location branch

Fee0 avatar Nov 24 '22 14:11 Fee0

Thank you for the bug report!

FreeMasen avatar Nov 24 '22 15:11 FreeMasen

Is this something you would be interested in fixing?

FreeMasen avatar Nov 24 '22 19:11 FreeMasen

This bug will most likely require a change to resast since the ModExportSpecifier::All doesn't have the ability to handle the identifier.

Alternatively the method parse_all_export could return a ModExportSpecifier::Named in this case, which I believe would avoid a version bump for the breaking change but I don't really love having the ExportSpecifier::local property be an Ident with "*" as the value which is technically not a valid identifier.

We could push the later into 0.8.1 and slate the former for a 0.9.0 update

FreeMasen avatar Nov 24 '22 20:11 FreeMasen

For reference, I have created https://github.com/rusty-ecma/resast/pull/7

FreeMasen avatar Nov 24 '22 22:11 FreeMasen

I would prefer the AST to be in clean state with all identifier really being identifier. I can take a look when time permits but at the moment it's not a priority for me.

Fee0 avatar Nov 25 '22 08:11 Fee0