backyard-generator

Crates.iobackyard-generator
lib.rsbackyard-generator
version
sourcesrc
created_at2024-11-27 14:03:35.439553
updated_at2024-12-12 08:46:09.760763
descriptionConvert AST node back to PHP code.
homepage
repositoryhttps://github.com/Alzera/backyard
max_upload_size
id1463104
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`
size0
Alzera Cita (Alzera)

documentation

README

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

MIT

Commit count: 158

cargo fmt