From bef91ed928e757d908d5417554f409353efcfbdd Mon Sep 17 00:00:00 2001 From: Qrakhen Date: Thu, 4 Dec 2025 00:58:36 +0100 Subject: [PATCH] fix while --- Qrakhen.Qamp.Core/Compilation/Digester.cs | 1 - Qrakhen.Qamp.Core/Values/Objects/Obj.cs | 5 +++++ Qrakhen.Qamp.Core/Values/Value.cs | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Qrakhen.Qamp.Core/Compilation/Digester.cs b/Qrakhen.Qamp.Core/Compilation/Digester.cs index 790d26b..36cad0e 100644 --- a/Qrakhen.Qamp.Core/Compilation/Digester.cs +++ b/Qrakhen.Qamp.Core/Compilation/Digester.cs @@ -386,7 +386,6 @@ public class Digester : ISteppable ParseExpression(); Consume(T.GroupClose, "Expected while condition to be placed inside parentheses. Missing ')'.", false); long exit = EmitJump(Op.JumpIfFalse); - Emit(Op.Pop); Statement(); EmitLoop(start); PatchJump(exit); diff --git a/Qrakhen.Qamp.Core/Values/Objects/Obj.cs b/Qrakhen.Qamp.Core/Values/Objects/Obj.cs index 8a7fb46..ce37a71 100644 --- a/Qrakhen.Qamp.Core/Values/Objects/Obj.cs +++ b/Qrakhen.Qamp.Core/Values/Objects/Obj.cs @@ -15,4 +15,9 @@ public class Obj(ValueType type) : IValue } public override string ToString() => "Obj"; + + static Obj() + { + + } } diff --git a/Qrakhen.Qamp.Core/Values/Value.cs b/Qrakhen.Qamp.Core/Values/Value.cs index ab05c32..abac6d0 100644 --- a/Qrakhen.Qamp.Core/Values/Value.cs +++ b/Qrakhen.Qamp.Core/Values/Value.cs @@ -9,7 +9,7 @@ namespace Qrakhen.Qamp.Core.Values; public interface IValue { - ValueType ValueType { get; } + T ValueType { get; } } [StructLayout(LayoutKind.Explicit, Size = 0x10)]