use std::env;
use neutron_engine::parse_neutron_file;
use neutron_engine::iris;

fn main() {
    let args: Vec<String> = env::args().collect();
    
    if args.len() < 2 {
        println!("Usage: neutron-engine <file>");
        println!("  .nt  -> Parse Neutron markup");
        println!("  .iris -> Run Iris script");
        return;
    }
    
    let path = &args[1];
    
    if path.ends_with(".iris") {
        println!("--- Iris Engine Booting ---");
        match iris::run_file(path) {
            Ok(_) => println!("--- Iris Execution Complete ---"),
            Err(e) => eprintln!("[ERROR] {}", e),
        }
    } else if path.ends_with(".nt") {
        parse_neutron_file(path);
    } else {
        eprintln!("Unknown file extension. Use .nt or .iris");
    }
}
