You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And then it's used in appropriate choice() rules (aka | in EBNF notation) to fail fast and introduce error nodes earlier, thus improving the resulting CST. That said, this approach doesn't (yet) create actual ERROR nodes that Tree-sitter produces on errors, but merely aliases the nodes to $.ERROR. In practice, that's close enough.
P.S.:
// Some other useful regexesconstWHITE_SPACE=/[ \t\f\v]/;constANYTHING=/[^\r\n]+/;constANYTHING_STARTING_NON_WHITESPACE=/\S[^\r\n]*/;
The text was updated successfully, but these errors were encountered:
See: tree-sitter-grammars/tree-sitter-readline@e436eae#diff-919ac210accac9ecc55a76d10a7590e3d85ca3f0e165b52d30f08faee486d0cb
The code at the link above adds the following node alias:
And then it's used in appropriate
choice()
rules (aka|
in EBNF notation) to fail fast and introduce error nodes earlier, thus improving the resulting CST. That said, this approach doesn't (yet) create actual ERROR nodes that Tree-sitter produces on errors, but merely aliases the nodes to$.ERROR
. In practice, that's close enough.P.S.:
The text was updated successfully, but these errors were encountered: