Class UnaryArithmeticOperatorStaticSemantics
Uses pattern-matching rules to encapsulate unary arithmetic operator static semantics as defined in MS-VBAL 5.6.9.3.
public record UnaryArithmeticOperatorStaticSemantics : StaticSemantics, IEquatable<StaticSemantics>, IStaticSemantics, IEquatable<UnaryArithmeticOperatorStaticSemantics>
- Inheritance
-
UnaryArithmeticOperatorStaticSemantics
- Implements
- Derived
- Inherited Members
Remarks
This is implicitly the specification for the unary '+' operator, which is omitted from MS-VBAL.
Methods
DetermineDeclaredType(ISymbolResolver, BoundExpression, params VBType[])
Determines a static VBType from specified operands.
public override StaticSemanticsEvaluationResult DetermineDeclaredType(ISymbolResolver resolver, BoundExpression expression, params VBType[] operandDeclaredTypes)
Parameters
resolverISymbolResolverThe static context containing the available static memory space.
expressionBoundExpressionThe expression node being evaluated.
operandDeclaredTypesVBType[]The declared type of each operand involved in the evaluation.
Returns
- StaticSemanticsEvaluationResult
A StaticSemanticsEvaluationResult encapsulating the resulting VBType if successful, or VBCompileErrorInfo error metadata otherwise.
DetermineOperatorStaticType(ISymbolResolver, BoundExpression, VBType)
MS-VBAL 5.6.9.3 Arithmetic Operators (static semantics) The operator has the declared type returned by this method, based on the declared type of its operands.
protected virtual StaticSemanticsEvaluationResult DetermineOperatorStaticType(ISymbolResolver resolver, BoundExpression expression, VBType operand)
Parameters
resolverISymbolResolverexpressionBoundExpressionThe expression node being evaluated.
operandVBTypeThe declared type of the operand.