sweet-js / sweet-core

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

make helpers available in the browser #669

Closed disnet closed 7 years ago

disnet commented 7 years ago

We need to extend the browser loader to allow the editor to import the helper library. ie this needs to work:

import { isIdentifier} from 'sweet.js/helpers' for syntax;

syntax m = ctx => {
  if (isIdentifer(ctx.next().value)) {
    return #`true`;
  }
  return #`false`;
}
gabejohnson commented 7 years ago

Fixed by #671