-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Overhaul MacArgs
#96546
Overhaul MacArgs
#96546
Changes from all commits
5a05b61
481a446
cde25f8
ae5f67f
99f5945
baa18c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -237,6 +237,15 @@ pub enum TokenKind { | |
/// treat regular and interpolated lifetime identifiers in the same way. | ||
Lifetime(Symbol), | ||
|
||
/// An embedded AST node, as produced by a macro. This only exists for | ||
/// historical reasons. We'd like to get rid of it, for multiple reasons. | ||
/// - It's conceptually very strange. Saying a token can contain an AST | ||
/// node is like saying, in natural language, that a word can contain a | ||
/// sentence. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The main reason to get rid of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're talking about token trees, rather than tokens, right?
That's a good reason as well :) |
||
/// - It requires special handling in a bunch of places in the parser. | ||
/// - It prevents `Token` from implementing `Copy`. | ||
/// It adds complexity and likely slows things down. Please don't add new | ||
/// occurrences of this token kind! | ||
Interpolated(Lrc<Nonterminal>), | ||
|
||
/// A doc comment token. | ||
|
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.