Skip to content

Commit 300412d

Browse files
jugglerchrisspastorino
authored andcommitted
Fix some paths: tt -> mbe (#465)
1 parent 4a85f36 commit 300412d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/macro-expansion.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ before name resolution, macros are expanded using these portions of the code.
77
The macro parser, in turn, may call the normal Rust parser when it needs to
88
bind a metavariable (e.g. `$my_expr`) while parsing the contents of a macro
99
invocation. The code for macro expansion is in
10-
[`src/libsyntax/ext/tt/`][code_dir]. This chapter aims to explain how macro
10+
[`src/libsyntax/ext/mbe/`][code_dir]. This chapter aims to explain how macro
1111
expansion works.
1212

1313
### Example
@@ -61,7 +61,7 @@ invocations. Interestingly, both are done by the macro parser.
6161
Basically, the macro parser is like an NFA-based regex parser. It uses an
6262
algorithm similar in spirit to the [Earley parsing
6363
algorithm](https://en.wikipedia.org/wiki/Earley_parser). The macro parser is
64-
defined in [`src/libsyntax/ext/tt/macro_parser.rs`][code_mp].
64+
defined in [`src/libsyntax/ext/mbe/macro_parser.rs`][code_mp].
6565

6666
The interface of the macro parser is as follows (this is slightly simplified):
6767

@@ -110,7 +110,7 @@ normal Rust parser.
110110
As mentioned above, both definitions and invocations of macros are parsed using
111111
the macro parser. This is extremely non-intuitive and self-referential. The code
112112
to parse macro _definitions_ is in
113-
[`src/libsyntax/ext/tt/macro_rules.rs`][code_mr]. It defines the pattern for
113+
[`src/libsyntax/ext/mbe/macro_rules.rs`][code_mr]. It defines the pattern for
114114
matching for a macro definition as `$( $lhs:tt => $rhs:tt );+`. In other words,
115115
a `macro_rules` definition should have in its body at least one occurrence of a
116116
token tree followed by `=>` followed by another token tree. When the compiler
@@ -139,7 +139,7 @@ the parse is ambiguous, while if there are no matches at all, there is a syntax
139139
error.
140140

141141
For more information about the macro parser's implementation, see the comments
142-
in [`src/libsyntax/ext/tt/macro_parser.rs`][code_mp].
142+
in [`src/libsyntax/ext/mbe/macro_parser.rs`][code_mp].
143143

144144
### Hygiene
145145

0 commit comments

Comments
 (0)