Sun, 27 Jan 2019 03:56:51 +0400
Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
parent
a8873e848f
commit
28bfd3a7ba
@ -5,6 +5,9 @@ use std::path::Path;
|
|||||||
extern crate clap;
|
extern crate clap;
|
||||||
use clap::{load_yaml, App};
|
use clap::{load_yaml, App};
|
||||||
|
|
||||||
|
extern crate rustc_serialize;
|
||||||
|
use rustc_serialize::json;
|
||||||
|
|
||||||
mod parser;
|
mod parser;
|
||||||
use parser::*;
|
use parser::*;
|
||||||
|
|
||||||
@ -18,6 +21,7 @@ fn main() {
|
|||||||
true => {
|
true => {
|
||||||
let file: File = File::open(path).unwrap();
|
let file: File = File::open(path).unwrap();
|
||||||
let data: ParserResult = parse(BufReader::new(file));
|
let data: ParserResult = parse(BufReader::new(file));
|
||||||
|
println!("{}", json::as_pretty_json(&data));
|
||||||
}
|
}
|
||||||
_ => panic!("Error File!"),
|
_ => panic!("Error File!"),
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user