protected void EmitArgsThis(ZCMethodInfo zdesc, List <Exp> expArgs) { var paramArr = zdesc.ZParams; List <Exp> expArgsNew = CallAjuster.AdjustExps(paramArr, expArgs); EmitArgsExp(paramArr, expArgs.ToArray()); }
public ExpCallThis(ContextExp context, ZMethodCall expProcDesc, ZCMethodInfo searchedMethod, Exp srcExp, List <Exp> argExps) : base(context) { this.ExpProcDesc = expProcDesc; this.ZMethod = searchedMethod; this.SrcExp = srcExp; this.ArgExps = argExps; }
public ContextMethod(ContextClass classContext) : base(classContext) { ZCClassInfo cclass = this.ClassContext.GetZCompilingType(); ZMethodInfo = new ZCMethodInfo(cclass); cclass.AddMethod(ZMethodInfo); }
public override Exp Analy() { if (this.IsAnalyed) { return(this); } ZMethod = SearchZMethod(); RetType = ZMethod.RetZType; IsAnalyed = true; return(this); }
public override Exp Analy() { if (this.IsAnalyed) { return(this); } VarName = VarToken.Text; Method = SearchZMethod(VarName); RetType = Method.RetZType; IsAnalyed = true; return(this); }
private Exp SearchThis( ) { ZCMethodInfo[] descArray = this.ExpContext.ClassContext.SearchThisProc(CallDesc); if (descArray.Length == 0) { return(null); } else if (descArray.Length > 1) { Errorf(this.Position, "找到多个过程,不能确定是属于哪一个简略使用的类型的过程"); return(null); } else { ZCMethodInfo method = descArray[0]; ExpCallThis expCallThis = new ExpCallThis(this.ExpContext, CallDesc, method, this, ArgExps); return(expCallThis); } }
private void ImportZMethod(ZCMethodInfo zmethodInfo) { ImportZDesc(zmethodInfo.ZMethodDesc); }