Esprima has an old bug that makes it put the CatchClause node in a handlers field on the TryStatement node, whereas the official Mozilla Parser API defines it as a handler property -- which acorn does just fine.
This makes 6to5 unable to print try/catch statements generated by regenerator. To reproduce:
$ 6to5 --include-regenerator
function *x() {}
Observe the regenerator runtime stripped out from all it's catch clauses.
cc @benjamn maybe this can be fixed in ast-types
Esprima has an old bug that makes it put the
CatchClausenode in ahandlersfield on the TryStatement node, whereas the official Mozilla Parser API defines it as ahandlerproperty -- which acorn does just fine.This makes 6to5 unable to print try/catch statements generated by regenerator. To reproduce:
Observe the regenerator runtime stripped out from all it's catch clauses.
cc @benjamn maybe this can be fixed in ast-types