From bb12774e76b63742875d02c32cd693d33d080514 Mon Sep 17 00:00:00 2001 From: Tbkhi Date: Sun, 10 Mar 2024 17:29:26 -0300 Subject: [PATCH 1/2] Update syntax-intro.md --- src/syntax-intro.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/syntax-intro.md b/src/syntax-intro.md index 43ef44577..08798cad4 100644 --- a/src/syntax-intro.md +++ b/src/syntax-intro.md @@ -1,13 +1,20 @@ # Syntax and the AST Working directly with source code is very inconvenient and error-prone. Thus, -before we do anything else, we convert raw source code into an AST. It turns -out that doing even this involves a lot of work, including lexing, parsing, -macro expansion, name resolution, conditional compilation, feature-gate -checking, and validation of the AST. In this chapter, we take a look at all -of these steps. +before we do anything else, we convert raw source code into an [Abstract Syntax +Tree (`AST`)][`AST`]. It turns out that doing even this involves a lot of work, +including [lexing, parsing], [`macro` expansion], [name resolution], conditional +compilation, [feature-gate checking], and [validation] of the [`AST`]. In this chapter, +we take a look at all of these steps. Notably, there isn't always a clean ordering between these tasks. For example, -macro expansion relies on name resolution to resolve the names of macros and -imports. And parsing requires macro expansion, which in turn may require -parsing the output of the macro. +`macro` expansion relies on name resolution to resolve the names of `macro`s and +imports. And parsing requires `macro` expansion, which in turn may require +parsing the output of the `macro`. + +[`AST`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/index.html +[`macro` expansion]: ./macro-expansion.md +[feature-gate checking]: ./feature-gate-ck.md +[lexing, parsing]: ./lexing-parsing.md +[name resolution]: ./name-resolution.md +[validation]: ./ast-validation.md \ No newline at end of file From 66bbbf0ee5b5b52c186e898731dba48cd50f9e9e Mon Sep 17 00:00:00 2001 From: Noratrieb <48135649+Noratrieb@users.noreply.github.com> Date: Tue, 24 Sep 2024 20:21:01 +0200 Subject: [PATCH 2/2] minor edits --- src/syntax-intro.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/syntax-intro.md b/src/syntax-intro.md index 08798cad4..6339a7e6b 100644 --- a/src/syntax-intro.md +++ b/src/syntax-intro.md @@ -1,20 +1,19 @@ # Syntax and the AST -Working directly with source code is very inconvenient and error-prone. Thus, -before we do anything else, we convert raw source code into an [Abstract Syntax -Tree (`AST`)][`AST`]. It turns out that doing even this involves a lot of work, -including [lexing, parsing], [`macro` expansion], [name resolution], conditional -compilation, [feature-gate checking], and [validation] of the [`AST`]. In this chapter, -we take a look at all of these steps. +Working directly with source code is very inconvenient and error-prone. +Thus, before we do anything else, we convert raw source code into an +[Abstract Syntax Tree (AST)][AST]. It turns out that doing this involves a lot of work, +including [lexing, parsing], [macro expansion], [name resolution], conditional +compilation, [feature-gate checking], and [validation] of the [AST]. +In this chapter, we take a look at all of these steps. -Notably, there isn't always a clean ordering between these tasks. For example, -`macro` expansion relies on name resolution to resolve the names of `macro`s and -imports. And parsing requires `macro` expansion, which in turn may require -parsing the output of the `macro`. +Notably, there isn't always a clean ordering between these tasks. +For example, macro expansion relies on name resolution to resolve the names of macros and imports. +And parsing requires macro expansion, which in turn may require parsing the output of the macro. -[`AST`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/index.html -[`macro` expansion]: ./macro-expansion.md +[AST]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/index.html +[macro expansion]: ./macro-expansion.md [feature-gate checking]: ./feature-gate-ck.md [lexing, parsing]: ./lexing-parsing.md [name resolution]: ./name-resolution.md -[validation]: ./ast-validation.md \ No newline at end of file +[validation]: ./ast-validation.md