We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b4fab4 commit 1627505Copy full SHA for 1627505
src/macro-expansion.md
@@ -1 +1,12 @@
1
# Macro expansion
2
+
3
+Macro expansion happens during parsing. `rustc` has two parsers, in fact: the
4
+normal Rust parser, and the macro parser. During the parsing phase, the normal
5
+Rust parser will call into the macro parser when it encounters a macro. The
6
+macro parser, in turn, may call back out to the Rust parser when it needs to
7
+bind a metavariable (e.g. `$expr`). There are a few aspects of this system to be
8
+explained. The code for macro expansion is in `src/libsyntax/ext/tt/`.
9
10
+TODO: explain parsing of macro definitions
11
12
+TODO: explain parsing of macro invokations + macro expansion
0 commit comments