tree-sitter/spec/runtime/languages/arithmetic/errors.txt
Max Brunsfeld 5cd07648fd Remove the separator characters construct
Now, grammars can handle whitespace by making it another ubiquitous
token, like comments.

For now, this has the side effect of whitespace being included in the
tree that precedes it. This was already an issue for other ubiquitous
tokens though, so it needs to be fixed anyway.
2014-09-01 20:19:43 -07:00

15 lines
469 B
Text

=====================================================
recovers from errors at the top level
=====================================================
x * * y
---
(expression (variable)) (ERROR '*')
=====================================================
recovers from errors inside parenthesized expressions
=====================================================
x + (y * + z) * 5
---
(sum
(expression (variable))
(product (group (ERROR '+')) (expression (number))))