Table of Contents

Struct StaticSemanticsOptions

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

What the build and the language a body is analyzed for decide about which of its statements the static pass looks at, and which it rejects.

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

Constructors

StaticSemanticsOptions(ImmutableArray<SourceRange>, SupportedLanguage?)

What the build and the language a body is analyzed for decide about which of its statements the static pass looks at, and which it rejects.

public StaticSemanticsOptions(ImmutableArray<SourceRange> DeadRanges = default, SupportedLanguage? Language = null)

Parameters

DeadRanges ImmutableArray<SourceRange>

The source ranges of the #If, #ElseIf and #Else branches that are excluded, which MS-VBAL §3.4.2 logically removes before the rest of the language sees them: a statement or a label inside one is not analyzed, and defines nothing. The default is no conditional compilation.

Language SupportedLanguage

The language the body is written in, which decides which statements exist at all - a bare Print is a statement of a BASIC and of no other language. null - the default - states no language, and so applies no language's rules.

Properties

Dead

DeadRanges, never the default (uninitialized) array.

public ImmutableArray<SourceRange> Dead { get; }

Property Value

ImmutableArray<SourceRange>

DeadRanges

The source ranges of the #If, #ElseIf and #Else branches that are excluded, which MS-VBAL §3.4.2 logically removes before the rest of the language sees them: a statement or a label inside one is not analyzed, and defines nothing. The default is no conditional compilation.

public ImmutableArray<SourceRange> DeadRanges { get; init; }

Property Value

ImmutableArray<SourceRange>

Language

The language the body is written in, which decides which statements exist at all - a bare Print is a statement of a BASIC and of no other language. null - the default - states no language, and so applies no language's rules.

public SupportedLanguage? Language { get; init; }

Property Value

SupportedLanguage

Methods

IsDead(SourceRange)

Whether a node written at range is inside a branch that is excluded, at any depth.

public bool IsDead(SourceRange range)

Parameters

range SourceRange

Where the node is written.

Returns

bool