crate doc

This commit is contained in:
Robin Appelman 2020-12-02 00:30:35 +01:00
commit 64653f3cd5

View file

@ -1,3 +1,23 @@
//! Parser for php literals.
//!
//! Allows parsing of php string, bool, number and array literals.
//!
//! ## Example
//!
//! ```rust
//! use php_literal_parser::{parse, Value, Key};
//! # use std::fmt::Debug;
//! # use std::error::Error;
//!
//! # fn main() -> Result<(), Box<dyn Error>> {
//! let map = parse(r#"["foo" => true, "nested" => ['foo' => false]]"#)?;
//!
//! assert_eq!(map["foo"], true);
//! assert_eq!(map["nested"]["foo"], false);
//! # Ok(())
//! # }
//! ```
//!
mod ast;
mod error;
mod lexer;