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

26 lines
492 B
C#

using System.IO;
using TLang.Common;
namespace TLang.BytecodeCompiler
{
public class PushCharNode : Instruction
{
public char Text {get;set;}
public PushCharNode(char text)
{
Text = text;
}
public override int CalculateLength()
{
return 2;
}
public override void WriteData(Stream strm)
{
strm.WriteByte(PUSH_CHAR);
strm.WriteByte((byte)Text);
}
}
}