Require Ident to contain a valid ident
diff --git a/src/mac.rs b/src/mac.rs
index 3517ac8..ad8385e 100644
--- a/src/mac.rs
+++ b/src/mac.rs
@@ -9,12 +9,11 @@
/// Represents a macro invocation. The Path indicates which macro
/// is being invoked, and the vector of token-trees contains the source
/// of the macro invocation.
- ///
- /// NB: the additional ident for a `macro_rules`-style macro is actually
- /// stored in the enclosing item. Oog.
pub struct Mac {
pub path: Path,
pub bang_token: tokens::Bang,
+ /// The `example` in `macro_rules! example { ... }`.
+ pub ident: Option<Ident>,
pub tokens: Vec<TokenTree>,
}
}
@@ -147,6 +146,7 @@
(Mac {
path: what,
bang_token: bang,
+ ident: None,
tokens: vec![body],
})
));