sweet-js / sweet-core

Sweeten your JavaScript.
https://www.sweetjs.org
BSD 2-Clause "Simplified" License
4.58k stars 208 forks source link

Semicolon swallowed at end of export declaration #726

Open gabejohnson opened 7 years ago

gabejohnson commented 7 years ago
...
export { Category };

Function[Category.id] = x => x;
Function implements Category;

results in:

SyntaxError: unknown: Unexpected token, expected ; (25:21)
  23 |   return klass_324;
  24 | }, configurable: false, writable: false, enumerable: false}});
> 25 | export {Category_315}Function[Category_315.id] = (x_334) => x_334;
     |                      ^
  26 | Category_315._mixin(Function);

It's not a blocker now that I can export the interfaces directly. Just reporting.

disnet commented 7 years ago

Looks like it's due to an old shift codegen bug: https://github.com/shapesecurity/shift-codegen-js/issues/33

More reason to update to the latest shift.