From 66fd6e3beb0231eef7a5981049b8a23ebc5e267e Mon Sep 17 00:00:00 2001 From: nub31 Date: Sun, 11 May 2025 18:15:29 +0200 Subject: [PATCH] ... --- example/program.nub | 3 ++- src/compiler/Nub.Lang/Backend/Generator.cs | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/example/program.nub b/example/program.nub index a963944..5dd006a 100644 --- a/example/program.nub +++ b/example/program.nub @@ -6,6 +6,7 @@ global func main() { } while 1 == 1 { - puts("loop"); + puts("test"); + break; } } \ No newline at end of file diff --git a/src/compiler/Nub.Lang/Backend/Generator.cs b/src/compiler/Nub.Lang/Backend/Generator.cs index c90087b..5b73c77 100644 --- a/src/compiler/Nub.Lang/Backend/Generator.cs +++ b/src/compiler/Nub.Lang/Backend/Generator.cs @@ -549,10 +549,8 @@ public class Generator { return bool.Parse(literal.Literal) ? "1" : "0"; } - else - { - throw new NotImplementedException(); - } + + throw new NotSupportedException($"Literal {literal.LiteralType} is not supported"); } private string GenerateStructInitializer(StructInitializerNode structInitializer)