jednano/codepainter

Breaks on ES6 code

Closed this issue · 6 comments

E.g. this file causes codepainter infer src/**/*.js to throw "Unexpected reserved word."

I imagine this could be fixed by switching to esprima-fb. Unfortunately it would also add JSX support.

Esprima does have experimental harmony support on this branch, but it won't be introduced into codepainter any time soon.

Actually, there has been some discussion about a Concrete Syntax Tree that I'm following closely that should be a good replacement for Esprima, but that's a long ways out.

We'll talk more when the ES6 draft is finalized.

That is a real shame, as it makes CodePainter unusable for the large-and-growing population of people using transpiled ES6 in their code.

I guess the appropriate response is forking.

I made a harmony branch for you, if that makes it easier. This is what Esprima has done, so I figured I'd follow suit.

Awesome, thank you!

@domenic did this end up working for you?

Yeah, it works great, thank you!