Vixen
02b45cc4
csharp
public record class BoundSwitchSection

One case/default section: the values that select it and the statements it runs.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Sections do not fall through. Each is its own scope and its own block, so a trailing break is redundant rather than load-bearing — which is what lets lowering desugar the whole statement into an if/else chain.

Fields and properties (3)

  • public IReadOnlyList<BoundExpression> Labels

    The case values, converted to the governing type. Empty for default.

  • public bool IsDefault

    Whether this section carries the default label.

  • public IReadOnlyList<BoundStatement> Statements

    The section's body.

Methods (1)

  • public BoundSwitchSection(IReadOnlyList<BoundExpression> Labels, bool IsDefault, IReadOnlyList<BoundStatement> Statements)

    One case/default section: the values that select it and the statements it runs.

Used by (4)

  • BinderVixen.Raven
  • BoundSwitchStatementVixen.Raven
  • LowererVixen.Raven
  • StateVixen.Raven