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

26 lines
492 B
C#
Raw Permalink Normal View History

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