public override Expression Reduce() { var ci = 0; Arguments.ForEach(arg => arg.Index = ci++); var realBody = new List <Expression>(((BlockExpression)Body).Body); if (Name == "new") { realBody.Add(Return(new List <FunctionArgument> { new FunctionArgument(null, Variable(Constant("self"))) })); } realBody.Add(Label(KumaParser.ReturnTarget, Constant(null, typeof(object)))); return(Operation.SingletonDefine(typeof(KumaFunction), Constant(Singleton), Constant(Name), Constant(Arguments), Constant(KumaParser.CreateBlock(realBody)), Constant(Scope))); }