IronPython.Compiler.Ast.TupleExpression.Reduce C# (CSharp) Method

Reduce() public method

public Reduce ( ) : Expression
return System.Linq.Expressions.Expression
        public override MSAst.Expression Reduce() {
            if (_expandable) {
                return Ast.NewArrayInit(
                    typeof(object),
                    ToObjectArray(Items)
                );
            }

            if (Items.Count == 0) {
                return Ast.Field(
                    null,
                    typeof(PythonOps).GetField("EmptyTuple")
                );
            }

            return Ast.Call(
                AstMethods.MakeTuple,
                Ast.NewArrayInit(
                    typeof(object),
                    ToObjectArray(Items)
                )
            );
        }