ShaderTools.Hlsl.Binding.Binder.BindSwitchLabel C# (CSharp) Method

BindSwitchLabel() private method

private BindSwitchLabel ( SwitchLabelSyntax syntax ) : BoundSwitchLabel
syntax ShaderTools.Hlsl.Syntax.SwitchLabelSyntax
return ShaderTools.Hlsl.Binding.BoundNodes.BoundSwitchLabel
        private BoundSwitchLabel BindSwitchLabel(SwitchLabelSyntax syntax)
        {
            BoundExpression boundExpression;
            switch (syntax.Kind)
            {
                case SyntaxKind.CaseSwitchLabel:
                    var caseSwitchLabel = (CaseSwitchLabelSyntax) syntax;
                    boundExpression = Bind(caseSwitchLabel.Value, BindExpression);
                    break;
                case SyntaxKind.DefaultSwitchLabel:
                    boundExpression = null;
                    break;
                default:
                    throw new InvalidOperationException();
            }
            return new BoundSwitchLabel(boundExpression);
        }