Update ruby error recovery test to reflect grammar tweaks

This commit is contained in:
Max Brunsfeld 2020-11-03 10:28:17 -08:00
parent 281e75d74d
commit 4e86b76e8c
2 changed files with 9 additions and 1 deletions

8
test/fixtures/error_corpus/readme.md vendored Normal file
View file

@ -0,0 +1,8 @@
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.

View file

@ -14,6 +14,6 @@ c
method: (identifier)
(ERROR (heredoc_beginning))
arguments: (argument_list
(heredoc_body (heredoc_end))
(heredoc_body (heredoc_content) (heredoc_end))
(identifier)
(MISSING ")"))))