Class CaseClauseStatementFact
A range clause of a Case (MS-VBAL 5.4.2.10), stated when its value is compared with the selector in the selector's declared type,
where the comparison of the two as an expression has another effective type (ComparedInSelectorType).
public sealed record CaseClauseStatementFact : StatementFact, IEquatable<StatementFact>, IEquatable<CaseClauseStatementFact>
- Inheritance
-
CaseClauseStatementFact
- Implements
- Inherited Members
Remarks
👉 Only the statements whose semantics establish something of their own state a fact: what most statements do is to convert and to operate, and those are facts of their own (ConversionFact, OperatorFact). One kind of statement is one derived record, so that a new kind does not grow the facts of every statement by a property. The run-time error a statement raises is a fact of the procedure's (Errors).
Constructors
CaseClauseStatementFact(SyntaxNodeId, SourceLocation, string, CaseClauseSemanticFlags, bool)
A range clause of a Case (MS-VBAL 5.4.2.10), stated when its value is compared with the selector in the selector's declared type,
where the comparison of the two as an expression has another effective type (ComparedInSelectorType).
public CaseClauseStatementFact(SyntaxNodeId Node, SourceLocation Location, string Statement, CaseClauseSemanticFlags Flags, bool IsValueKnown)
Parameters
NodeSyntaxNodeIdThe
Identityof the statement.LocationSourceLocationWhere in the document the statement is.
StatementstringThe keyword of the statement: one of the
Tokens.FlagsCaseClauseSemanticFlagsWhat is known of the clause: which form it takes, and how its value is compared with the selector.
IsValueKnownboolWhether the selector and the value of the clause are known, as opposed to values their types merely allow.
Remarks
👉 Only the statements whose semantics establish something of their own state a fact: what most statements do is to convert and to operate, and those are facts of their own (ConversionFact, OperatorFact). One kind of statement is one derived record, so that a new kind does not grow the facts of every statement by a property. The run-time error a statement raises is a fact of the procedure's (Errors).
Properties
Flags
What is known of the clause: which form it takes, and how its value is compared with the selector.
public CaseClauseSemanticFlags Flags { get; init; }
Property Value
IsValueKnown
Whether the selector and the value of the clause are known, as opposed to values their types merely allow.
public bool IsValueKnown { get; init; }