Skip to content

Commit 52df822

Browse files
pczarnManishearth
authored andcommitted
Cleanup and followup to PR rust-lang#17830: parsing changes
Prevents breaking down `$name` tokens into separate `$` and `name`. Reports unknown macro variables. Fixes rust-lang#18775 Fixes rust-lang#18839 Fixes rust-lang#15640
1 parent 576b2e7 commit 52df822

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

reference.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -690,10 +690,9 @@ balanced, but they are otherwise not special.
690690

691691
In the matcher, `$` _name_ `:` _designator_ matches the nonterminal in the Rust
692692
syntax named by _designator_. Valid designators are `item`, `block`, `stmt`,
693-
`pat`, `expr`, `ty` (type), `ident`, `path`, `matchers` (lhs of the `=>` in
694-
macro rules), `tt` (rhs of the `=>` in macro rules). In the transcriber, the
695-
designator is already known, and so only the name of a matched nonterminal
696-
comes after the dollar sign.
693+
`pat`, `expr`, `ty` (type), `ident`, `path`, `tt` (either side of the `=>`
694+
in macro rules). In the transcriber, the designator is already known, and so
695+
only the name of a matched nonterminal comes after the dollar sign.
697696

698697
In both the matcher and transcriber, the Kleene star-like operator indicates
699698
repetition. The Kleene star operator consists of `$` and parens, optionally

0 commit comments

Comments
 (0)