We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Queries with subject indicators match more nodes than they should, and also match the same node multiple times. E.g.:
esquery(esprima.parse('foo = bar = baz'), '!AssignmentExpression > AssignmentExpression > Identifier');
...returns the following:
[ AssignmentExpression { type: 'AssignmentExpression', operator: '=', left: Identifier { type: 'Identifier', name: 'bar' }, right: Identifier { type: 'Identifier', name: 'baz' } }, AssignmentExpression { type: 'AssignmentExpression', operator: '=', left: Identifier { type: 'Identifier', name: 'foo' }, right: AssignmentExpression { type: 'AssignmentExpression', operator: '=', left: [Object], right: [Object] } }, AssignmentExpression { type: 'AssignmentExpression', operator: '=', left: Identifier { type: 'Identifier', name: 'bar' }, right: Identifier { type: 'Identifier', name: 'baz' } }, AssignmentExpression { type: 'AssignmentExpression', operator: '=', left: Identifier { type: 'Identifier', name: 'foo' }, right: AssignmentExpression { type: 'AssignmentExpression', operator: '=', left: [Object], right: [Object] } } ]
As far as I can tell, it should return only this:
[ AssignmentExpression { type: 'AssignmentExpression', operator: '=', left: Identifier { type: 'Identifier', name: 'foo' }, right: AssignmentExpression { type: 'AssignmentExpression', operator: '=', left: [Object], right: [Object] } } ]
The text was updated successfully, but these errors were encountered:
Fixes estools#60: reimplement subject indicators using :has selectors
7e94456
no-restricted-syntax
No branches or pull requests
Queries with subject indicators match more nodes than they should, and also match the same node multiple times. E.g.:
...returns the following:
As far as I can tell, it should return only this:
The text was updated successfully, but these errors were encountered: