blob: 563ea92f6a5132dbab37db80438ed9a882cd8446 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
extern crate libsyntax2;
use std::io::Read;
use libsyntax2::{
parse, utils::dump_tree_green
};
fn main() {
let text = read_input();
let file = parse(text);
let tree = dump_tree_green(&file);
println!("{}", tree);
}
fn read_input() -> String {
let mut buff = String::new();
::std::io::stdin().read_to_string(&mut buff).unwrap();
buff
}
|