2/11: docs(grammar): add grammar guidelines#655
Merged
juleswritescode merged 4 commits intostacked/pr629-1-grammar-conflictsfrom Jan 25, 2026
Merged
Conversation
added 2 commits
January 24, 2026 13:14
…m/supabase-community/postgres_lsp into stacked/pr629-2-grammar-guidelines
…m/supabase-community/postgres_lsp into stacked/pr629-2-grammar-guidelines
psteinroe
approved these changes
Jan 25, 2026
Collaborator
psteinroe
left a comment
There was a problem hiding this comment.
Nice! I am quite confident Claude can write a decent grammar if we point it to this doc and the pretty printer code.
|
|
||
| Now, if the user types `select email as e|`, the resulting looks like `keyword_select column_identifier keyword_as any_identifier(@end)`, and the select statement is prematurely considered completed. | ||
|
|
||
| However, we could hypothetically make the `$.table_reference` a private `$._table_reference` and put an `"end"` node in there. The clause would still complete at the right spot. |
Collaborator
There was a problem hiding this comment.
Maybe a note about what private vs public fields actually are?
Collaborator
Author
There was a problem hiding this comment.
I think that should be well-known; it's one of the standard tree-sitter syntaxes: https://tree-sitter.github.io/tree-sitter/creating-parsers/3-writing-the-grammar.html#hiding-rules
2506ecd
into
stacked/pr629-1-grammar-conflicts
8 checks passed
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
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.
Summary
@endmarkersPart of stacked PRs for #629
This is PR 2/11 in the keyword completion feature stack.