Beispiel #1
0
        public static void EmitLoad(ILGenerator il, ZCPropertyInfo memberCompiling)
        {
            PropertyBuilder propertyBuilder = memberCompiling.PropertyBuilder;
            MethodInfo      getMethod       = propertyBuilder.GetGetMethod();

            EmitHelper.CallDynamic(il, getMethod);
        }
Beispiel #2
0
        public bool ContainsPropertyName(string name)
        {
            //return _properties.ContainsKey(name);
            ZCPropertyInfo zp = SelfCompilingType.SearchDeclaredZProperty(name);

            return(zp != null);
        }
Beispiel #3
0
 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);
 }
Beispiel #4
0
 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);
     }
 }
Beispiel #5
0
 public void AddMember(ZCPropertyInfo zcp)
 {
     SelfCompilingType.AddProperty(zcp);
 }