From 3f23b32c63df7033c60f4f3b2058f0eaa431534b Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 30 Apr 2020 11:36:47 -0500 Subject: [PATCH] add note about macros in parser chapter --- src/the-parser.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/the-parser.md b/src/the-parser.md index c84ac4ea..c0f2a071 100644 --- a/src/the-parser.md +++ b/src/the-parser.md @@ -38,6 +38,11 @@ To minimise the amount of copying that is done, both the `StringReader` and `Parser` have lifetimes which bind them to the parent `ParseSess`. This contains all the information needed while parsing, as well as the `SourceMap` itself. +Note that while parsing, we may encounter macro definitions or invocations. We +set these aside to be expanded (see [this chapter](./macro-expansion.md)). +Expansion may itself require parsing the output of the macro, which may reveal +more macros to be expanded, and so on. + ## More on Lexical Analysis Code for lexical analysis is split between two crates: