From ec13e2bbc0909ff655e8fa2627b870ac4a34cb43 Mon Sep 17 00:00:00 2001 From: hosseind88 Date: Sun, 15 Nov 2020 16:50:25 +0330 Subject: [PATCH 1/6] add string interning wikipedia link --- src/overview.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/overview.md b/src/overview.md index baa1e0aa6..e72e99511 100644 --- a/src/overview.md +++ b/src/overview.md @@ -32,7 +32,8 @@ we'll talk about that later. - The token stream passes through a higher-level lexer located in [`rustc_parse`] to prepare for the next stage of the compile process. The [`StringReader`] struct is used at this stage to perform a set of validations - and turn strings into interned symbols (_interning_ is discussed later). + and turn strings into interned symbols (_interning_ is discussed later). string interning is a method of storing only one copy of each distinct string value, which must be immutable. + [read more](https://en.wikipedia.org/wiki/String_interning) - The lexer has a small interface and doesn't depend directly on the diagnostic infrastructure in `rustc`. Instead it provides diagnostics as plain data which are emitted in `rustc_parse::lexer::mod` as real diagnostics. From e552870db3e7fbc385ea0f2e3955bdccdac7beed Mon Sep 17 00:00:00 2001 From: hosseind88 Date: Sun, 15 Nov 2020 17:00:54 +0330 Subject: [PATCH 2/6] fix line 35 --- src/overview.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/overview.md b/src/overview.md index e72e99511..192992b66 100644 --- a/src/overview.md +++ b/src/overview.md @@ -32,7 +32,9 @@ we'll talk about that later. - The token stream passes through a higher-level lexer located in [`rustc_parse`] to prepare for the next stage of the compile process. The [`StringReader`] struct is used at this stage to perform a set of validations - and turn strings into interned symbols (_interning_ is discussed later). string interning is a method of storing only one copy of each distinct string value, which must be immutable. + and turn strings into interned symbols (_interning_ is discussed later). + string interning is a method of storing only one copy of each distinct + string value, which must be immutable. [read more](https://en.wikipedia.org/wiki/String_interning) - The lexer has a small interface and doesn't depend directly on the diagnostic infrastructure in `rustc`. Instead it provides diagnostics as plain From 3e7182cb37d488ab053a509daa9f167283cb4599 Mon Sep 17 00:00:00 2001 From: hosseind88 <72156162+hosseind88@users.noreply.github.com> Date: Sun, 15 Nov 2020 17:56:05 +0330 Subject: [PATCH 3/6] Update src/overview.md Co-authored-by: Joshua Nelson --- src/overview.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/overview.md b/src/overview.md index 192992b66..1ef5f01cb 100644 --- a/src/overview.md +++ b/src/overview.md @@ -33,9 +33,7 @@ we'll talk about that later. [`rustc_parse`] to prepare for the next stage of the compile process. The [`StringReader`] struct is used at this stage to perform a set of validations and turn strings into interned symbols (_interning_ is discussed later). - string interning is a method of storing only one copy of each distinct - string value, which must be immutable. - [read more](https://en.wikipedia.org/wiki/String_interning) + [String interning] is a way of storing only one immutable copy of each distinct string value. - The lexer has a small interface and doesn't depend directly on the diagnostic infrastructure in `rustc`. Instead it provides diagnostics as plain data which are emitted in `rustc_parse::lexer::mod` as real diagnostics. From 27e7209ef48564ce24dc895f8091051548b2f5dd Mon Sep 17 00:00:00 2001 From: hosseind88 Date: Sun, 15 Nov 2020 18:52:42 +0330 Subject: [PATCH 4/6] a little fix --- src/overview.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/overview.md b/src/overview.md index 1ef5f01cb..8a8be9384 100644 --- a/src/overview.md +++ b/src/overview.md @@ -33,7 +33,9 @@ we'll talk about that later. [`rustc_parse`] to prepare for the next stage of the compile process. The [`StringReader`] struct is used at this stage to perform a set of validations and turn strings into interned symbols (_interning_ is discussed later). - [String interning] is a way of storing only one immutable copy of each distinct string value. + string interning is a method of storing only one copy of each distinct + string value, which must be immutable. + [read more](https://en.wikipedia.org/wiki/String_interning) - The lexer has a small interface and doesn't depend directly on the diagnostic infrastructure in `rustc`. Instead it provides diagnostics as plain data which are emitted in `rustc_parse::lexer::mod` as real diagnostics. @@ -98,6 +100,7 @@ we'll talk about that later. - The different libraries/binaries are linked together to produce the final binary. +[`String interning`]: https://en.wikipedia.org/wiki/String_interning [`rustc_lexer`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lexer/index.html [`rustc_driver`]: https://rustc-dev-guide.rust-lang.org/rustc-driver.html [`rustc_interface::Config`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/interface/struct.Config.html From 3f206dceb88064290a46ee293dba9fd55c42e99c Mon Sep 17 00:00:00 2001 From: hosseind88 Date: Sun, 15 Nov 2020 19:48:30 +0330 Subject: [PATCH 5/6] a little fix --- src/overview.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/overview.md b/src/overview.md index 8a8be9384..6f03ac285 100644 --- a/src/overview.md +++ b/src/overview.md @@ -36,6 +36,9 @@ we'll talk about that later. string interning is a method of storing only one copy of each distinct string value, which must be immutable. [read more](https://en.wikipedia.org/wiki/String_interning) + + [String interning] is a way of storing only one immutable + copy of each distinct string value. - The lexer has a small interface and doesn't depend directly on the diagnostic infrastructure in `rustc`. Instead it provides diagnostics as plain data which are emitted in `rustc_parse::lexer::mod` as real diagnostics. @@ -100,7 +103,7 @@ we'll talk about that later. - The different libraries/binaries are linked together to produce the final binary. -[`String interning`]: https://en.wikipedia.org/wiki/String_interning +[String interning]: https://en.wikipedia.org/wiki/String_interning [`rustc_lexer`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lexer/index.html [`rustc_driver`]: https://rustc-dev-guide.rust-lang.org/rustc-driver.html [`rustc_interface::Config`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/interface/struct.Config.html From 731dece1fed5544fdd4ccdfee4cde6dc9a1baa1a Mon Sep 17 00:00:00 2001 From: hosseind88 Date: Sun, 15 Nov 2020 19:56:41 +0330 Subject: [PATCH 6/6] remove read more --- src/overview.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/overview.md b/src/overview.md index 6f03ac285..82f2289e4 100644 --- a/src/overview.md +++ b/src/overview.md @@ -33,12 +33,9 @@ we'll talk about that later. [`rustc_parse`] to prepare for the next stage of the compile process. The [`StringReader`] struct is used at this stage to perform a set of validations and turn strings into interned symbols (_interning_ is discussed later). - string interning is a method of storing only one copy of each distinct - string value, which must be immutable. - [read more](https://en.wikipedia.org/wiki/String_interning) - [String interning] is a way of storing only one immutable copy of each distinct string value. + - The lexer has a small interface and doesn't depend directly on the diagnostic infrastructure in `rustc`. Instead it provides diagnostics as plain data which are emitted in `rustc_parse::lexer::mod` as real diagnostics.