Table of Contents

Class BuiltInTypeExpressionNode

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

MS-VBAL §3.3.5.3 Special Identifier Forms, §5.6.16.7 Type Expressions
An ExpressionNode that is the name of an intrinsic type, written where an expression is: Long in TypeOf o Is Long, or in x = Long.

public sealed record BuiltInTypeExpressionNode : ExpressionNode, IEquatable<SyntaxNode>, IExecutableNode, IEquatable<ExpressionNode>, IEquatable<BuiltInTypeExpressionNode>
Inheritance
BuiltInTypeExpressionNode
Implements
Inherited Members
Extension Methods

Remarks

A BUILTIN-TYPE is a <type-expression>, and no value: MS-VBA refuses one wherever it is written in an expression, after TypeOf ... Is too (a syntax error, Excel-verified). The node keeps what was written so that the error can be reported where it is, rather than the name being dropped and the expression read as if it were not there.

👉 Object is no reserved-type-identifier: in an expression it is read as a name, as MS-VBA reads it, and is a SimpleNameExpressionNode. Date is a name too, the library's Date property.

Constructors

BuiltInTypeExpressionNode(SyntaxNodeId, SourceLocation, string, bool)

MS-VBAL §3.3.5.3 Special Identifier Forms, §5.6.16.7 Type Expressions
An ExpressionNode that is the name of an intrinsic type, written where an expression is: Long in TypeOf o Is Long, or in x = Long.

public BuiltInTypeExpressionNode(SyntaxNodeId Identity, SourceLocation Location, string TypeName, bool IsBracketed = false)

Parameters

Identity SyntaxNodeId

A unique identifier for this specific syntax node.

Location SourceLocation

The document location (Uri+Range) of the expression.

TypeName string

The name of the intrinsic type, without the brackets it may be written in.

IsBracketed bool

true when the name is written in square brackets ([Long]).

Remarks

A BUILTIN-TYPE is a <type-expression>, and no value: MS-VBA refuses one wherever it is written in an expression, after TypeOf ... Is too (a syntax error, Excel-verified). The node keeps what was written so that the error can be reported where it is, rather than the name being dropped and the expression read as if it were not there.

👉 Object is no reserved-type-identifier: in an expression it is read as a name, as MS-VBA reads it, and is a SimpleNameExpressionNode. Date is a name too, the library's Date property.

Properties

IsBracketed

true when the name is written in square brackets ([Long]).

public bool IsBracketed { get; init; }

Property Value

bool

TypeName

The name of the intrinsic type, without the brackets it may be written in.

public string TypeName { get; init; }

Property Value

string