Skip to content

Review/pr 129 - #132

Merged
leonidaz merged 6 commits into
mainfrom
review/pr-129
Sep 17, 2026
Merged

leonidaz merged 6 commits into
mainfrom
review/pr-129

Conversation

@leonidaz

@leonidaz leonidaz commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

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 satisfies and postfix ! non-null assertions, with corpus tests for JSX, templates, assignments, and operator precedence.

The grammar adds satisfies_expression and non_null_expression, wires them into expressions, statements, and JSX containers, and allows non_null_expression as an assignment/augmented-assignment LHS. Precedence is updated with a new EQUALITY tier (equality vs relational) and shifted levels so postfix ! binds at member precedence and does not clash with unary !. highlights.scm scopes satisfies as a keyword and postfix ! as an operator. Generated grammar.json / node-types.json and a patch changeset for @tsrx/zed-plugin accompany the source grammar changes.

Reviewed by Cursor Bugbot for commit 24a6a09. Bugbot is set up for automated code reviews on this repo. Configure here.

sin-ack and others added 4 commits September 17, 2026 15:56
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.
@vercel

vercel Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
tsrx-website Ready Ready Preview Sep 17, 2026 6:43pm UTC
tsrx-website-mcp Ready Ready Preview Sep 17, 2026 6:43pm UTC

Request Review

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

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.

Comment thread grammars/tree-sitter/grammar.js Resolved

This branch was successfully deployed

2 active deployments
Preview – tsrx-website — 24a6a094 Deployed Sep 17, 2026 by vercel[bot]
Preview – tsrx-website-mcp — 24a6a094 Deployed Sep 17, 2026 by vercel[bot]
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.

2 participants