-
Notifications
You must be signed in to change notification settings - Fork 126
support protected identifiers #22
Comments
another problem is that apparently acorn doesn’t handle comments in function declarations or so…
raises unexpected in isn’t there better parsers than acorn? e.g. babylon? i guess the first comment is wrong code generation, but this comment is probably a parser not coded to spec… |
I’m also stumbled across this just now. The |
that should be handled in a special way anyway, since babel AFAIK started to translate it that way (with an explicit member “exports.default = ...“ instead of directly as “module.exports = ...” |
#16 fixes this – I've updated that branch in light of some more recent changes. @Victorystick if you get a chance to review it, should be good to merge? |
@flying-sheep that's... very odd. Acorn should parse that comment just fine. Are you able to reproduce that specific bug separately? |
I've released 2.1.0 with the fix. @flying-sheep I don't know if that parser error deserves a separate issue or if rollup/rollup#296 (comment) covers it? Either way I'll close this as it's unrelated to the reserved identifiers thing |
as it’s perfectly reasonable to do
exports.default = foo
, yet the transformed syntax is the illegalexport var default = connect.default
probably coincides with #10, as the project in question was react-redux, which seems to be compiled with babel
The text was updated successfully, but these errors were encountered: