Class VBBinaryOperatorExpressionNode
- Namespace
- RDCore.SDK.Model.AST.Expressions
- Assembly
- RDCore.SDK.dll
An infix VBOperatorExpression (bound) that accepts a left and a right operand on either of its sides.
public record VBBinaryOperatorExpressionNode : VBOperatorExpression, IEquatable<SyntaxNode>, IExecutableNode, IEquatable<ExpressionNode>, IEquatable<VBOperatorExpression>, IEquatable<VBBinaryOperatorExpressionNode>
- Inheritance
-
VBBinaryOperatorExpressionNode
- Implements
- Inherited Members
Remarks
Unless specified otherwise in a derived node type, MS-VBAL 5.6.9 Operator Expressions defines the static and run-time semantics of this node.
Constructors
VBBinaryOperatorExpressionNode(string, SyntaxNodeId, SourceLocation, ExpressionNode, ExpressionNode)
Deserialization path: Left/Right are what the JSON actually carries now (see
SyntaxNodeJson) — Children is redundant with them and gets omitted on write, so it
can't be relied on to arrive from the wire.
[JsonConstructor]
public VBBinaryOperatorExpressionNode(string token, SyntaxNodeId identity, SourceLocation location, ExpressionNode left, ExpressionNode right)
Parameters
tokenstringidentitySyntaxNodeIdlocationSourceLocationleftExpressionNoderightExpressionNode
VBBinaryOperatorExpressionNode(string, SyntaxNodeId, SourceLocation, ImmutableArray<SyntaxNode>)
public VBBinaryOperatorExpressionNode(string token, SyntaxNodeId identity, SourceLocation location, ImmutableArray<SyntaxNode> children)
Parameters
tokenstringThe operator token (e.g.
+,And).identitySyntaxNodeIdA unique identifier for this specific syntax node.
locationSourceLocationThe
Location(holds the documentUriand aRange) of the bound expression.childrenImmutableArray<SyntaxNode>The left and right operands, in that order.
Exceptions
- ArgumentException
childrenis not exactly two ExpressionNode operands — the grammar guarantees a binary operator has two, so this signals a parse-listener desync.
Properties
Left
The left-hand side operand — Children[0].
public ExpressionNode Left { get; }
Property Value
Right
The right-hand side operand — Children[1].
public ExpressionNode Right { get; }
Property Value
Token
public string Token { get; }
Property Value
Methods
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder