Table of Contents

Class ParameterDeclarationNode

Namespace
RDCore.SDK.Model.AST.Declarations
Assembly
RDCore.SDK.dll

An AST node representing a parameter (child of a member node).

public record ParameterDeclarationNode : SyntaxNode, IEquatable<SyntaxNode>, IEquatable<ParameterDeclarationNode>
Inheritance
ParameterDeclarationNode
Implements
Inherited Members
Extension Methods

Constructors

ParameterDeclarationNode(SyntaxNodeId, SourceLocation, string, ParameterKind, bool, bool, ImmutableArray<SyntaxNode>, bool, string?, bool, SourceRange?)

An AST node representing a parameter (child of a member node).

public ParameterDeclarationNode(SyntaxNodeId Identity, SourceLocation Location, string Name, ParameterKind ParameterKind = ParameterKind.ImplicitByRef, bool IsOptional = false, bool IsParamArray = false, ImmutableArray<SyntaxNode> Children = default, bool IsArray = false, string? TypeHint = null, bool IsByRefIgnored = false, SourceRange? NameRange = null)

Parameters

Identity SyntaxNodeId

A unique identifier for this specific syntax node.

Location SourceLocation

The source location of this module; the SourceRange is invalid.

Name string

The declared identifier name of the member.

ParameterKind ParameterKind

The kind (ByRef/ByVal) of parameter.

IsOptional bool

An indicator that is true if the parameter is optional.

IsParamArray bool

An indicator that is true if the parameter is a parameter array.

Children ImmutableArray<SyntaxNode>

The nodes the declaration is made of, among them its As clause.

IsArray bool

An indicator that is true if the parameter is an array, which the parentheses after its name say: Items() As Long (MS-VBAL §5.3.1.5). What the parameter is an array of is its As clause's.

TypeHint string

The type hint the name is written with, if any (Name$), in place of an As clause.

IsByRefIgnored bool

true when ByRef is written on the value parameter of a Property Let or Property Set (MS-VBAL §5.3.1.7), where it has no effect: the parameter is passed by value whatever is written, so its ParameterKind is ImplicitByVal, and this is what remembers that the keyword is there.

NameRange SourceRange?

Where the name is written, with its type-declaration character; null when it is not known.

Properties

IsArray

An indicator that is true if the parameter is an array, which the parentheses after its name say: Items() As Long (MS-VBAL §5.3.1.5). What the parameter is an array of is its As clause's.

public bool IsArray { get; init; }

Property Value

bool

IsByRefIgnored

true when ByRef is written on the value parameter of a Property Let or Property Set (MS-VBAL §5.3.1.7), where it has no effect: the parameter is passed by value whatever is written, so its ParameterKind is ImplicitByVal, and this is what remembers that the keyword is there.

public bool IsByRefIgnored { get; init; }

Property Value

bool

IsOptional

An indicator that is true if the parameter is optional.

public bool IsOptional { get; init; }

Property Value

bool

IsParamArray

An indicator that is true if the parameter is a parameter array.

public bool IsParamArray { get; init; }

Property Value

bool

Location

The source location of this module; the SourceRange is invalid.

public SourceLocation Location { get; init; }

Property Value

SourceLocation

Name

The declared identifier name of the member.

public string Name { get; init; }

Property Value

string

NameRange

Where the name is written, with its type-declaration character; null when it is not known.

public SourceRange? NameRange { get; init; }

Property Value

SourceRange?

ParameterKind

The kind (ByRef/ByVal) of parameter.

public ParameterKind ParameterKind { get; init; }

Property Value

ParameterKind

TypeHint

The type hint the name is written with, if any (Name$), in place of an As clause.

public string? TypeHint { get; init; }

Property Value

string