Add support for casting.

This commit is contained in:
2023-06-17 15:10:16 -07:00
parent b4ad24030f
commit 041c0a497e
15 changed files with 355 additions and 10 deletions

View File

@@ -17,7 +17,7 @@ fn main() {
let args = CommandLineArguments::parse();
let mut compiler = ngr::Compiler::default();
let output_file = args.output.unwrap_or("output.o".to_string());
let output_file = args.output.unwrap_or_else(|| "output.o".to_string());
if let Some(bytes) = compiler.compile(&args.file) {
std::fs::write(&output_file, bytes)