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
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

@juleswritescode juleswritescode merged commit 646b884 into refactor/object-reference Nov 7, 2025
8 checks passed
@juleswritescode juleswritescode deleted the refactor/context-tracking branch November 7, 2025 10:14
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