Class TypeOfIsExpressionNode
- Namespace
- RDCore.SDK.Model.AST.Expressions
- Assembly
- RDCore.SDK.dll
MS-VBAL 5.6.7 TypeOf...Is Expressions — TypeOf <expr> Is <type-expression>,
testing whether Operand's run-time type is, or derives from, TypeExpression.
public record TypeOfIsExpressionNode : ExpressionNode, IEquatable<SyntaxNode>, IExecutableNode, IEquatable<ExpressionNode>, IEquatable<TypeOfIsExpressionNode>
- Inheritance
-
TypeOfIsExpressionNode
- Implements
- Inherited Members
Remarks
The grammar splits this construct across two alternatives to stay SLL: TypeOf <expr> parses
as its own typeofexpr alternative, and the trailing Is <type> as an ordinary IS
relational operator around it. The parse listener recognizes that pairing (a typeofexpr as the
left operand of an IS relational op) and builds this node for both together, instead of misreading
the construct as a plain object-identity Is comparison.
Constructors
TypeOfIsExpressionNode(SyntaxNodeId, SourceLocation, ExpressionNode, ExpressionNode)
MS-VBAL 5.6.7 TypeOf...Is Expressions — TypeOf <expr> Is <type-expression>,
testing whether Operand's run-time type is, or derives from, TypeExpression.
public TypeOfIsExpressionNode(SyntaxNodeId Identity, SourceLocation Location, ExpressionNode Operand, ExpressionNode TypeExpression)
Parameters
IdentitySyntaxNodeIdA unique identifier for this specific syntax node.
LocationSourceLocationThe document location (
Uri+Range) of the bound expression.OperandExpressionNodeThe expression whose run-time type is being tested.
TypeExpressionExpressionNodeThe expression naming the type being tested against.
Remarks
The grammar splits this construct across two alternatives to stay SLL: TypeOf <expr> parses
as its own typeofexpr alternative, and the trailing Is <type> as an ordinary IS
relational operator around it. The parse listener recognizes that pairing (a typeofexpr as the
left operand of an IS relational op) and builds this node for both together, instead of misreading
the construct as a plain object-identity Is comparison.
Properties
Operand
The expression whose run-time type is being tested.
public ExpressionNode Operand { get; init; }
Property Value
TypeExpression
The expression naming the type being tested against.
public ExpressionNode TypeExpression { get; init; }