backyard-parser 0.1.10

Parse PHP code to AST node.
Documentation
use backyard_parser::parse_eval;

#[test]
fn basic() {
  let arena = bumpalo::Bump::new();
  let asts = parse_eval(&arena, "interface A {}").unwrap();
  insta::assert_yaml_snapshot!(asts);
}

#[test]
fn without_parenthesis() {
  let arena = bumpalo::Bump::new();
  let asts = parse_eval(
    &arena,
    "interface A extends B, C {
  const MY_CONSTANT = \"constant value\";
  public function a(int $x, int $y = 0): int;
}"
  ).unwrap();
  insta::assert_yaml_snapshot!(asts);
}