OperatorEvaluation.GetResultType Method
Assembly: Topten.Cminor.Compiler.dll
Namespace: Topten.Cminor
Declaring Type: OperatorEvaluation
Overloads
GetResultType(UnaryOperatorType, Type) | Give an operator and two operand types, work out the result type |
GetResultType(BinaryOperatorType, Type, Type) | Give an operator and two operand types, work out the result type |
GetResultType(UnaryOperatorType, Type)
Give an operator and two operand types, work out the result type
public static Type GetResultType(UnaryOperatorType op, Type a);
Remarks
Return typeof(void) if not supported
Parameters
UnaryOperatorType op | The operator |
Type a | The first operand type |
Returns
Type | The operator result type, throws an exception if not support |
GetResultType(BinaryOperatorType, Type, Type)
Give an operator and two operand types, work out the result type
public static Type GetResultType(BinaryOperatorType op, Type a, Type b);
Remarks
Return typeof(void) if not supported
Parameters
BinaryOperatorType op | The operator |
Type a | The first operand type |
Type b | The second operand type |
Returns
Type | Type.Null if the operands aren't supported |