tree-sitter/spec/runtime/languages/json/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

40 lines
931 B
Text

==========================================
recovers from top-level errors
==========================================
[}
---
(ERROR '}')
==========================================
recovers from unexpected tokens
==========================================
barf
---
(ERROR 'b')
==========================================
recovers from errors inside arrays
==========================================
[1, , 2]
---
(array
(number)
(ERROR ',')
(number))
==========================================
recovers from errors inside objects
==========================================
{ "key1": 1, oops }
---
(object (string) (number) (ERROR 'o'))
==========================================
recovers from errors inside nested objects
==========================================
{ "key1": { "key2": 1, 2 }, [, "key3": 3 }
---
(object
(string) (object (string) (number) (ERROR '2'))
(ERROR '[')
(string) (value (number)))