parseTree - Option to keep comments #28
Labels
feature-request
Request for new features or functionality
help wanted
Issues identified as good community contribution opportunities
Milestone
Thanks for this library! I wrote a jsonc code formatter using it.
Right now I'm using the scanner to get the comments around the nodes in the tree. It would be slightly faster to not rescan these out and instead get all the comments when calling
parseTree
.A simple solution would may be to have an option that returns all the comments in an array. Maybe something like...
Goes to:
Then:
Goes to:
Thoughts? I could submit a PR for this, but will just need some direction on how the public API should look.
The text was updated successfully, but these errors were encountered: