remove incorrect info (#1435)

This commit is contained in:
Tshepang Mbambo 2022-08-17 12:33:13 +02:00 committed by GitHub
parent 8156e7f9ab
commit a5d21b8533
1 changed files with 7 additions and 6 deletions

View File

@ -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 the token stream, and then execute the parser to get a `Crate` (the root AST
node). node).
To minimise the amount of copying that is done, both the `StringReader` and To minimise the amount of copying that is done,
`Parser` have lifetimes which bind them to the parent `ParseSess`. This contains both [`StringReader`] and [`Parser`] have lifetimes which bind them to the parent `ParseSess`.
all the information needed while parsing, as well as the `SourceMap` itself. 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 Note that while parsing, we may encounter macro definitions or invocations. We
set these aside to be expanded (see [this chapter](./macro-expansion.md)). 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 constituting tokens. Although it is popular to implement lexers as generated
finite state machines, the lexer in `rustc_lexer` is hand-written. finite state machines, the lexer in `rustc_lexer` is hand-written.
- [`StringReader`] from [`rustc_ast`][rustc_ast] integrates `rustc_lexer` with `rustc` - [`StringReader`] integrates `rustc_lexer` with data structures specific to `rustc`.
specific data structures. Specifically, it adds `Span` information to tokens Specifically,
returned by `rustc_lexer` and interns identifiers. 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_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 [rustc_errors]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/index.html