diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-02-20 23:11:52 -0500 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2017-02-21 14:01:40 -0500 |
| commit | b443c5ee22bdf874ec0b8b607fa4afbac7136dc7 (patch) | |
| tree | 1828eeb4751baa5edf6055ce7c3f5e3ec7b3f181 /src/doc/reference | |
| parent | a486dcbd979d6ed7b95bc8b8f06f70d9973895ab (diff) | |
| download | rust-b443c5ee22bdf874ec0b8b607fa4afbac7136dc7.tar.gz rust-b443c5ee22bdf874ec0b8b607fa4afbac7136dc7.zip | |
Macros By Example
Diffstat (limited to 'src/doc/reference')
| -rw-r--r-- | src/doc/reference/src/macros-by-example.md | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/src/doc/reference/src/macros-by-example.md b/src/doc/reference/src/macros-by-example.md index 916e6c891ab..a007b232e4c 100644 --- a/src/doc/reference/src/macros-by-example.md +++ b/src/doc/reference/src/macros-by-example.md @@ -20,17 +20,27 @@ balanced, but they are otherwise not special. In the matcher, `$` _name_ `:` _designator_ matches the nonterminal in the Rust syntax named by _designator_. Valid designators are: -* `item`: an [item](#items) -* `block`: a [block](#block-expressions) -* `stmt`: a [statement](#statements) -* `pat`: a [pattern](#match-expressions) -* `expr`: an [expression](#expressions) -* `ty`: a [type](#types) -* `ident`: an [identifier](#identifiers) -* `path`: a [path](#paths) -* `tt`: a token tree (a single [token](#tokens) or a sequence of token trees surrounded - by matching `()`, `[]`, or `{}`) -* `meta`: the contents of an [attribute](#attributes) +* `item`: an [item] +* `block`: a [block] +* `stmt`: a [statement] +* `pat`: a [pattern] +* `expr`: an [expression] +* `ty`: a [type] +* `ident`: an [identifier] +* `path`: a [path] +* `tt`: a token tree (a single [token] by matching `()`, `[]`, or `{}`) +* `meta`: the contents of an [attribute] + +[item]: items.html +[block]: expressions.html#block-expressions +[statement]: statements.html +[pattern]: expressions.html#match-expressions +[expression]: expressions.html +[type]: types.html +[identifier]: identifiers.html +[path]: paths.html +[token]: tokens.html +[attribute]: attributes.html In the transcriber, the designator is already known, and so only the name of a matched nonterminal comes |
