-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prism::RipperCompat differences with Ripper #1972
Comments
FWIW
The message is different, but that's fine. I just need a message. |
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: - Add tests that exercise both Ripper and prism codepaths on CI - Handle ruby/prism#1972 in `ripper_errors.rb` - Update docs to not mention Ripper explicitly - Consider different/cleaner APIs for separating out Ripper and Prism
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: - Add tests that exercise both Ripper and prism codepaths on CI - Handle ruby/prism#1972 in `ripper_errors.rb` - Update docs to not mention Ripper explicitly - Consider different/cleaner APIs for separating out Ripper and Prism
I just pushed an update to Unfortunately ripper compat is not done, but the documentation didn't say that. So it says that now. On the otherhand, I made it so that it reports errors in the same way as ripper, so that itself is done now. It also won't error on missing node implementations now, it will just skip them. Not great, but much better. I'm going to close this for now since the actual bug you reported has been fixed. |
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 ruby/prism#1972 in `ripper_errors.rb` - Update docs to not mention Ripper explicitly - Consider different/cleaner APIs for separating out Ripper and Prism
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 ruby/prism#1972 in `ripper_errors.rb` - Update docs to not mention Ripper explicitly - Consider different/cleaner APIs for separating out Ripper and Prism
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 ruby/prism#1972 in `ripper_errors.rb` - Update docs to not mention Ripper explicitly - Consider different/cleaner APIs for separating out Ripper and Prism
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 ruby/prism#1972 in `ripper_errors.rb` - Update docs to not mention Ripper explicitly - Consider different/cleaner APIs for separating out Ripper and Prism
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 ruby/prism#1972 in `ripper_errors.rb` - Update docs to not mention Ripper explicitly - Consider different/cleaner APIs for separating out Ripper and Prism
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 ruby/prism#1972 in `ripper_errors.rb` - Update docs to not mention Ripper explicitly - Consider different/cleaner APIs for separating out Ripper and Prism ruby/syntax_suggest@a7d6991cc4
I found that
Ripper
andPrism::RipperCompat
produced different results on this invalid ruby code%Q* lol
. This is using%Q
to define a string and then declaring it will use the*
character to end the string. It's invalid because it is missing a second*
like%Q* lol*
.Reproduction
Define subclasses:
Expected
I would expect that the output of these two are the same
Actual
Ripper reports an error but prism does not:
It's also worth noting that Ripper can parse the valid code but prism cannot:
This is with prism
0.18.0
and Ruby 3.1.4 (also tested with 3.2.2, same result).The text was updated successfully, but these errors were encountered: