-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Added empty CloseDelim to tokens for future use. #34924
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nrc (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@@ -48,6 +48,8 @@ pub enum DelimToken { | |||
Bracket, | |||
/// A curly brace: `{` or `}` | |||
Brace, | |||
/// An empty delimiter | |||
Empty, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bikeshed: I don't think Empty
is quite right for the name or description. Suggests to me that there is some kind of container which has nothing in it. I'd prefer something like Implicit
or None
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a side note, if you wanted to do some refactoring, I'd love to rename DelimToken
to Delimiter
and stop importing the variants and instead use, e.g., Delimter::Brace
rather than token::Brace
throughout the codebase. (To be clear, not in this PR though)
Tests failing and some comments inline, otherwise looks good. |
@bors: r+ |
📌 Commit 536c315 has been approved by |
⌛ Testing commit 536c315 with merge ea1ceb2... |
💔 Test failed - auto-linux-64-cargotest |
@bors: retry On Wed, Jul 20, 2016 at 5:55 PM, bors notifications@github.com wrote:
|
⌛ Testing commit 536c315 with merge 6ddcbbf... |
💔 Test failed - auto-win-msvc-64-opt-mir |
@bors: retry sorry for the number of retries... On Thu, Jul 21, 2016 at 12:33 PM, bors notifications@github.com wrote:
|
@alexcrichton It's unclear if Bors ever tried again. |
Ah it's just farther back in the queue |
Added empty CloseDelim to tokens for future use. Description says it all. I added a new DelimToken type, Empty, to indicate a Delimited tokenstream with no actual delimiters (which are variously useful for constructing macro output). r? @nrc
Description says it all. I added a new DelimToken type, Empty, to indicate a Delimited tokenstream with no actual delimiters (which are variously useful for constructing macro output).
r? @nrc