DotNetWebToolkit.Cil2Js.Ast.StmtBlock.StmtBlock C# (CSharp) Method

StmtBlock() public method

public StmtBlock ( Ctx ctx, IEnumerable statements ) : System
ctx Ctx
statements IEnumerable
return System
        public StmtBlock(Ctx ctx, IEnumerable<Stmt> statements)
            : base(ctx) {
            // Expand any nested blocks. Evaluate to array.
            this.Statements = statements.SelectMany(x => {
                if (x == null) {
                    return Enumerable.Empty<Stmt>();
                }
                if (x.StmtType == NodeType.Block) {
                    return ((StmtBlock)x).Statements;
                }
                return new[] { x };
            }).Where(x => x != null).ToArray();
        }

Same methods

StmtBlock::StmtBlock ( Ctx ctx ) : System
StmtBlock