File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,10 @@ pub enum TokenKind {
333333 /// - It prevents `Token` from implementing `Copy`.
334334 /// It adds complexity and likely slows things down. Please don't add new
335335 /// 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.)
336340 Interpolated ( Lrc < ( Nonterminal , Span ) > ) ,
337341
338342 /// A doc comment token.
@@ -857,6 +861,8 @@ pub enum Nonterminal {
857861 NtPat ( P < ast:: Pat > ) ,
858862 NtExpr ( P < ast:: Expr > ) ,
859863 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)`.
860866 NtIdent ( Ident , IdentIsRaw ) ,
861867 NtLifetime ( Ident ) ,
862868 NtLiteral ( P < ast:: Expr > ) ,
You can’t perform that action at this time.
0 commit comments