Skip to content

Commit ca71745

Browse files
kmcallisterManishearth
authored andcommitted
Enhance and move information about macro debugging
Fixes rust-lang#22424.
1 parent f984da0 commit ca71745

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

reference.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -731,15 +731,20 @@ Rust syntax is restricted in two ways:
731731
pairs when they occur at the beginning of, or immediately after, a `$(...)*`;
732732
requiring a distinctive token in front can solve the problem.
733733

734-
## Syntax extensions useful for the macro author
734+
## Syntax extensions useful in macros
735735

736-
* `log_syntax!` : print out the arguments at compile time
737-
* `trace_macros!` : supply `true` or `false` to enable or disable macro expansion logging
738736
* `stringify!` : turn the identifier argument into a string literal
739737
* `concat!` : concatenates a comma-separated list of literals
740-
* `concat_idents!` : create a new identifier by concatenating the arguments
741738

742-
The following attributes are used for quasiquoting in procedural macros:
739+
## Syntax extensions for macro debugging
740+
741+
* `log_syntax!` : print out the arguments at compile time
742+
* `trace_macros!` : supply `true` or `false` to enable or disable macro expansion logging
743+
744+
## Quasiquoting
745+
746+
The following syntax extensions are used for quasiquoting Rust syntax trees,
747+
usually in [procedural macros](book/plugins.html#syntax-extensions):
743748

744749
* `quote_expr!`
745750
* `quote_item!`
@@ -748,6 +753,8 @@ The following attributes are used for quasiquoting in procedural macros:
748753
* `quote_tokens!`
749754
* `quote_ty!`
750755

756+
Documentation is very limited at the moment.
757+
751758
# Crates and source files
752759

753760
Rust is a *compiled* language. Its semantics obey a *phase distinction*

0 commit comments

Comments
 (0)