Update homework 1 and 2

This commit is contained in:
Jeehoon Kang
2020-03-26 03:38:20 +09:00
parent 241a66fcc1
commit 8938a7ad8f
40 changed files with 5171 additions and 1504 deletions

View File

@@ -6,6 +6,7 @@ use clap::{crate_authors, crate_description, crate_version, App};
extern crate kecc;
use kecc::{Parse, Translate};
use std::path::Path;
fn main() {
let yaml = load_yaml!("fuzz_cli.yml");
@@ -20,7 +21,10 @@ fn main() {
let unit = ok_or_exit!(Parse::default().translate(&input), 1);
if matches.is_present("print") {
kecc::write_c_test(&unit);
return;
kecc::test_write_c(&unit, Path::new(&input));
}
if matches.is_present("irgen") {
kecc::test_irgen(&unit, Path::new(&input));
}
}