[][src]Crate php_literal_parser

Parser for php literals.

Allows parsing of php string, bool, number and array literals.

Example

use php_literal_parser::{parse, Value, Key};

let map = parse(r#"["foo" => true, "nested" => ['foo' => false]]"#)?;

assert_eq!(map["foo"], true);
assert_eq!(map["nested"]["foo"], false);

Structs

SpannedError

An error and related source span, will print out the problematic code fragment and error on Display

Enums

Key
ParseError
Value

Functions

parse

Parse a php literal