BindStatement() private method

private BindStatement ( StatementSyntax syntax, Symbol parent ) : BoundStatement
syntax ShaderTools.Hlsl.Syntax.StatementSyntax
parent ShaderTools.Hlsl.Symbols.Symbol
return ShaderTools.Hlsl.Binding.BoundNodes.BoundStatement
Exemplo n.º 1
0
        private BoundForStatement BindForStatement(ForStatementSyntax syntax, Symbol parent)
        {
            BindAttributes(syntax.Attributes);

            var forStatementBinder = new Binder(_sharedBinderState, this);

            // Note that we bind declarations in the current scope, not the for statement scope.

            return new BoundForStatement(
                syntax.Declaration != null ? Bind(syntax.Declaration, x => BindForStatementDeclaration(x, parent)) : null,
                syntax.Initializer != null ? forStatementBinder.Bind(syntax.Initializer, forStatementBinder.BindExpression) : null,
                forStatementBinder.Bind(syntax.Condition, forStatementBinder.BindExpression),
                syntax.Incrementor != null ? forStatementBinder.Bind(syntax.Incrementor, forStatementBinder.BindExpression) : null,
                forStatementBinder.Bind(syntax.Statement, x => forStatementBinder.BindStatement(x, parent)));
        }
Exemplo n.º 2
0
 private BoundBlock BindBlock(BlockSyntax syntax, Symbol parent)
 {
     var blockBinder = new Binder(_sharedBinderState, this);
     return new BoundBlock(syntax.Statements.Select(x => blockBinder.Bind(x, y => blockBinder.BindStatement(y, parent))).ToImmutableArray());
 }
Exemplo n.º 3
0
        private BoundBlock BindBlock(BlockSyntax syntax, Symbol parent)
        {
            var blockBinder = new Binder(_sharedBinderState, this);

            return(new BoundBlock(syntax.Statements.Select(x => blockBinder.Bind(x, y => blockBinder.BindStatement(y, parent))).ToImmutableArray()));
        }