mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 00:02:55 +00:00
ZoneCodeGenerator: Add bitwise and, or, xor operations
This commit is contained in:
parent
86f754bdd7
commit
49883bfce3
@ -17,8 +17,11 @@ namespace ZoneCodeGenerator.Domain.Evaluation
|
||||
BitwiseShift = 3,
|
||||
RelationalGreaterLessThan = 4,
|
||||
RelationalEquals = 5,
|
||||
LogicalAnd = 6,
|
||||
LogicalOr = 7
|
||||
BitwiseAnd = 6,
|
||||
BitwiseXor = 7,
|
||||
BitwiseOr = 8,
|
||||
LogicalAnd = 9,
|
||||
LogicalOr = 10
|
||||
}
|
||||
|
||||
public delegate int EvaluationFunction(int operand1, int operand2);
|
||||
@ -69,6 +72,24 @@ namespace ZoneCodeGenerator.Domain.Evaluation
|
||||
(operand1, operand2) => operand1 % operand2
|
||||
);
|
||||
|
||||
public static OperationType OperationBitwiseAnd = new OperationType(
|
||||
"&",
|
||||
OperationPrecedence.BitwiseAnd,
|
||||
(operand1, operand2) => operand1 & operand2
|
||||
);
|
||||
|
||||
public static OperationType OperationBitwiseXor = new OperationType(
|
||||
"^",
|
||||
OperationPrecedence.BitwiseXor,
|
||||
(operand1, operand2) => operand1 ^ operand2
|
||||
);
|
||||
|
||||
public static OperationType OperationBitwiseOr = new OperationType(
|
||||
"|",
|
||||
OperationPrecedence.BitwiseOr,
|
||||
(operand1, operand2) => operand1 | operand2
|
||||
);
|
||||
|
||||
public static OperationType OperationShiftLeft = new OperationType(
|
||||
"<<",
|
||||
OperationPrecedence.BitwiseShift,
|
||||
|
Loading…
x
Reference in New Issue
Block a user