-
Notifications
You must be signed in to change notification settings - Fork 107
[2] refactor: use more specific tree-sitter references and identifiers #579
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
Merged
juleswritescode
merged 62 commits into
refactor/node-identification-tuples
from
refactor/object-reference
Nov 7, 2025
Merged
[2] refactor: use more specific tree-sitter references and identifiers #579
juleswritescode
merged 62 commits into
refactor/node-identification-tuples
from
refactor/object-reference
Nov 7, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…_lsp into refactor/revoke_parser
a little bit of support ok
Base automatically changed from
refactor/identifier-qualifiers
to
refactor/node-identification-tuples
November 2, 2025 07:46
psteinroe
approved these changes
Nov 3, 2025
7da2494
into
refactor/node-identification-tuples
8 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
role_identifier,table_identifierand so onobject_reference, e.g.table_referenceorfunction_reference.tree-sitterqueries to use themNotice that we can only use precise leaf-identifiers if we have a fully qualified
*_reference:In an incomplete statement, if a user writes
select us| from some_table;, theuscould be either a schema, a table, an alias, or a column. The user is still writing the query; we don't know what he'll type next!Even if he writes
select something.us|,somethingmight refer to a table, alias or schema;usmight refer to a table or column.Only when he writes
select something.users.emaildo we know which part is a schema, which a table, and which a column.The tags on the
*_referenceshould help us decide which data types to consider for completion/hover.In the next PRs, I want to store relevant parent nodes and field names. Right now, we're traversing the tree alot, for example to find out if a node has a certain tag or if the ancestory history matches a template. We can make this easier and faster by collecting the traversed nodes/fields in some kind of data structure and checking against that.