protected virtual void VisitSwitchSection(BoundSwitchSection node) { foreach (var label in node.Labels) { VisitSwitchLabel(label); } foreach (var statement in node.Statements) { VisitStatement(statement); } }
internal void Parse(BoundSwitchSection boundSwitchSection) { base.Parse(boundSwitchSection); foreach (var boundSwitchLabel in boundSwitchSection.BoundSwitchLabels) { Debug.Assert(boundSwitchLabel.ExpressionOpt == null, "check it"); var sourceLabelSymbol = (boundSwitchLabel.Label as SourceLabelSymbol); if (sourceLabelSymbol != null) { var switchLabel = new SwitchLabel(); switchLabel.Parse(sourceLabelSymbol); this.Labels.Add(switchLabel); } } }
internal void Parse(BoundSwitchSection boundSwitchSection) { base.Parse(boundSwitchSection); foreach (var boundSwitchLabel in boundSwitchSection.SwitchLabels) { var labelSymbol = (boundSwitchLabel.Label as LabelSymbol); if (labelSymbol != null) { var switchLabel = new SwitchLabel(); switchLabel.Parse(labelSymbol); if (boundSwitchLabel.ConstantValueOpt != null) { switchLabel.Value = boundSwitchLabel.ConstantValueOpt; } this.Labels.Add(switchLabel); continue; } } }
public override BoundNode VisitSwitchSection(BoundSwitchSection node) { EnsureOnlyEvalStack(); // implicit control flow return base.VisitSwitchSection(node); }
private void EmitSwitchSection(BoundSwitchSection switchSection) { foreach (var boundSwitchLabel in switchSection.SwitchLabels) { _builder.MarkLabel(boundSwitchLabel.Label); } foreach (var statement in switchSection.Statements) { EmitStatement(statement); } }