Skip to content

Introduce new node SyntaxTree::HeredocEnd #95

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

Merged
merged 2 commits into from
Jun 10, 2022

Conversation

wildmaples
Copy link
Contributor

Why

As I mentioned on Slack, currently we only have access to SyntaxTree::HeredocBeg which only gives us the opening HEREDOC delimiter. The closing delimiter is only provided as a String in SyntaxTree::Heredoc. Having a SyntaxTree::HeredocEnd node for the closing delimiter's location would be helpful.

Then, we won't have to do the calculations ourselves and seems more consistent with the existence of HeredocBeg.

Changes

I followed the way HeredocBeg was implemented and added tests.

@wildmaples wildmaples force-pushed the heredoc-end branch 2 times, most recently from 1a8b06f to 29ef274 Compare June 10, 2022 15:21
@wildmaples
Copy link
Contributor Author

Fixed the changes we discussed: remove the adding of HeredocEnd onto the heredoc array because it's part of Heredoc already.

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.

2 participants