From 63c606d17095e336ee0deeedb30f94a490ec4059 Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 11 Oct 2024 08:25:31 +0530 Subject: add analysis phase --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 8f63ca2..193d725 100644 --- a/src/main.rs +++ b/src/main.rs @@ -73,8 +73,8 @@ fn try_consume_stdin() -> std::io::Result { fn main() { let cli: Cli = argh::from_env(); - tbsp::evaluate(&cli.file(), &cli.program(), cli.language()).unwrap_or_else(|e| { - eprintln!("{e:?}"); - std::process::exit(-1); - }); + if let Err(e) = tbsp::evaluate(&cli.file(), &cli.program(), cli.language()) { + eprintln!("{e}"); + std::process::exit(e.code()); + }; } -- cgit v1.2.3