Re-exportsΒ§
use rustc_ast::token;πuse rustc_ast::token::Delimiter;πuse rustc_ast::token::IdentKind;πuse rustc_ast::token::NonterminalKind;πuse rustc_ast::token::Token;πuse rustc_ast::tokenstream::TokenStreamIter;πuse rustc_ast::NodeId;πuse rustc_ast::tokenstream;πuse rustc_ast_pretty::pprust;πuse rustc_errors::Applicability;πuse rustc_feature::Features;πuse rustc_session::Session;πuse rustc_session::diagnostics::feature_err;πuse rustc_span::edition::Edition;πuse rustc_span::Ident;πuse rustc_span::Span;πuse rustc_span::Symbol;πuse rustc_span::kw;πuse rustc_span::sym;πuse crate::diagnostics;πuse crate::mbe::macro_parser::count_metavar_decls;πuse crate::mbe::Delimited;πuse crate::mbe::KleeneOp;πuse crate::mbe::KleeneToken;πuse crate::mbe::MetaVarExpr;πuse crate::mbe::SequenceRepetition;πuse crate::mbe::TokenTree;π
EnumsΒ§
- Rule
Part π - Which part of a macro rule weβre parsing
ConstantsΒ§
FunctionsΒ§
- kleene_
op π - Takes a token and returns
Some(KleeneOp)if the token is+*or?. Otherwise, returnNone. - maybe_
emit_ πmacro_ metavar_ expr_ concat_ feature - maybe_
emit_ πmacro_ metavar_ expr_ feature - Asks for the
macro_metavar_exprfeature if it is not enabled - parse π
- Takes a
tokenstream::TokenStreamand returns aVec<self::TokenTree>. Specifically, this takes a genericTokenStream, such as is used in the rest of the compiler, and returns a collection ofTokenTreefor use in parsing a macro. - parse_
kleene_ πop - Parse the next token tree of the input looking for a KleeneOp. Returns
- parse_
one_ πtt - Takes a
tokenstream::TokenTreeand returns aself::TokenTree. Likeparse, but for a single token tree. Emits errors tosessif needed. - parse_
sep_ πand_ kleene_ op - Attempt to parse a single Kleene star, possibly with a separator.
- parse_
tree π - Takes a
tokenstream::TokenTreeand returns aself::TokenTree. Specifically, this takes a genericTokenTree, such as is used in the rest of the compiler, and returns aTokenTreefor use in parsing a macro. - span_
dollar_ πdollar_ or_ metavar_ in_ the_ lhs_ err