aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
blob: 5b35f4ac69489b04eb78188437645766c2a3f960 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use std::fs::File;
use std::io::BufReader;
use std::path::Path;

extern crate clap;
use clap::{load_yaml, App};

mod parser;
use parser::*;

fn main() {
	let yaml = load_yaml!("cli/ru.yml");
	let matches = App::from_yaml(yaml).get_matches();

	let path = matches.value_of("FILE").unwrap();

	match Path::new(path).exists() {
		true => {
			let file: File = File::open(path).unwrap();
			let data: ParserResult = parse(BufReader::new(file));
		}
		_ => panic!("Error File!"),
	};
}