ltcc: exit with error code when typecheck or compilation fails
This commit is contained in:
parent
b8535aa772
commit
5c2a610d31
1 changed files with 2 additions and 1 deletions
|
@ -73,7 +73,7 @@ fn main() {
|
||||||
|
|
||||||
eprintln!("----------------------------------");
|
eprintln!("----------------------------------");
|
||||||
eprintln!("{} ({} errors)", "Typecheck failed".bright_red().bold(), type_errs.len());
|
eprintln!("{} ({} errors)", "Typecheck failed".bright_red().bold(), type_errs.len());
|
||||||
return;
|
std::process::exit(-2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,6 +120,7 @@ fn main() {
|
||||||
);
|
);
|
||||||
|
|
||||||
eprintln!("=======\nParse Error: Abort\n");
|
eprintln!("=======\nParse Error: Abort\n");
|
||||||
|
std::process::exit(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue