Struct StaticSemanticsOptions
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
DeadRangesImmutableArray<SourceRange>The source ranges of the
#If,#ElseIfand#Elsebranches 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.LanguageSupportedLanguageThe language the body is written in, which decides which statements exist at all - a bare
Printis 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
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
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
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
rangeSourceRangeWhere the node is written.