Skip to content

Regenerator esprima generated ast discrepancy  #473

@amasad

Description

@amasad

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    outdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions