Skip to content

Conversation

@juleswritescode
Copy link
Collaborator

@juleswritescode juleswritescode commented Nov 2, 2025

  • introduced a new scope_tracker that makes context tracking easier and will allow us to discard context when we enter subqueries.
  • ctx.node_under_cursor does not need to be an Option; we should always have a tree.root_node
  • deleted a couple of obsolete helper methods on the TreesitterContext

Next up, I'll make sure we open new scopes for CTEs, subqueries etc.
Also, I think the whole WrappingClause and WrappingNodes are unnecessary indirections – we can just as easily check the tree-sitter node kind &strs.

@juleswritescode juleswritescode changed the title refactor: improve & simplify tree-sitter context-tracking [3] refactor: improve & simplify tree-sitter context-tracking Nov 2, 2025
.await;

// no completions in the values list!
assert_no_complete_results(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

deleted this for now; I think we should have completions in the values list, but making sure they are the right suggestions is another issue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

was unused since the latest revoke/grant parser refactors 👍🏻

Copy link
Collaborator

@psteinroe psteinroe left a comment

Choose a reason for hiding this comment

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

seems like the compiler book starts to show its influence :D

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