Skip to content
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

Fix parser translator ast for heredoc with written newlines #3347

Merged

Conversation

Earlopain
Copy link
Contributor

@Earlopain Earlopain commented Dec 26, 2024

Heredocs don't don't start a new string node when encountering "\\n".

Builds on top of #3343, but only because the tokens would otherwise not line up. It's otherwise totally standalone. Will actually fix rubocop/rubocop#12878

@Earlopain Earlopain force-pushed the parser-translator-heredoc-newline-ast branch 2 times, most recently from e58606d to b2cd191 Compare December 30, 2024 15:30
@kddnewton
Copy link
Collaborator

@Earlopain just to see this working as expected, would you mind rebasing this branch now that the other stuff is merged?

Heredocs that contain "\\n" don't start a new string node.
@Earlopain Earlopain force-pushed the parser-translator-heredoc-newline-ast branch from b2cd191 to 61d9d3a Compare January 3, 2025 18:14
@Earlopain
Copy link
Contributor Author

Happy new year to you! Thanks for taking a look at the other PRs.

Apologies for the scope and mishmash of things in those, I was largely working through tests and just seeing what they need to pass. Looks like this one is still good to go

@kddnewton kddnewton merged commit 7372725 into ruby:main Jan 5, 2025
56 checks passed
@Earlopain Earlopain deleted the parser-translator-heredoc-newline-ast branch January 5, 2025 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False Positive for Lint/ImplicitStringConcatenation with prism
2 participants