public static void EmitLoad(ILGenerator il, ZCPropertyInfo memberCompiling) { PropertyBuilder propertyBuilder = memberCompiling.PropertyBuilder; MethodInfo getMethod = propertyBuilder.GetGetMethod(); EmitHelper.CallDynamic(il, getMethod); }
public bool ContainsPropertyName(string name) { //return _properties.ContainsKey(name); ZCPropertyInfo zp = SelfCompilingType.SearchDeclaredZProperty(name); return(zp != null); }
public override Exp Analy() { if (this.IsAnalyed) { return(this); } VarName = VarToken.Text; PropertyCompiling = this.ProcContext.ClassContext.SeachZProperty(VarName); RetType = PropertyCompiling.ZPropertyType; IsAnalyed = true; return(this); }
public void AnalyName() { ZPropertyCompiling = new ZCPropertyInfo(); PropertyName = Raw.NameToken.Text; if (ClassContext.ContainsPropertyName(PropertyName))// (ParentProperties.dict.ContainsKey(PropertyName)) { this.ParentProperties.ASTClass.FileContext.Errorf(Raw.NameToken.Position, "'{0}'重复", PropertyName); IsExists = true; } else { //ParentProperties.dict.Add(PropertyName, Raw.NameToken); ZPropertyCompiling.ZPropertyZName = PropertyName; ClassContext.AddMember(ZPropertyCompiling); //AnalyType(); //PropertyItems.Add(name); } }
public void AddMember(ZCPropertyInfo zcp) { SelfCompilingType.AddProperty(zcp); }