BindSwitchSection() private method

private BindSwitchSection ( SwitchSectionSyntax syntax, Symbol parent ) : BoundSwitchSection
syntax SwitchSectionSyntax
parent ShaderTools.Hlsl.Symbols.Symbol
return ShaderTools.Hlsl.Binding.BoundNodes.BoundSwitchSection
Exemplo n.º 1
0
        private BoundStatement BindSwitchStatement(SwitchStatementSyntax syntax, Symbol parent)
        {
            BindAttributes(syntax.Attributes);

            var switchBinder = new Binder(_sharedBinderState, this);
            var boundSections = syntax.Sections.Select(x => switchBinder.Bind(x, y => switchBinder.BindSwitchSection(y, parent))).ToImmutableArray();

            return new BoundSwitchStatement(
                Bind(syntax.Expression, BindExpression),
                boundSections);
        }
Exemplo n.º 2
0
        private BoundStatement BindSwitchStatement(SwitchStatementSyntax syntax, Symbol parent)
        {
            BindAttributes(syntax.Attributes);

            var switchBinder  = new Binder(_sharedBinderState, this);
            var boundSections = syntax.Sections.Select(x => switchBinder.Bind(x, y => switchBinder.BindSwitchSection(y, parent))).ToImmutableArray();

            return(new BoundSwitchStatement(
                       Bind(syntax.Expression, BindExpression),
                       boundSections));
        }