estools / escodegen

ECMAScript code generator
BSD 2-Clause "Simplified" License
2.65k stars 335 forks source link

Fix #365 #437

Open lucivpav opened 3 years ago

lucivpav commented 3 years ago

Fixes issue #365 (maybe more).

Changes:

Fixes wrong code generation when using comments in return, throw and arrow function expressions. add tests the trailing comments are still the same (incorrect placement), but they do not affect the syntax (can be addressed in a future PR) blank line preservation: seems no new problems with this

This PR is a continuation of PR #425

lucivpav commented 3 years ago

@Constellation can you please review this, when you have time?

lucivpav commented 3 years ago

CI is failing on master too

lucivpav commented 3 years ago

@michaelficarra could you please take a look at this PR?