Skip to content

Trim whitespaces of oneline comments #189

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 5 commits into from
Nov 12, 2021

Conversation

TadeasKucera
Copy link
Contributor

@TadeasKucera TadeasKucera commented Nov 11, 2021

Solving #149. Please note the following properties of the solution:

  • Only one-line comments are stripped of trailing whitespaces, because when somebody prefers /* comment */ to /comment/ I do not intend to make them angry.
  • The comments are stripped during their construction, thus only once. I could have made it the other way, so that the comments would be stripped every time we print TokenStream, but we do not need to store the information about where were the whitespaces. Sorry for mentioning this if it is obvious.

Copy link
Member

@MatejKastak MatejKastak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Good job

@TadeasKucera TadeasKucera self-assigned this Nov 12, 2021
@TadeasKucera TadeasKucera merged commit 6e12078 into master Nov 12, 2021
@TadeasKucera TadeasKucera deleted the trim_whitespaces_of_oneline_comments branch November 12, 2021 08:36
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