mirror of
https://codeberg.org/icewind/php-literal-parser.git
synced 2026-06-03 10:34:08 +02:00
finish serde support
This commit is contained in:
parent
80a72c3d72
commit
cf2fda0c8c
9 changed files with 717 additions and 421 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use php_literal_parser::parse;
|
||||
use php_literal_parser::{from_str, Value};
|
||||
|
||||
fn main() {
|
||||
let source = r###"
|
||||
|
|
@ -17,7 +17,7 @@ fn main() {
|
|||
)
|
||||
"###;
|
||||
|
||||
match parse(source) {
|
||||
match from_str::<Value>(source) {
|
||||
Ok(result) => print!("{:#?}", result),
|
||||
Err(err) => eprint!("{}", err.with_source(source)),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue