aboutsummaryrefslogtreecommitdiff
path: root/src/bin/parse-rust.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/parse-rust.rs')
-rw-r--r--src/bin/parse-rust.rs20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/bin/parse-rust.rs b/src/bin/parse-rust.rs
deleted file mode 100644
index af1325bfc..000000000
--- a/src/bin/parse-rust.rs
+++ /dev/null
@@ -1,20 +0,0 @@
1extern crate libsyntax2;
2
3use std::io::Read;
4
5use libsyntax2::{parse, tokenize};
6use libsyntax2::utils::dump_tree;
7
8fn main() {
9 let text = read_input();
10 let tokens = tokenize(&text);
11 let file = parse(text, &tokens);
12 let tree = dump_tree(&file);
13 println!("{}", tree);
14}
15
16fn read_input() -> String {
17 let mut buff = String::new();
18 ::std::io::stdin().read_to_string(&mut buff).unwrap();
19 buff
20}