Open erikd opened 6 years ago
const
was already supported and let
as added in PR #72.
Support for the spread operator was added in #73.
Arrow expressions were added in #74.
@erikd would it be ok to work on import and export individually? I spotted the work was done in the original big PR. Just don't want to do it if you are already working on it 😄
Absolutely fine.
Unfortunately, I have not done much more than merge patches for some time.
I'd like to pick up where @Cmdv left off on import
parsing.
Also missing, it seems:
{x,y,}
x => 42
export function f() {}
(looks like export const f = () => undefined
works)Support for unparenthesized single-argument arrow functions was added in https://github.com/erikd/language-javascript/pull/90 and export for function declarations in https://github.com/erikd/language-javascript/pull/88.
const [a, b] = f();
is not supported. It should be easy to just change the VariableDeclaration
case to allow ArrayLiteral
edit: I updated to the last checkout and I think it is now supported.
I knocked off a bunch of the outstanding ES7 items in some work that's now released in 0.6.0.14:
const [a, b] = f()
(#96){[a + b]: c}
(#99)yield
(#105)class
, extends
, static
, and super
(#108)Hi all, I'd like to contribute some work here, but I'm unfamiliar with the !
syntax in the AST module: https://github.com/erikd/language-javascript/blob/38e48dd49ccea05675515e8323c0e0035ff97bea/src/Language/JavaScript/Parser/AST.hs#L55
Can someone please refer me to an article/explanation?
Thanks in advance!
Its a strictness annotation. See eg: https://wiki.haskell.org/Performance/Strictness
Any reason to stop at ES7? I'm personally missing ??
and ?.
This implements features for es 6 & 7.
Each of these should be implemented in a separate PR and each item needs tests. There are likely to be three tests needed, one for the appropriate
XParser.hs
test and one in each ifMinify.hs
andRoundTrip.hs
.