File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,10 @@ pub enum TokenKind {
333
333
/// - It prevents `Token` from implementing `Copy`.
334
334
/// It adds complexity and likely slows things down. Please don't add new
335
335
/// occurrences of this token kind!
336
+ ///
337
+ /// Note: the span here is for the LHS macro parameter declaration, e.g.
338
+ /// `$id:ident`, `$t:ty`. (The span covers the metavariable name, the `:`,
339
+ /// and the fragment specifier kind.)
336
340
Interpolated ( Lrc < ( Nonterminal , Span ) > ) ,
337
341
338
342
/// A doc comment token.
@@ -857,6 +861,8 @@ pub enum Nonterminal {
857
861
NtPat ( P < ast:: Pat > ) ,
858
862
NtExpr ( P < ast:: Expr > ) ,
859
863
NtTy ( P < ast:: Ty > ) ,
864
+ /// The span in the `Ident` is for the identifier passed in to the macro,
865
+ /// e.g. the `blah` in `foo!(blah)`.
860
866
NtIdent ( Ident , IdentIsRaw ) ,
861
867
NtLifetime ( Ident ) ,
862
868
NtLiteral ( P < ast:: Expr > ) ,
You can’t perform that action at this time.
0 commit comments