-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(parser): fix wrong loc for BinaryExpression
closes #169
- Loading branch information
Showing
2 changed files
with
183 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ab1ab37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe off topic. A few comments have wrong loc too and current comment code isn't 100%. perfect.
Should we publish an alternative algo for getting the comments and loc?
Click on the pretty print demo with comments in this readme and you may understand what my point is.
https://github.com/kataw/kataw
ab1ab37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I proposed an alternative method because with current algorithm Prettier can't handle cases like this
let [,,,,,,,,,,,,,/1/,,,,,,,,,,,,,,,,,] = x;
This is the expected output