6 releases
new 0.1.9 | Dec 12, 2024 |
---|---|
0.1.8 | Dec 9, 2024 |
0.1.5 | Nov 29, 2024 |
#1318 in Algorithms
579 downloads per month
365KB
10K
SLoC
backyard-generator
Convert AST node back to PHP code.
features
- Convert AST back to string (generator())
usage
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);
}
ecosystem
heavily inspired by
license
Dependencies
~1.6–2.7MB
~53K SLoC