using System; using System.Collections.Generic; using System.Text; namespace Sunweaver.VM { public class BoolStack { Stack stack = new Stack(); public void Push(bool val) { stack.Push(val); } public bool Pop() { if (stack.Count > 0) return stack.Pop(); else return true; } public void Clear() { stack.Clear(); } public bool Peek() { if (stack.Count > 0) return stack.Peek(); else return true; } public long Count { get { return stack.Count; } } } }