From 0b9ded31e999e5c6d904148695c59c642c470166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Eertmans?= Date: Wed, 7 Feb 2024 13:13:33 +0100 Subject: [PATCH] fix(doc): reset logos2 to logos I missed the links to crates.io and else. --- README.md | 8 ++++---- book/src/attributes/logos.md | 2 +- book/src/callbacks.md | 10 +++++----- book/src/contributing/setup.md | 2 +- book/src/getting-help.md | 2 +- book/src/getting-started.md | 6 +++--- book/src/intro.md | 8 ++++---- examples/extras.rs | 2 +- logos-codegen/src/lib.rs | 2 +- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 671b2862..c5c735f4 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ # Logos ![Test](https://github.com/maciejhirsz/logos/workflows/Test/badge.svg?branch=master) -[![Crates.io version shield](https://img.shields.io/crates/v/logos.svg)](https://crates.io/crates/logos2) -[![Docs](https://docs.rs/logos2/badge.svg)](https://docs.rs/logos2) -[![Crates.io license shield](https://img.shields.io/crates/l/logos.svg)](https://crates.io/crates/logos2) +[![Crates.io version shield](https://img.shields.io/crates/v/logos.svg)](https://crates.io/crates/logos) +[![Docs](https://docs.rs/logos/badge.svg)](https://docs.rs/logos) +[![Crates.io license shield](https://img.shields.io/crates/l/logos.svg)](https://crates.io/crates/logos) _Create ridiculously fast Lexers._ @@ -71,7 +71,7 @@ To achieve those, **Logos**: For more examples and documentation, please refer to the [Logos handbook](https://maciejhirsz.github.io/logos/) or the -[crate documentation](https://docs.rs/logos2/latest/logos/). +[crate documentation](https://docs.rs/logos/latest/logos/). ## How fast? diff --git a/book/src/attributes/logos.md b/book/src/attributes/logos.md index 91f6ad23..57bdea4a 100644 --- a/book/src/attributes/logos.md +++ b/book/src/attributes/logos.md @@ -57,4 +57,4 @@ By default, **Logos**'s lexer will accept `&str` as input, unless any of the pattern literals match a non utf-8 bytes sequence. In this case, it will fall back to `&[u8]`. You can override this behavior by forcing one of the two source types. You can also specify any custom time that implements -[`Source`](https://docs.rs/logos2/latest/logos/source/trait.Source.html). +[`Source`](https://docs.rs/logos/latest/logos/source/trait.Source.html). diff --git a/book/src/callbacks.md b/book/src/callbacks.md index 6311cdfb..27c34ce1 100644 --- a/book/src/callbacks.md +++ b/book/src/callbacks.md @@ -58,11 +58,11 @@ Logos can handle callbacks with following return types: | `T` | `Ok(Token::Value(T))` | | `Option` | `Ok(Token::Value(T))` **or** `Err(::Error::default())` | | `Result` | `Ok(Token::Value(T))` **or** `Err(::Error::from(err))` | -| [`Skip`](https://docs.rs/logos2/latest/logos/struct.Skip.html) | _skips matched input_ | -| [`Filter`](https://docs.rs/logos2/latest/logos/enum.Filter.html) | `Ok(Token::Value(T))` **or** _skips matched input_ | -| [`FilterResult`](https://docs.rs/logos2/latest/logos/enum.FilterResult.html) | `Ok(Token::Value(T))` **or** `Err(::Error::from(err))` **or** _skips matched input_ | +| [`Skip`](https://docs.rs/logos/latest/logos/struct.Skip.html) | _skips matched input_ | +| [`Filter`](https://docs.rs/logos/latest/logos/enum.Filter.html) | `Ok(Token::Value(T))` **or** _skips matched input_ | +| [`FilterResult`](https://docs.rs/logos/latest/logos/enum.FilterResult.html) | `Ok(Token::Value(T))` **or** `Err(::Error::from(err))` **or** _skips matched input_ | Callbacks can be also used to do perform more specialized lexing in place where regular expressions are too limiting. For specifics look at -[`Lexer::remainder`](https://docs.rs/logos2/latest/logos/struct.Lexer.html#method.remainder) and -[`Lexer::bump`](https://docs.rs/logos2/latest/logos/struct.Lexer.html#method.bump). +[`Lexer::remainder`](https://docs.rs/logos/latest/logos/struct.Lexer.html#method.remainder) and +[`Lexer::bump`](https://docs.rs/logos/latest/logos/struct.Lexer.html#method.bump). diff --git a/book/src/contributing/setup.md b/book/src/contributing/setup.md index 15a574e3..14cf5ac2 100644 --- a/book/src/contributing/setup.md +++ b/book/src/contributing/setup.md @@ -77,7 +77,7 @@ rustup install nightly ``` Then, use the following command to build the documentation with a similar -configuration to the one used by [docs.rs](https://docs.rs/logos2/latest/logos/): +configuration to the one used by [docs.rs](https://docs.rs/logos/latest/logos/): ```bash RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc \ diff --git a/book/src/getting-help.md b/book/src/getting-help.md index f6e20cb8..dc898531 100644 --- a/book/src/getting-help.md +++ b/book/src/getting-help.md @@ -5,7 +5,7 @@ on what you are looking for: + [this book](./) for a documented walk through **Logos**' usage, with detailed examples, and more. A **must read** for any newcomer; -+ [the API documentation](https://docs.rs/logos2/latest/logos/) to obtain precise ++ [the API documentation](https://docs.rs/logos/latest/logos/) to obtain precise information about function signatures and what the Logos crate exposes in terms of features; + and [GitHub issues](https://github.com/maciejhirsz/logos/issues) for anything diff --git a/book/src/getting-started.md b/book/src/getting-started.md index 4e10b8c6..bab08251 100644 --- a/book/src/getting-started.md +++ b/book/src/getting-started.md @@ -7,7 +7,7 @@ logos = "0.14.0" ``` -Then, you can automatically derive the [`Logos`](https://docs.rs/logos2/latest/logos/trait.Logos.html) trait on your `enum` using the `Logos` derive macro: +Then, you can automatically derive the [`Logos`](https://docs.rs/logos/latest/logos/trait.Logos.html) trait on your `enum` using the `Logos` derive macro: ```rust,no_run,no_playground use logos::Logos; @@ -56,9 +56,9 @@ assert_eq!(lex.slice(), "."); assert_eq!(lex.next(), None); ``` -[^1]: Each item is actually a [`Result`](https://docs.rs/logos2/latest/logos/struct.Lexer.html#associatedtype.Item), because the lexer returns an error if some part of the string slice does not match any variant of `Token`. +[^1]: Each item is actually a [`Result`](https://docs.rs/logos/latest/logos/struct.Lexer.html#associatedtype.Item), because the lexer returns an error if some part of the string slice does not match any variant of `Token`. -Because [`Lexer`](https://docs.rs/logos2/latest/logos/struct.Lexer.html), returned by [`Logos::lexer`](https://docs.rs/logos2/latest/logos/trait.Logos.html#method.lexer), implements the `Iterator` trait, you can use a `for .. in` construct: +Because [`Lexer`](https://docs.rs/logos/latest/logos/struct.Lexer.html), returned by [`Logos::lexer`](https://docs.rs/logos/latest/logos/trait.Logos.html#method.lexer), implements the `Iterator` trait, you can use a `for .. in` construct: ```rust,no_run,no_playground for result in Token::lexer("Create ridiculously fast Lexers.") { diff --git a/book/src/intro.md b/book/src/intro.md index 04023c09..7bc94050 100644 --- a/book/src/intro.md +++ b/book/src/intro.md @@ -1,8 +1,8 @@ # Logos Handbook -[![Crates.io version shield](https://img.shields.io/crates/v/logos.svg)](https://crates.io/crates/logos2) -[![Docs](https://docs.rs/logos2/badge.svg)](https://docs.rs/logos2) -[![Crates.io license shield](https://img.shields.io/crates/l/logos.svg)](https://crates.io/crates/logos2) +[![Crates.io version shield](https://img.shields.io/crates/v/logos.svg)](https://crates.io/crates/logos) +[![Docs](https://docs.rs/logos/badge.svg)](https://docs.rs/logos) +[![Crates.io license shield](https://img.shields.io/crates/l/logos.svg)](https://crates.io/crates/logos) Logos logo @@ -10,7 +10,7 @@ Hi there! **Logos** is a fast and easy to use [lexer](https://en.wikipedia.org/wiki/Lexical_analysis) generator written in Rust. While Rust has excellent documentation tools (and you can access -the [API docs for Logos at docs.rs](https://docs.rs/logos2/)), it's not the easiest thing to +the [API docs for Logos at docs.rs](https://docs.rs/logos/)), it's not the easiest thing to document custom syntax used by procedural macros, of which Logos has a bit. This Handbook seeks to remedy this! diff --git a/examples/extras.rs b/examples/extras.rs index 73ab18ca..4e89c2e3 100644 --- a/examples/extras.rs +++ b/examples/extras.rs @@ -7,7 +7,7 @@ //! cargo run --example extras Cargo.toml //! //! This is a small example on how to use -//! [`Extras`](https://docs.rs/logos2/latest/logos/trait.Logos.html#associatedtype.Extras) +//! [`Extras`](https://docs.rs/logos/latest/logos/trait.Logos.html#associatedtype.Extras) //! to convey some (mutable) internal state from token to token. //! //! Here, the extras will be a tuple with the following fields: diff --git a/logos-codegen/src/lib.rs b/logos-codegen/src/lib.rs index ada90b0b..46fdeb90 100644 --- a/logos-codegen/src/lib.rs +++ b/logos-codegen/src/lib.rs @@ -2,7 +2,7 @@ //! //! # Logos //! -//! This is a `#[derive]` macro crate, [for documentation go to main crate](https://docs.rs/logos2). +//! This is a `#[derive]` macro crate, [for documentation go to main crate](https://docs.rs/logos). // The `quote!` macro requires deep recursion. #![recursion_limit = "196"]