public static bool IsFn(ZType ztype) { if (ztype == null) { throw new NullReferenceException(); } if (ztype is ZLType) { Type type = ((ZLType)ztype).SharpType; return(ZLambda.IsFn(type)); } return(false); }
protected void AnalyArgLambda(ZMethodDesc zdesc) { //ZMethodDesc zdesc = SearchedMethod.ZDesces[0]; for (int i = 0; i < ExpProcDesc.Args.Count; i++) { ZMethodArg procArg = zdesc.Args[i]; if (procArg is ZMethodNormalArg) { ZMethodNormalArg znarg = (procArg as ZMethodNormalArg); if (ZLambda.IsFn(znarg.ArgZType.SharpType)) { ZCallArg expArg = ExpProcDesc.Args[i]; Exp exp = expArg.Data as Exp; ExpNewLambda newLambdaExp = new ExpNewLambda(exp, znarg.ArgZType); newLambdaExp.SetContext(this.ExpContext); expArg.Data = newLambdaExp; newLambdaExp.Analy(); } } } }