blob: 2d34952a343a0fffab177bfb339c9d040e925f82 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
use skaldpress::macro_processor::MacroProcessor;
use std::env;
use std::fs;
fn main() {
let args: Vec<String> = env::args().collect();
let input_file = match fs::read_to_string(&args[1]) {
Ok(x) => x,
Err(e) => {
println!("Could not read input-file \"{}\": {}", args[1], e);
std::process::exit(1);
}
};
let mut macro_processor = MacroProcessor::new();
match macro_processor.process_input(&input_file) {
Ok(out) => println!("{}", out),
Err(e) => println!("Error {}", e),
}
}
|