Skip to content

fix(lib): check if an ERROR node is named before assuming it's the builtin error node#4744

Merged
amaanq merged 1 commit intotree-sitter:masterfrom
amaanq:anonymous-error
Aug 28, 2025
Merged

fix(lib): check if an ERROR node is named before assuming it's the builtin error node#4744
amaanq merged 1 commit intotree-sitter:masterfrom
amaanq:anonymous-error

Conversation

@amaanq
Copy link
Member

@amaanq amaanq commented Aug 28, 2025

Problem

Any node that is named "ERROR" will be assumed to be the built-in error node. This does not make sense for anonymous nodes, and causes issues when trying to query this node as seen in the cst grammar.

Solution

Only assume the "ERROR" node is the builtin error node if it is named and not anonymous

@clason clason added the ci:backport release-0.25 Backport label label Aug 28, 2025
@amaanq amaanq merged commit b7f36a1 into tree-sitter:master Aug 28, 2025
19 checks passed
@tree-sitter-ci-bot
Copy link

Successfully created backport PR for release-0.25:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Valid query patterns treated as (semi-)impossible

2 participants