diff options
| author | Keegan McAllister <kmcallister@mozilla.com> | 2015-02-20 22:08:06 -0800 |
|---|---|---|
| committer | Keegan McAllister <kmcallister@mozilla.com> | 2015-02-24 16:34:18 -0800 |
| commit | 848a7e692102643d99bb208b5a64199b6d6d87a1 (patch) | |
| tree | 92ffb345a6c3d41dd44bfe4bc3781fc504693a0b /src/doc/reference.md | |
| parent | df0865754e56d3d804df3b2bb15d405e344e2015 (diff) | |
| download | rust-848a7e692102643d99bb208b5a64199b6d6d87a1.tar.gz rust-848a7e692102643d99bb208b5a64199b6d6d87a1.zip | |
Enhance and move information about macro debugging
Fixes #22424.
Diffstat (limited to 'src/doc/reference.md')
| -rw-r--r-- | src/doc/reference.md | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md index 31524579df7..781b40be768 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -731,15 +731,20 @@ Rust syntax is restricted in two ways: pairs when they occur at the beginning of, or immediately after, a `$(...)*`; requiring a distinctive token in front can solve the problem. -## Syntax extensions useful for the macro author +## Syntax extensions useful in macros -* `log_syntax!` : print out the arguments at compile time -* `trace_macros!` : supply `true` or `false` to enable or disable macro expansion logging * `stringify!` : turn the identifier argument into a string literal * `concat!` : concatenates a comma-separated list of literals -* `concat_idents!` : create a new identifier by concatenating the arguments -The following attributes are used for quasiquoting in procedural macros: +## Syntax extensions for macro debugging + +* `log_syntax!` : print out the arguments at compile time +* `trace_macros!` : supply `true` or `false` to enable or disable macro expansion logging + +## Quasiquoting + +The following syntax extensions are used for quasiquoting Rust syntax trees, +usually in [procedural macros](book/plugins.html#syntax-extensions): * `quote_expr!` * `quote_item!` @@ -748,6 +753,8 @@ The following attributes are used for quasiquoting in procedural macros: * `quote_tokens!` * `quote_ty!` +Documentation is very limited at the moment. + # Crates and source files Rust is a *compiled* language. Its semantics obey a *phase distinction* |
