diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-02-03 09:54:52 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-02-03 09:54:52 +0000 |
commit | 3c70ae2e26f654ce536f00fde8c159e4ebe6901a (patch) | |
tree | 89fe4c9e08b76f69d39f4a565848c4ba054b6da7 /src/bin/parse-rust.rs | |
parent | 6d9753bf548b22ab1a54462f72c9c0bf4ff69382 (diff) | |
parent | 9435ea4b8e990521ee7a6206b6106bb3ce392746 (diff) |
Merge #38
38: Move tools to a separate package r=matklad a=matklad
Diffstat (limited to 'src/bin/parse-rust.rs')
-rw-r--r-- | src/bin/parse-rust.rs | 20 |
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 @@ | |||
1 | extern crate libsyntax2; | ||
2 | |||
3 | use std::io::Read; | ||
4 | |||
5 | use libsyntax2::{parse, tokenize}; | ||
6 | use libsyntax2::utils::dump_tree; | ||
7 | |||
8 | fn 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 | |||
16 | fn read_input() -> String { | ||
17 | let mut buff = String::new(); | ||
18 | ::std::io::stdin().read_to_string(&mut buff).unwrap(); | ||
19 | buff | ||
20 | } | ||