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

Line and block comments. #512

Merged
merged 1 commit into from
Jul 2, 2021
Merged

Conversation

alan-signal
Copy link
Contributor

@alan-signal alan-signal commented Jul 1, 2021

Closes #511

Closes #365 ('#' prefixed comments)

I kept the comment removal as a separate module so that the tests can be scoped to just removing commented parts of a string. There only needed to be a few documentation tests to show the macro was working as intended.

I decided to do /* */ style comments too because it was not much more work, but I can remove those states from the machine easily enough if you really do not want them.

Copy link
Member

@tarcieri tarcieri left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@newpavlov any thoughts?

@tarcieri tarcieri requested a review from newpavlov July 1, 2021 16:08
Copy link
Member

@newpavlov newpavlov left a comment

Choose a reason for hiding this comment

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

Thank you, looks great!

@newpavlov newpavlov merged commit aee72b8 into RustCrypto:master Jul 2, 2021
@mcr
Copy link

mcr commented Jul 4, 2021

I guess that I will send a pull requests against this to accept # as a line comment.

@newpavlov
Copy link
Member

I am not sure that we want to support both # and // for line comments. As I wrote in #365 I think it's worth to be consistent with Rust in this regard.

@mcr
Copy link

mcr commented Jul 4, 2021

Hi, so the point of importing hex with comments is so that one can import output from other things to use as unit test data.
If I have to edit things, even if I do that with a sed script, then writing unit test cases gets harder.

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.

Feature request, allow comments in hex-literal::hex macro
4 participants