Table of Contents

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

token string
identity SyntaxNodeId
location SourceLocation
left ExpressionNode
right ExpressionNode

VBBinaryOperatorExpressionNode(string, SyntaxNodeId, SourceLocation, ImmutableArray<SyntaxNode>)

public VBBinaryOperatorExpressionNode(string token, SyntaxNodeId identity, SourceLocation location, ImmutableArray<SyntaxNode> children)

Parameters

token string

The operator token (e.g. +, And).

identity SyntaxNodeId

A unique identifier for this specific syntax node.

location SourceLocation

The Location (holds the document Uri and a Range) of the bound expression.

children ImmutableArray<SyntaxNode>

The left and right operands, in that order.

Exceptions

ArgumentException

children is 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

ExpressionNode

Right

The right-hand side operand — Children[1].

public ExpressionNode Right { get; }

Property Value

ExpressionNode

Token

public string Token { get; }

Property Value

string

Methods

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool