Justin Ridgewell de1431e8c6 Replace arrow expression body with block statement
Original PR: https://github.com/babel/babel/pull/2469. Seems this got
lost in the v6 changes.

- - -

Without this, the only way to replace the arrow function is to either
manually override its `node.body`, or duplicate the arrow:

```js
// Old
ArrowFunctionExpression: function (node) {
  node.body = t.blockStatement(...);
  // Or
  return t.ArrowFunctionExpression(
    node.params,
    t.blockStatement(...),
    node.async
  );
}

// New
ArrowFunctionExpression: function() {
  this.get("body").replaceWith(t.blockStatement(...));
}
```
2016-02-20 04:36:40 -05:00
2016-02-04 11:07:04 -05:00
2015-11-09 17:58:36 -08:00
2015-07-16 15:46:31 +01:00
2016-02-12 11:51:53 -05:00
2015-11-09 04:03:59 -08:00
2014-12-16 22:17:35 -08:00
2016-02-12 17:24:25 +05:30
2016-01-04 22:59:12 -05:00
2016-02-17 05:22:53 +00:00
2015-11-11 23:24:39 -08:00
2016-02-17 05:34:41 +00:00
2015-12-30 13:42:32 -05:00
2016-02-12 11:29:58 -05:00

babel

The compiler for writing next generation JavaScript.

Travis Status CircleCI Status Coverage Status

Looking for support?

For questions and support please visit the discussion forum, Slack community, or StackOverflow.

Want to report a bug or request a feature?

Bugs and feature requests should be posted at phabricator.babeljs.io.

Want to report an issue with babeljs.io?

For documentation and website issues please visit the babel.github.io repo.

Description
No description provided
Readme 79 MiB
Languages
JavaScript 99.5%
Makefile 0.3%
HTML 0.1%