From cc5acf87c7568e30cf4322d848d0ca35f1a624ed Mon Sep 17 00:00:00 2001 From: Matthew Woodcraft Date: Thu, 6 Jan 2022 21:53:37 +0000 Subject: [PATCH] Improve the documentation of macros-by-example metavariable names Metavariable names are not necessarily identifiers: they may also be keywords:(other than `crate`), raw identifiers or `_`. --- src/macros-by-example.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/macros-by-example.md b/src/macros-by-example.md index 7d2b44709..e731091ca 100644 --- a/src/macros-by-example.md +++ b/src/macros-by-example.md @@ -23,7 +23,7 @@ > _MacroMatch_ :\ >       [_Token_]_except $ and delimiters_\ >    | _MacroMatcher_\ ->    | `$` [IDENTIFIER] `:` _MacroFragSpec_\ +>    | `$` ( [IDENTIFIER_OR_KEYWORD] _except `crate`_ | [RAW_IDENTIFIER] | `_` ) `:` _MacroFragSpec_\ >    | `$` `(` _MacroMatch_+ `)` _MacroRepSep_? _MacroRepOp_ > > _MacroFragSpec_ :\ @@ -479,6 +479,7 @@ For more detail, see the [formal specification]. [Hygiene]: #hygiene [IDENTIFIER]: identifiers.md [IDENTIFIER_OR_KEYWORD]: identifiers.md +[RAW_IDENTIFIER]: identifiers.md [LIFETIME_TOKEN]: tokens.md#lifetimes-and-loop-labels [Metavariables]: #metavariables [Repetitions]: #repetitions