use std::path::Path; fn main() { // read from input file: syntax "c_compiler [output.dsa]" let args: Vec = std::env::args().collect(); if args.len() < 2 { eprintln!("Usage: c_compiler [output.dsa]"); return; } let input_file = &args[1]; let output_file = if args.len() > 2 { &args[2] } else { "output.dsa" }; compiler::compile_file(Path::new(input_file), Path::new(output_file)).unwrap(); }