tlang-runtime-compiler/TLang.Common/SimpleInstruction.cs

26 lines
476 B
C#

using System;
using System.IO;
using TLang.Common;
namespace TLang.BytecodeCompiler
{
public class SimpleInstruction : Instruction
{
public byte Value {get;set;}
public SimpleInstruction(byte value)
{
Value = value;
}
public override int CalculateLength()
{
return 1;
}
public override void WriteData(Stream strm)
{
strm.WriteByte(Value);
}
}
}