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

(cherry picked from commit b7f36a13ba)
This commit is contained in:
Amaan Qureshi 2025-08-28 14:47:20 -04:00 committed by Christian Clason
parent 1083795af6
commit 22fa144016
4 changed files with 47 additions and 2 deletions

View file

@ -0,0 +1,9 @@
======================
A simple error literal
======================
ERROR
---
(document)

View file

@ -0,0 +1,6 @@
module.exports = grammar({
name: 'anonymous_error',
rules: {
document: $ => repeat(choice('ok', 'ERROR')),
}
});