C-minor v0.0

OperatorEvaluation.TryGetResultType Method

Assembly: Topten.Cminor.Compiler.dll
Namespace: Topten.Cminor
Declaring Type: OperatorEvaluation

Overloads

TryGetResultType(UnaryOperatorType, Type)

Give an operator and two operand types, work out the result type

TryGetResultType(BinaryOperatorType, Type, Type)

Give an operator and two operand types, work out the result type

TryGetResultType(UnaryOperatorType, Type)

Give an operator and two operand types, work out the result type

public static Type TryGetResultType(UnaryOperatorType op, Type a);

Remarks

Return typeof(void) if not supported

Parameters

UnaryOperatorType op

The operator

Type a

The first operand type

Returns

Type

Type.Null if unsupported operands

TryGetResultType(BinaryOperatorType, Type, Type)

Give an operator and two operand types, work out the result type

public static Type TryGetResultType(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