mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-09-06 16:57:25 +00:00
ZoneCodeGenerator: Make static operands able to have the value of an enum entry
This commit is contained in:
@@ -9,6 +9,7 @@ namespace ZoneCodeGenerator.Domain.Evaluation
|
||||
class OperandStatic : IEvaluation
|
||||
{
|
||||
public int Value { get; }
|
||||
public EnumMember EnumMemberValue { get; }
|
||||
|
||||
public bool IsStatic => true;
|
||||
public int EvaluateNumeric()
|
||||
@@ -19,6 +20,13 @@ namespace ZoneCodeGenerator.Domain.Evaluation
|
||||
public OperandStatic(int value)
|
||||
{
|
||||
Value = value;
|
||||
EnumMemberValue = null;
|
||||
}
|
||||
|
||||
public OperandStatic(EnumMember enumMember)
|
||||
{
|
||||
Value = (int) enumMember.Value;
|
||||
EnumMemberValue = enumMember;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
Reference in New Issue
Block a user