Skip to content

Conversation

@nobodywasishere
Copy link
Member

Predicates need to be implemented manually by the bindings as part of using the query cursor. This is one (basic) implementation that works, but it would be ideal if there was a better approach we could take that would be more general and cleaner. Open to suggestions and feedback.

@nobodywasishere nobodywasishere force-pushed the nobody/predicate-support branch from 5bb9efe to 8500d96 Compare January 21, 2025 22:31
) : Bool
unsafe_steps = LibTreeSitter.ts_query_predicates_for_pattern(
query,
capture.capture_index,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is supposed to be pattern_index, not capture_index

This can and should be done in a cleaner way.
@nobodywasishere nobodywasishere force-pushed the nobody/predicate-support branch from 8500d96 to 4de4b2b Compare January 23, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants