matthewrobb / six

JavaScript you can bet on. [WARNING]: Progress has been suspended on this project most likely indefinitely
MIT License
227 stars 9 forks source link

Spread #10

Open matthewrobb opened 12 years ago

matthewrobb commented 12 years ago

http://wiki.ecmascript.org/doku.php?id=harmony:spread

insidewhy commented 12 years ago

Hey my spread support change has landed on the harmony branch!

Could you release a new version of esprima-six that includes it? Then I can prepare a pull request that uses it and adds spread support.

Thanks! Don't rush I know you're busy :) I'll push the package esprima-six-jpike while I'm waiting to test.

matthewrobb commented 12 years ago

Done. Published to NPM.

insidewhy commented 12 years ago

That message appeared whilst I was looking at it... Cool thanks!

matthewrobb commented 12 years ago

Not a problem. I am going to be going ahead of my family to the Seattle area to start a new job and find us a home. In my off time I imagine I will be putting in a lot of time to this project. I am already gearing for that. We should chat some time about road map etc.

insidewhy commented 12 years ago

Cool, I'm working on a parser at the moment using my own parsing system based on PEGs. It allows creating a parser that constructs an AST from a single grammar.

I didn't wanna write it in pure JavaScript though that's why I thought using six would be more fun. I just thought it would be fun to add in all the bits I wanted to use that weren't already present.

matthewrobb commented 12 years ago

Awesome! Your contributions are definitely appreciated. My plan is to get some of the key features roughly implemented and then switch to focusing on the website ( sixlang.org ), documentation, and general community outreach.

insidewhy commented 12 years ago

Oh I wonder, would you mind if I switched the test system to being in six rather than js?

Since my change to add support for ".six" file extension you can do it with:

mocha --compilers six:six

matthewrobb commented 12 years ago

Yeah sounds great. I didn't put any time in to developing a long term testing solution and I'd definitely like to get to that point. Ideally the test suite would be a generic enough suite that it's able to validate functional harmony code.

insidewhy commented 11 years ago

I think I meant rest parameters rather than spreads in my first comment. Oops. Anyway, spread support is now on the esprima harmony branch!

insidewhy commented 11 years ago

Doah, no it isn't. Just fixed spread parameters for arrow functions. Sorry I'm really high.

matthewrobb commented 11 years ago

I think you mean Rest parameters on this one. Spread is an operator not normally used in parameters unless used in destructuring parameters.

// Rest
function(...rest){}

// Spread
var arr = [1,2,3, ...rest]