Table of Contents

Struct ModuleDirectives

Namespace
RDCore.SDK.Model.Symbols
Assembly
RDCore.SDK.dll

The resolved module-level directives a VBModuleSymbol was declared under — the Option ... statements (MS-VBAL §5.2.1) and Attribute VB_... declarations (MS-VBAL §4.2) a static-semantics pass needs to know about, plus RD-VBA's own annotation-driven dials (Option Strict).

public readonly record struct ModuleDirectives : IEquatable<ModuleDirectives>
Implements
Inherited Members

Remarks

Named Directives, not Options: MS-VBAL's own Option statements are only one source feeding this — Attribute declarations (VB_Name, VB_PredeclaredId, …) and RD-VBA annotations belong here too, as this grows one property at a time. A consumer that needs a new directive adds a property to this record; nothing that carries a ModuleDirectivesVBModuleSymbol, LexicalScope, StaticEvaluationContext — ever changes shape because of it.

Constructors

ModuleDirectives(bool, bool)

The resolved module-level directives a VBModuleSymbol was declared under — the Option ... statements (MS-VBAL §5.2.1) and Attribute VB_... declarations (MS-VBAL §4.2) a static-semantics pass needs to know about, plus RD-VBA's own annotation-driven dials (Option Strict).

public ModuleDirectives(bool Explicit = false, bool Strict = false)

Parameters

Explicit bool

Whether the module declares Option Explicit (MS-VBAL §5.2.1.3) — an unresolved SimpleName is a compile error under this module, not a deferred/inferred type.

Strict bool

Whether the module carries RD-VBA's '@OptionStrict annotation — turns select semantic flags that stay legal under plain Option Explicit into compile errors.

Remarks

Named Directives, not Options: MS-VBAL's own Option statements are only one source feeding this — Attribute declarations (VB_Name, VB_PredeclaredId, …) and RD-VBA annotations belong here too, as this grows one property at a time. A consumer that needs a new directive adds a property to this record; nothing that carries a ModuleDirectivesVBModuleSymbol, LexicalScope, StaticEvaluationContext — ever changes shape because of it.

Fields

None

The directives of a module that declares none of them explicitly.

public static readonly ModuleDirectives None

Field Value

ModuleDirectives

Properties

Explicit

Whether the module declares Option Explicit (MS-VBAL §5.2.1.3) — an unresolved SimpleName is a compile error under this module, not a deferred/inferred type.

public bool Explicit { get; init; }

Property Value

bool

Strict

Whether the module carries RD-VBA's '@OptionStrict annotation — turns select semantic flags that stay legal under plain Option Explicit into compile errors.

public bool Strict { get; init; }

Property Value

bool