Skip to content

Commit

Permalink
Fix formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
timothee-haudebourg committed Aug 17, 2023
1 parent c8db2bc commit e8881f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -151,7 +151,7 @@ compilation time on the user machine.

## Disable automaton generation

When using a linter such as [`rust-analyzer`], it may be too expensive to
When using a linter such as [`rust-analyzer`], it may be too expensive to
regenerate the grammar automaton continually, even with caching. On large
grammars the generated automaton code can span hundreds or even thousands
of lines. In that case it is possible to disable the automaton generation
Expand Down
14 changes: 7 additions & 7 deletions src/lib.rs
Expand Up @@ -61,9 +61,9 @@
//!
//! let bar = Bar::new(b"baaaar").unwrap();
//! ```
//!
//!
//! # ASCII
//!
//!
//! Using the `[u8]` token string type, it is possible to specify that the
//! value can be interpreted as an ASCII text string. Then the resulting type
//! will implement `Display`, `Deref<Target=str>`, `AsRef<str>`, ect.
Expand Down Expand Up @@ -143,24 +143,24 @@
//! For large grammars, it might be a good idea to cache the automaton directly
//! with the sources, and ship it with your library/application to reduce
//! compilation time on the user machine.
//!
//!
//! # Disable automaton generation
//!
//! When using a linter such as [`rust-analyzer`], it may be too expensive to
//!
//! When using a linter such as [`rust-analyzer`], it may be too expensive to
//! regenerate the grammar automaton continually, even with caching. On large
//! grammars the generated automaton code can span hundreds or even thousands
//! of lines. In that case it is possible to disable the automaton generation
//! all together using the `disable` option:
//! ```ignore
//! #[grammar(disable)]
//! ```
//!
//!
//! Of course it is best to use this option behind a feature used only by the
//! linter:
//! ```ignore
//! #[cfg_attr(feature = "disable-grammars", grammar(disable))]
//! ```
//!
//!
//! [`rust-analyzer`](https://rust-analyzer.github.io/)
use indoc::formatdoc;
use proc_macro2::{Ident, Span, TokenStream};
Expand Down

0 comments on commit e8881f9

Please sign in to comment.