.cargo/
ombre/
ombre-derive/
reve/
syntaxe/
benches/
src/
lib.rs
602 B
parsers.rs
37.5 KiB
prelude.rs
369 B
result.rs
7.2 KiB
.gitignore
19 B
Cargo.toml
351 B
README.md
60 B
.gitignore
34 B
Cargo.lock
8.5 KiB
Cargo.toml
523 B
README
1.0 KiB
rust-toolchain.toml
77 B
rustfmt.toml
55 B
syntaxe/src/lib.rs
raw
| 1 | #![warn(missing_docs)] |
| 2 | #![allow(clippy::type_complexity)] |
| 3 | |
| 4 | //! Memoir is a library of self-describing, reflective parser-combinators. |
| 5 | //! Parsers are represented as reified objects that can print themselves |
| 6 | //! as documentation. |
| 7 | //! |
| 8 | //! For most purposes, syntaxe's *prelude* should be imported. |
| 9 | //! |
| 10 | //! ``` |
| 11 | //! use syntaxe::*; |
| 12 | //! |
| 13 | //! let parser = |
| 14 | //! string("set").then(optional(symbol('!'))) |
| 15 | //! .then(whitespace()) |
| 16 | //! .then(string("on").or(string("off"))); |
| 17 | //! |
| 18 | //! assert!(parser.parse("set on").is_ok()); |
| 19 | //! ``` |
| 20 | pub mod parsers; |
| 21 | pub mod prelude; |
| 22 | pub mod result; |
| 23 | |
| 24 | pub use parsers::*; |