Skip to content

Commit 04366fe

Browse files
committed
Improve the documentation of macros-by-example metavariable names
Metavariable names are not necessarily identifiers: they may also be keywords, raw identifiers or `_`.
1 parent 6bc87e2 commit 04366fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/macros-by-example.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
> _MacroMatch_ :\
2424
> &nbsp;&nbsp; &nbsp;&nbsp; [_Token_]<sub>_except $ and delimiters_</sub>\
2525
> &nbsp;&nbsp; | _MacroMatcher_\
26-
> &nbsp;&nbsp; | `$` [IDENTIFIER] `:` _MacroFragSpec_\
26+
> &nbsp;&nbsp; | `$` ( [IDENTIFIER_OR_KEYWORD] | [RAW_IDENTIFIER] | `_` ) `:` _MacroFragSpec_\
2727
> &nbsp;&nbsp; | `$` `(` _MacroMatch_<sup>+</sup> `)` _MacroRepSep_<sup>?</sup> _MacroRepOp_
2828
>
2929
> _MacroFragSpec_ :\
@@ -479,6 +479,7 @@ For more detail, see the [formal specification].
479479
[Hygiene]: #hygiene
480480
[IDENTIFIER]: identifiers.md
481481
[IDENTIFIER_OR_KEYWORD]: identifiers.md
482+
[RAW_IDENTIFIER]: identifiers.md
482483
[LIFETIME_TOKEN]: tokens.md#lifetimes-and-loop-labels
483484
[Metavariables]: #metavariables
484485
[Repetitions]: #repetitions

0 commit comments

Comments
 (0)