Skip to content

Commit 3f23b32

Browse files
committed
add note about macros in parser chapter
1 parent d62ed17 commit 3f23b32

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/the-parser.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ To minimise the amount of copying that is done, both the `StringReader` and
3838
`Parser` have lifetimes which bind them to the parent `ParseSess`. This contains
3939
all the information needed while parsing, as well as the `SourceMap` itself.
4040

41+
Note that while parsing, we may encounter macro definitions or invocations. We
42+
set these aside to be expanded (see [this chapter](./macro-expansion.md)).
43+
Expansion may itself require parsing the output of the macro, which may reveal
44+
more macros to be expanded, and so on.
45+
4146
## More on Lexical Analysis
4247

4348
Code for lexical analysis is split between two crates:

0 commit comments

Comments
 (0)