-
Notifications
You must be signed in to change notification settings - Fork 174
Remove Prism.lex_ripper
#3871
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
base: main
Are you sure you want to change the base?
Remove Prism.lex_ripper
#3871
Conversation
4a23307 to
1ba9b44
Compare
1ba9b44 to
f18b658
Compare
kddnewton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove this API entirely instead of deprecating, I can't imagine anyone is using it.
I think I'd like us to support the splitting though, unless it's super difficult.
|
We need splitting for escaped newlines in heredocs anyway. |
I did a codesearch and didn't find anyone using it. Let's remove 👍
Do you mean for If you insist I try to implement it but the value of doing that seems very low to me. Doing it correctly is a bit complex since it depends on where the string appears. Quoted heredocs for example don't allow interpolation so ripper does the correct thing there and that doesn't just apply do dash heredocs. |
|
Nah that's okay I don't insist :) |
|
But let's do remove lex_ripper |
Since `on_sp` is emitted, it doesn't do a whole lot anymore. This leaves one incompatibility for code like `"x#$%"` Ripper confuses this for bare interpolation with a global, but `$%` is not a valid global name. Still, it emits two string tokens in such a case. It doesn't make sense for prism to work around this bug, so the affected files are added as excludes. Since the only usage of this method makes sense for testing in prism itself, the method is removed instead of deprecated.
f18b658 to
31be379
Compare
Since
on_spis emitted, it doesn't do a whole lot anymore.This leaves one incompatibility for code like
"x#$%"Ripper confuses this for bare interpolation with a global, but
$%is not a valid global name. Still,it emits two string tokens in such a case. It doesn't make sense for prism to work around this bug,
so the affected files are added as excludes.