Skip to content
This repository has been archived by the owner on Jun 12, 2020. It is now read-only.

feat: support object rest properties #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dariocravero
Copy link
Contributor

No description provided.

@nhunzaker
Copy link

nhunzaker commented Jul 8, 2016

Total spectator, but 👍. I was just about to dig into this myself to iron out my final speed-bumb moving from Babel to Bublé. I'd love to see this ship!

@fatfisz
Copy link

fatfisz commented Jul 31, 2016

@dariocravero Hey, when will you be able to land this? Could I help with that if you don't have time right now?

@dariocravero
Copy link
Contributor Author

Hey @fatfisz, thanks for proposing to help :) (@nhunzaker I totally missed your comments, thanks :)) .

I think it's almost ok to go. I can't remember well but I think it's missing a few tests, I was bringing them over from babylon's.

A couple of things to note:

  • because this is meant to work with acorn, this implementation differs a bit from babylon's as it doesn't replace the Property token with ObjectProperty and ObjectMethod.
  • the test runner is a bit odd (it was brought over from some other acorn plugin), while it works ok, it could be greatly simplified making it easier to follow, e.g. using fixtures, may do that at some point but there are more relevant things to tackle now. Here's where the ast gets produced in the tests (it may help debugging) :).

If you could try to add the remaining tests and see what happens then, that would be amazing!
The objective of this extension was to have bublé support rest properties, you can check that out here. The parser needs to be ready for that to work though.

Thanks again,
Darío

@adrianheine
Copy link
Member

I implemented rest properties in my fork.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants