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; } } }
internal void Parse(BoundGotoStatement boundGotoStatement) { if (boundGotoStatement == null) { throw new ArgumentNullException(); } var sourceLabelSymbol = boundGotoStatement.Label as SourceLabelSymbol; if (sourceLabelSymbol != null) { var switchLabel = new SwitchLabel(); switchLabel.Parse(sourceLabelSymbol); this.Label = switchLabel; } else { var label = new Label(); label.Parse(boundGotoStatement.Label); this.Label = label; } }