Skip to content

Commit

Permalink
fix(doc): reset logos2 to logos
Browse files Browse the repository at this point in the history
I missed the links to crates.io and else.
  • Loading branch information
jeertmans committed Feb 7, 2024
1 parent 171422c commit 0b9ded3
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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._

Expand Down Expand Up @@ -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?

Expand Down
2 changes: 1 addition & 1 deletion book/src/attributes/logos.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
10 changes: 5 additions & 5 deletions book/src/callbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ Logos can handle callbacks with following return types:
| `T` | `Ok(Token::Value(T))` |
| `Option<T>` | `Ok(Token::Value(T))` **or** `Err(<Token as Logos>::Error::default())` |
| `Result<T, E>` | `Ok(Token::Value(T))` **or** `Err(<Token as Logos>::Error::from(err))` |
| [`Skip`](https://docs.rs/logos2/latest/logos/struct.Skip.html) | _skips matched input_ |
| [`Filter<T>`](https://docs.rs/logos2/latest/logos/enum.Filter.html) | `Ok(Token::Value(T))` **or** _skips matched input_ |
| [`FilterResult<T, E>`](https://docs.rs/logos2/latest/logos/enum.FilterResult.html) | `Ok(Token::Value(T))` **or** `Err(<Token as Logos>::Error::from(err))` **or** _skips matched input_ |
| [`Skip`](https://docs.rs/logos/latest/logos/struct.Skip.html) | _skips matched input_ |
| [`Filter<T>`](https://docs.rs/logos/latest/logos/enum.Filter.html) | `Ok(Token::Value(T))` **or** _skips matched input_ |
| [`FilterResult<T, E>`](https://docs.rs/logos/latest/logos/enum.FilterResult.html) | `Ok(Token::Value(T))` **or** `Err(<Token as Logos>::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).
2 changes: 1 addition & 1 deletion book/src/contributing/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion book/src/getting-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions book/src/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -56,9 +56,9 @@ assert_eq!(lex.slice(), ".");
assert_eq!(lex.next(), None);
```

[^1]: Each item is actually a [`Result<Token, _>`](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<Token, _>`](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.") {
Expand Down
8 changes: 4 additions & 4 deletions book/src/intro.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# 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)

<img src="https://raw.githubusercontent.com/maciejhirsz/logos/master/logos.svg?sanitize=true" alt="Logos logo" width="250" align="right">

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!

Expand Down
2 changes: 1 addition & 1 deletion examples/extras.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion logos-codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 0b9ded3

Please sign in to comment.