2020-10-09 11:57:02 +01:00
|
|
|
use bitsy_parser::Game;
|
2020-04-19 07:34:11 +01:00
|
|
|
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() {
|
2020-07-01 16:23:28 +01:00
|
|
|
let input = env::args().nth(1).expect(SYNTAX_ERROR);
|
|
|
|
|
Game::from(fs::read_to_string(input).unwrap()).unwrap();
|
2020-04-19 07:34:11 +01:00
|
|
|
println!("OK!");
|
|
|
|
|
}
|