diff options
| author | Tshepang Mbambo <tshepang@gmail.com> | 2022-08-17 12:33:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-17 19:33:13 +0900 |
| commit | d7ad33f0e9ae2e8227d9829dad3ce48127b30a4c (patch) | |
| tree | 27b8ee35529b4c2a58792b308e2112c82ad18706 /src/doc/rustc-dev-guide | |
| parent | 5e97e7482a5273b6a539b8d14ad9f52de6513c1b (diff) | |
| download | rust-d7ad33f0e9ae2e8227d9829dad3ce48127b30a4c.tar.gz rust-d7ad33f0e9ae2e8227d9829dad3ce48127b30a4c.zip | |
remove incorrect info (#1435)
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/the-parser.md | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/doc/rustc-dev-guide/src/the-parser.md b/src/doc/rustc-dev-guide/src/the-parser.md index 3482d2d75b5..cd8284ff2f7 100644 --- a/src/doc/rustc-dev-guide/src/the-parser.md +++ b/src/doc/rustc-dev-guide/src/the-parser.md @@ -35,9 +35,10 @@ The main entrypoint to the parser is via the various `parse_*` functions and oth the token stream, and then execute the parser to get a `Crate` (the root AST node). -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. +To minimise the amount of copying that is done, +both [`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)). @@ -52,9 +53,9 @@ Code for lexical analysis is split between two crates: constituting tokens. Although it is popular to implement lexers as generated finite state machines, the lexer in `rustc_lexer` is hand-written. -- [`StringReader`] from [`rustc_ast`][rustc_ast] integrates `rustc_lexer` with `rustc` - specific data structures. Specifically, it adds `Span` information to tokens - returned by `rustc_lexer` and interns identifiers. +- [`StringReader`] integrates `rustc_lexer` with data structures specific to `rustc`. + Specifically, + it adds `Span` information to tokens returned by `rustc_lexer` and interns identifiers. [rustc_ast]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast/index.html [rustc_errors]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/index.html |
