using System; using System.IO; using TLang.Common; namespace TLang.Common { public class PushClosureNode : Instruction { public int Value {get;set;} public PushClosureNode(int i) { Value = i; } public override int CalculateLength() { return 5; } public override void WriteData(Stream strm) { strm.WriteByte(PUSH_CLOSURE); var data=BitConverter.GetBytes(Value); if(BitConverter.IsLittleEndian) Array.Reverse(data); strm.Write(data,0,data.Length); } } }