From f9a7b4d2de3c92b27d57b782c5f7dca032995857 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Fri, 30 Aug 2024 14:01:43 +0200 Subject: [PATCH] minifixes --- src/main.rs | 3 +++ std.spl | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 14f1349..63379c5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,6 +22,9 @@ fn main() { } println!("Embedding source..."); } + else { + builder.set_name(file[..file.rfind('.').unwrap_or(file.len())].to_owned()); + } builder.add_source(file.to_owned(), data.to_owned()); if build_only { println!("Preparing rust code..."); diff --git a/std.spl b/std.spl index ac1986b..3301255 100644 --- a/std.spl +++ b/std.spl @@ -472,8 +472,7 @@ func call-main-on-file { | with file ; "@" file concat import update-types argv main exit - } - { with err ; + } { with err ; err:message dup null eq if { pop "Uncaught error."