esquery
esquery copied to clipboard
Add support for comment matching
Comments in the AST are stored separately (if at all). They will have to be associated with the nodes somehow, perhaps range would work. The use case is for things like overriding rules in esquery or searching for the doc of a particular statement.
New versions of estraverse expose an attachComments function that attaches the comments to the nodes with which they're most likely associated.