avm1-tree 0.8.0

Abstract Syntax Tree (AST) for AVM1
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use avm1_tree::Action;
use std::io::Read;

fn main() {
  let mut buf: Vec<u8> = Vec::new();

  match ::std::io::stdin().read_to_end(&mut buf) {
    Err(_) => println!("Cannot read stding"),
    Ok(_) => {
      let actions: Vec<Action> = serde_json::from_slice(&buf).unwrap();
      println!("{}", serde_json::to_string_pretty(&actions).unwrap());
    }
  }
}