Skip to content

feat(tree-sitter): add satisfies and non-null assertion expressions - #129

Closed
sin-ack wants to merge 2 commits into
tsrx-org:mainfrom
sin-ack:tree-sitter-satisfies-nonnull-assert
Closed

sin-ack wants to merge 2 commits into
tsrx-org:mainfrom
sin-ack:tree-sitter-satisfies-nonnull-assert

Conversation

@sin-ack

@sin-ack sin-ack commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

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.

This PR also includes a fix for error recovery when template strings are present later in the file.

AI Disclosure

I used GPT-6 Astra to generate the fix. I wrote the commit descriptions myself. I verified that every commit passes pnpm build && pnpm test.

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

@sin-ack is attempting to deploy a commit to the Ripple Team Team on Vercel.

A member of the Team first needs to authorize it.

@leonidaz

Copy link
Copy Markdown
Contributor

I couldn't push to your branch as you didn't give us the permission "Allow edits from maintainers" (please add it next time)

Created a new pr #132 - your commits were copied.

@leonidaz leonidaz closed this Sep 17, 2026
@leonidaz

Copy link
Copy Markdown
Contributor

Merged #132, thank you!

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