Table of Contents

Class OperatorFact

Namespace
RDCore.SDK.Semantics.Facts
Assembly
RDCore.SDK.dll

An operation of an operator (MS-VBAL 5.6.9), as the language core states it.

public abstract record OperatorFact : IEquatable<OperatorFact>
Inheritance
OperatorFact
Implements
Derived
Inherited Members

Remarks

👉 One family of operators is one derived record, so that a new family does not grow the facts of every operation by a property. The conversions of the operands of the operation are facts of their own (ConversionFact), at OperatorOperand. A fact is only stated when it is true of the code: see ConversionFact.

Constructors

OperatorFact(SyntaxNodeId, SourceLocation, string, VBType?, bool, VBErrorInfo?)

An operation of an operator (MS-VBAL 5.6.9), as the language core states it.

protected OperatorFact(SyntaxNodeId Node, SourceLocation Location, string Operator, VBType? EffectiveType, bool IsValueKnown, VBErrorInfo? Error)

Parameters

Node SyntaxNodeId

The Identity of the syntax node the operation is evaluated for.

Location SourceLocation

Where in the document the operation is.

Operator string

The operator: one of the Tokens operators.

EffectiveType VBType

The effective type of the operation, if it has one.

IsValueKnown bool

Whether every operand of the operation is known, as opposed to a value its type merely allows.

Error VBErrorInfo

The run-time error the operation raises. Only stated when the operands are known, or when their types alone guarantee it.

Remarks

👉 One family of operators is one derived record, so that a new family does not grow the facts of every operation by a property. The conversions of the operands of the operation are facts of their own (ConversionFact), at OperatorOperand. A fact is only stated when it is true of the code: see ConversionFact.

Properties

EffectiveType

The effective type of the operation, if it has one.

public VBType? EffectiveType { get; init; }

Property Value

VBType

Error

The run-time error the operation raises. Only stated when the operands are known, or when their types alone guarantee it.

public VBErrorInfo? Error { get; init; }

Property Value

VBErrorInfo

IsValueKnown

Whether every operand of the operation is known, as opposed to a value its type merely allows.

public bool IsValueKnown { get; init; }

Property Value

bool

Location

Where in the document the operation is.

public SourceLocation Location { get; init; }

Property Value

SourceLocation

Node

The Identity of the syntax node the operation is evaluated for.

public SyntaxNodeId Node { get; init; }

Property Value

SyntaxNodeId

Operator

The operator: one of the Tokens operators.

public string Operator { get; init; }

Property Value

string