tree-sitter/test/fixtures/error_corpus
2022-06-24 19:07:40 -07:00
..
c_errors.txt Retain information about the lexer's lookahead for the token where an error was detected 2022-02-22 09:45:26 -08: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 code paths that still conflated null characters with EOF 2019-12-06 15:29:03 -08:00
python_errors.txt Add more python error recovery tests 2022-06-24 19:07:40 -07:00
readme.md Update ruby error recovery test to reflect grammar tweaks 2020-11-03 10:28:17 -08:00
ruby_errors.txt Update unit tests to expect ruby grammar change 2020-12-20 19:34:45 -08: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.