backyard-parser 0.1.10

Parse PHP code to AST node.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use backyard_parser::parse_eval;

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

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