2020-04-19 07:34:11 +01:00
|
|
|
extern crate bitsy_parser;
|
|
|
|
|
use bitsy_parser::game::Game;
|
|
|
|
|
use std::{env, fs};
|
|
|
|
|
|
2020-07-01 16:21:27 +01:00
|
|
|
const SYNTAX_ERROR: &str = "No input path specified. Usage: `bitsy-validate filepath`";
|
2020-04-19 07:34:11 +01:00
|
|
|
|
2020-07-01 16:21:27 +01:00
|
|
|
fn main() {
|
|
|
|
|
let input_file = env::args().nth(1).expect(SYNTAX_ERROR);
|
2020-04-19 07:34:11 +01:00
|
|
|
Game::from(fs::read_to_string(input_file).unwrap()).unwrap();
|
|
|
|
|
println!("OK!");
|
|
|
|
|
}
|