Commit graph

3 commits

Author SHA1 Message Date
Schneems
82883dc8f2 [ruby/syntax_suggest] Change assertion to not rely on exact text from prism
The original ripper test was very stable as the output didn't change. Prism is under active development and changing their output shouldn't cause a failure to the ruby/ruby test suite like 1933994031.

This commit moves from checking exact output to asserting that the string we get back is not empty. This should give the same level of confidence that some error message was caught, and is less brittle.

4b6abb763e
2023-12-05 18:25:42 +00:00
Schneems
cce29750d7 [ruby/syntax_suggest] Initial support for the prism parser
Prism will be the parser in Ruby 3.3. We need to support 3.0+ so we will have to "dual boot" both parsers.

Todo:

- LexAll to support Prism lex output
- Add tests that exercise both Ripper and prism codepaths on CI
- Handle https://github.com/ruby/prism/issues/1972 in `ripper_errors.rb`
- Update docs to not mention Ripper explicitly
- Consider different/cleaner APIs for separating out Ripper and Prism

a7d6991cc4
2023-12-05 17:51:27 +00:00
Hiroshi SHIBATA
0d9f4ea0d4 Import spec examples from ruby/syntax_suggest 2022-08-26 12:15:47 +09:00