public override BoundNode VisitSwitchSection(BoundSwitchSection node) { AddAll(node.Locals); base.VisitSwitchSection(node); RemoveAll(node.Locals); return(null); }
protected override void VisitSwitchSection(BoundSwitchSection node, bool isLastSection) { foreach (var label in node.SwitchLabels) { NoteDeclaredPatternVariables(label.Pattern); } base.VisitSwitchSection(node, isLastSection); }
protected virtual void VisitSwitchSection(BoundSwitchSection node, bool isLastSection) { SetState(UnreachableState()); foreach (var label in node.SwitchLabels) { VisitLabel(label.Label, node); } VisitStatementList(node); }
protected override void VisitSwitchSection(BoundSwitchSection node, bool isLastSection) { base.VisitSwitchSection(node, isLastSection); // Check for switch section fall through error if (this.State.Alive) { var syntax = node.SwitchLabels.Last().Pattern.Syntax; Diagnostics.Add(isLastSection ? ErrorCode.ERR_SwitchFallOut : ErrorCode.ERR_SwitchFallThrough, new SourceLocation(syntax), syntax.ToString()); } }