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 lexing of line comments at EOF #1371

Merged
merged 12 commits into from Dec 9, 2019

Conversation

MaximeKjaer
Copy link
Contributor

This PR fixes Scala comments at EOF. See #797 for a previous instance of this problem.

@MaximeKjaer
Copy link
Contributor Author

Actually, there are a few other lexers with the same problem. I'll fix them too, while I'm at it, and rename the PR.

@MaximeKjaer MaximeKjaer changed the title Fix lexing of Scala comments at EOF Fix lexing of line comments at EOF Dec 7, 2019
@MaximeKjaer
Copy link
Contributor Author

MaximeKjaer commented Dec 7, 2019

Those are all the occurrences I found of the same mistake! All fixed, and I added visual tests and unit tests.

@pyrmont pyrmont self-assigned this Dec 8, 2019
@pyrmont pyrmont added the needs-review The PR needs to be reviewed label Dec 8, 2019
@pyrmont
Copy link
Contributor

pyrmont commented Dec 9, 2019

@MaximeKjaer Thank you so much for doing all this! I've know there were more of these lurking in the codebase for a while but just hadn't got around to cleaning them up. This PR is a real time saver!

I took the liberty of removing some of the extraneous regex operators that sometimes get thrown in (Ruby's regex engine will by default match to the end of the line so there's generally no need to explicitly mark that in the pattern, for instance). How does it look to you?

@pyrmont pyrmont added author-action The PR has been reviewed but action by the author is needed and removed needs-review The PR needs to be reviewed labels Dec 9, 2019
@MaximeKjaer
Copy link
Contributor Author

That looks good! It really simplifies things nicely 👍

@pyrmont pyrmont merged commit d0aa1d2 into rouge-ruby:master Dec 9, 2019
@pyrmont pyrmont removed the author-action The PR has been reviewed but action by the author is needed label Dec 9, 2019
@pyrmont
Copy link
Contributor

pyrmont commented Dec 9, 2019

Great! Thanks again for this! 🎉

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.

None yet

2 participants