Reid/src/main.rs

17 lines
363 B
Rust
Raw Normal View History

2020-06-21 00:21:24 +02:00
mod errors;
mod file_io;
mod parser;
use file_io::open_file;
use parser::{ParsedReid, Parser};
use std::path::Path;
2020-06-18 17:06:57 +02:00
fn main() {
2020-06-21 00:21:24 +02:00
let path = Path::new("reid_src/test.reid");
let reid = Parser::from(open_file(&path).ok().unwrap()).parse();
2020-06-21 00:37:56 +02:00
if let Err(error) = reid {
eprintln!("Syntax error: {}", error);
std::process::exit(1);
}
2020-06-18 17:06:57 +02:00
}