Flee
This commit is contained in:
24
ExpressionElements/Literals/Char.cs
Normal file
24
ExpressionElements/Literals/Char.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Flee.ExpressionElements.Base.Literals;
|
||||
|
||||
using Flee.InternalTypes;
|
||||
|
||||
|
||||
namespace Flee.ExpressionElements.Literals
|
||||
{
|
||||
internal class CharLiteralElement : LiteralElement
|
||||
{
|
||||
private readonly char _myValue;
|
||||
public CharLiteralElement(char value)
|
||||
{
|
||||
_myValue = value;
|
||||
}
|
||||
|
||||
public override void Emit(FleeILGenerator ilg, IServiceProvider services)
|
||||
{
|
||||
int intValue = Convert.ToInt32(_myValue);
|
||||
EmitLoad(intValue, ilg);
|
||||
}
|
||||
|
||||
public override System.Type ResultType => typeof(char);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user