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

26 lines
476 B
C#
Raw Permalink Normal View History

2023-07-29 00:11:09 +00:00
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);
}
}
}