Skip to content

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

Merged
merged 1 commit into from
Jul 22, 2016

Conversation

cgswords
Copy link
Contributor

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

@rust-highfive
Copy link
Contributor

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,
Copy link
Member

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.

Copy link
Member

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)

@nrc
Copy link
Member

nrc commented Jul 19, 2016

Tests failing and some comments inline, otherwise looks good.

@nrc
Copy link
Member

nrc commented Jul 20, 2016

@bors: r+

@bors
Copy link
Collaborator

bors commented Jul 20, 2016

📌 Commit 536c315 has been approved by nrc

@bors
Copy link
Collaborator

bors commented Jul 21, 2016

⌛ Testing commit 536c315 with merge ea1ceb2...

@bors
Copy link
Collaborator

bors commented Jul 21, 2016

💔 Test failed - auto-linux-64-cargotest

@alexcrichton
Copy link
Member

@bors: retry

On Wed, Jul 20, 2016 at 5:55 PM, bors notifications@github.com wrote:

💔 Test failed - auto-linux-64-cargotest
https://buildbot.rust-lang.org/builders/auto-linux-64-cargotest/builds/1192


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#34924 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAD95M1z2YH8lSRRfATtGe2rG6PUzCKPks5qXsNxgaJpZM4JQIER
.

@bors
Copy link
Collaborator

bors commented Jul 21, 2016

⌛ Testing commit 536c315 with merge 6ddcbbf...

@bors
Copy link
Collaborator

bors commented Jul 21, 2016

💔 Test failed - auto-win-msvc-64-opt-mir

@alexcrichton
Copy link
Member

@bors: retry

sorry for the number of retries...

On Thu, Jul 21, 2016 at 12:33 PM, bors notifications@github.com wrote:

💔 Test failed - auto-win-msvc-64-opt-mir
https://buildbot.rust-lang.org/builders/auto-win-msvc-64-opt-mir/builds/1502


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#34924 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAD95N82ciE5RCdbABPLuuhsbl7NVA9Iks5qX8mfgaJpZM4JQIER
.

@cgswords
Copy link
Contributor Author

@alexcrichton It's unclear if Bors ever tried again.

@alexcrichton
Copy link
Member

Ah it's just farther back in the queue

@bors
Copy link
Collaborator

bors commented Jul 22, 2016

⌛ Testing commit 536c315 with merge ad264f7...

bors added a commit that referenced this pull request Jul 22, 2016
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
@bors bors merged commit 536c315 into rust-lang:master Jul 22, 2016
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.

5 participants