Skip to content
New issue

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

KQL: Add pseudo-matchers (aka pseudo-classes) #373

Open
zkat opened this issue Feb 12, 2024 · 0 comments
Open

KQL: Add pseudo-matchers (aka pseudo-classes) #373

zkat opened this issue Feb 12, 2024 · 0 comments
Labels
breaking This can only be done for the next major version of KDL enhancement New feature or request

Comments

@zkat
Copy link
Member

zkat commented Feb 12, 2024

We should add support for pseudo-matchers that we can extend KQL with going forward. We can use the reserved # for the matcher keywords, so:

// select all `foo` nodes that do _not_ have a value.
foo#not([val()])

You can also chain them:

// Select all foo nodes without a value but only if they are the first children.
foo#not([val()])#first-child

We can then add support for tree-structural pseudo-matchers and functional pseudo-matchers.

This will of course increase implementation burden, but it'll also make KQL much more useful (and familiar).

@zkat zkat added enhancement New feature or request breaking This can only be done for the next major version of KDL labels Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This can only be done for the next major version of KDL enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant