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)