Skip to content

.print add uneeded parenthsis even without modifications #1082

@dedesite

Description

@dedesite

The README states that :

The magic of Recast is that it reprints only those parts of the syntax tree that you modify. In other words, the following identity is guaranteed:

recast.print(recast.parse(source)).code === source

But I came with a code that do not guaranty the above statement : https://astexplorer.net/#/gist/e94f3e50e6148f56b57022fbf5f04f68/latest

I know it's not a big deal, but it could be fixed, it would be great 👍
Otherwise reapplying our code formatter at the end will do the tricks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions