basic readme, cleanup token error

This commit is contained in:
Robin Appelman 2020-12-02 00:25:41 +01:00
commit 89610734af
2 changed files with 44 additions and 4 deletions

17
README.md Normal file
View file

@ -0,0 +1,17 @@
# php-literal-parser
parser for php literals.
## Usage
```rust
use php_literal_parser::parse;
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(())
}
```