Table of Contents

Class ReservedNameStaticSemantics

Namespace
RDCore.SDK.Semantics.Static
Assembly
RDCore.SDK.dll

The functions of the standard library whose names are reserved names (MS-VBAL §3.3.5.2), which MS-VBA parses with the arguments they take: Abs, Fix, Int, Sgn, Len, LenB, the conversion functions, and String.

public static class ReservedNameStaticSemantics
Inheritance
ReservedNameStaticSemantics
Inherited Members

Remarks

MS-VBAL §3.3.5.2 says a reserved name is used "as if it was a normal program defined entity", and is silent about one written without its arguments. MS-VBA refuses it as a syntax error (recorded in Excel): Len, Len(), Abs(1, 2) and String(2) are each "Syntax error" - and not "Argument not optional", which a function of the library that has no reserved name (CDec()) is.

A name qualified by its library (VBA.Len) is a member like any other, and a named argument is left to the rules of arguments.

Methods

CallError(IndexExpressionNode)

The syntax error of a call of a reserved-name function with other than the arguments it takes, or null.

public static VBCompileErrorInfo? CallError(IndexExpressionNode call)

Parameters

call IndexExpressionNode

An index expression: the call, when its callee is one of the functions.

Returns

VBCompileErrorInfo

CheckSyntax(ModuleNode)

The syntax errors of the reserved-name functions a module names without an argument list: one for each.

public static ImmutableArray<VBCompileErrorInfo> CheckSyntax(ModuleNode module)

Parameters

module ModuleNode

The parsed module.

Returns

ImmutableArray<VBCompileErrorInfo>

IsReservedName(string)

Whether name is the name of one of the reserved-name functions, which MS-VBA parses with the arguments it takes.

public static bool IsReservedName(string name)

Parameters

name string

A name, as written.

Returns

bool