Crates.io | backyard-generator |
lib.rs | backyard-generator |
version | |
source | src |
created_at | 2024-11-27 14:03:35.439553 |
updated_at | 2024-12-12 08:46:09.760763 |
description | Convert AST node back to PHP code. |
homepage | |
repository | https://github.com/Alzera/backyard |
max_upload_size | |
id | 1463104 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Convert AST node back to PHP code.
fn main() {
let code = r#"<?php
function hello_world($foo) {
var_dump($foo);
}"#;
let parsed = backyard_parser::parse(code).unwrap();
let code = backyard_generator::generate(parsed);
println!("{:?}", code);
}
Resulting this code:
function hello_world($foo) {
var_dump($foo);
}