Skip to content

Fix link/wording for parse_nt #819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 3, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ we'll talk about that later.
analysis. The crate entry points for the parser are the `Parser.parse_crate_mod()` and
`Parser.parse_mod()` methods found in `librustc_parse::parser::item`. The external
module parsing entry point is `librustc_expand::module::parse_external_mod`. And
the macro parser entry point is `rustc_expand::mbe::macro_parser::parse_nt`.
the macro parser entry point is [`Parser.parse_nonterminal()`][parse_nonterminal].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the macro parser entry point is [`Parser.parse_nonterminal()`][parse_nonterminal].
the macro parser entry point is [`Parser::parse_nonterminal()`][parse_nonterminal].

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use . because we have Parser.parse_crate_mod() above. Should we replace them too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I didn't notice that. Yeah, would you mind changing the other ones to :: too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Addressed via bbb27ac.

- Parsing is performed with a set of `Parser` utility methods including `fn bump`,
`fn check`, `fn eat`, `fn expect`, `fn look_ahead`.
- Parsing is organized by the semantic construct that is being parsed. Separate
Expand Down Expand Up @@ -111,6 +111,7 @@ we'll talk about that later.
[mir-opt]: https://rustc-dev-guide.rust-lang.org/mir/optimizations.html
[`simplify_try`]: https://github.com/rust-lang/rust/pull/66282
[codegen]: https://rustc-dev-guide.rust-lang.org/backend/codegen.html
[parse_nonterminal]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/parser/struct.Parser.html#method.parse_nonterminal

## How it does it

Expand Down Expand Up @@ -347,7 +348,7 @@ For more details on bootstrapping, see
- Main entry points:
- [Entry point for first file in crate](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/passes/fn.parse.html)
- [Entry point for outline module parsing](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_expand/module/fn.parse_external_mod.html)
- [Entry point for macro fragments](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_expand/mbe/macro_parser/fn.parse_nt.html)
- [Entry point for macro fragments][parse_nonterminal]
- AST definition: [`librustc_ast`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast/ast/index.html)
- Expansion: **TODO**
- Name Resolution: **TODO**
Expand Down