Kickstart the inner usage of macro_metavar_expr

This commit is contained in:
Caio
2022-04-07 08:13:41 -03:00
parent f565016edd
commit 3191d27f48
4 changed files with 28 additions and 120 deletions

View File

@@ -83,9 +83,7 @@ macro_rules! ast_fragments {
}
match self {
$($(AstFragment::$Kind(ast) => ast.extend(placeholders.iter().flat_map(|id| {
// We are repeating through arguments with `many`, to do that we have to
// mention some macro variable from those arguments even if it's not used.
macro _repeating($flat_map_ast_elt) {}
${ignore(flat_map_ast_elt)}
placeholder(AstFragmentKind::$Kind, *id, None).$make_ast()
})),)?)*
_ => panic!("unexpected AST fragment kind")