tree-sitter/test/fixtures/error_corpus
2023-07-15 20:07:46 -04:00
..
c_errors.txt test: update C tests from upstream 2023-07-15 20:07:46 -04:00
javascript_errors.txt Update JS error recovery test to reflect grammar change 2020-12-03 10:09:58 -08:00
json_errors.txt Fix tests, adapt to tree-sitter-json 40a81c01a40ac48744e0c8ccabbaba1920441199 2023-04-22 12:08:50 +03:00
python_errors.txt fix: update tests from python grammar changes 2023-07-10 14:40:18 -04:00
readme.md Update ruby error recovery test to reflect grammar tweaks 2020-11-03 10:28:17 -08:00
ruby_errors.txt Tweak ruby error test to reflect slightly different recovery 2023-06-12 13:45:43 -07:00

The Error Corpus

This directory contains corpus tests that exercise error recovery in a variety of languages.

These corpus tests provide a simple way of asserting that error recoveries are "reasonable" in a variety of situations. But they are also somewhat overspecified. It isn't critical that error recovery behaves exactly as these tests specify, just that most of the syntax tree is preserved despite the error.

Sometimes these tests can start failing when changes are pushed to the parser repositories like tree-sitter-ruby, tree-sitter-javascript, etc. Usually, we just need to tweak the expected syntax tree.