Use TokenTrees in lhs of macros

This commit is contained in:
Piotr Czarnecki 2014-10-06 23:00:56 +01:00
parent 5c1fd5f8b7
commit 38ce6d9eac
10 changed files with 387 additions and 249 deletions

View file

@ -108,7 +108,15 @@ pub enum Token {
/* For interpolation */
Interpolated(Nonterminal),
// Can be expanded into several tokens.
/// Doc comment
DocComment(ast::Name),
// In left-hand-sides of MBE macros:
/// Parse a nonterminal (name to bind, name of NT, styles of their idents)
MatchNt(ast::Ident, ast::Ident, IdentStyle, IdentStyle),
// In right-hand-sides of MBE macros:
/// A syntactic variable that will be filled in by macro expansion.
SubstNt(ast::Ident, IdentStyle),
// Junk. These carry no data because we don't really care about the data
// they *would* carry, and don't really want to allocate a new ident for