Repository navigation
Review/pr 129 - #132
Merged
Merged
Review/pr 129#132
Conversation
Prevent the external scanner from scanning template-string content
during error recovery. Tree-sitter enables all external tokens in
recovery states, but template content and automatic semicolons are never
simultaneously valid during normal parsing.
Previously, a syntax error could cause the template scanner to consume
subsequent declarations until an unrelated `${` or backtick. For
example, a non-null assertion or `satisfies` expression followed by JSX
containing the literal string '${a}' could absorb the following
component into a large ERROR node, breaking highlighting and navigation.
These are present in the Solid v2 TSRX template but are not supported by the grammar, so editors using the tree-sitter grammar for syntax highlighting would leave them unhighlighted.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue. You can view the agent here.
Reviewed by Cursor Bugbot for commit 14109fd. Configure here.
Merged
This was referenced Sep 25, 2026
This branch was successfully deployed
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.

Note
Medium Risk
Broad precedence retuning and new expression forms can shift parse trees for edge-case TypeScript; impact is limited to parsing/highlighting, not runtime behavior.
Overview
Extends the Tree-sitter grammar and Zed highlighting for TypeScript
satisfiesand postfix!non-null assertions, with corpus tests for JSX, templates, assignments, and operator precedence.The grammar adds
satisfies_expressionandnon_null_expression, wires them into expressions, statements, and JSX containers, and allowsnon_null_expressionas an assignment/augmented-assignment LHS. Precedence is updated with a newEQUALITYtier (equality vs relational) and shifted levels so postfix!binds at member precedence and does not clash with unary!.highlights.scmscopessatisfiesas a keyword and postfix!as an operator. Generatedgrammar.json/node-types.jsonand a patch changeset for@tsrx/zed-pluginaccompany the source grammar changes.Reviewed by Cursor Bugbot for commit 24a6a09. Bugbot is set up for automated code reviews on this repo. Configure here.