Ejemplo n.º 1
0
 public void EmitNames()
 {
     for (int i = 0; i < PropertyASTList.Count; i++)
     {
         PropertyAST propertyAST = PropertyASTList[i];
         propertyAST.EmitName();
     }
 }
Ejemplo n.º 2
0
 public void AnalyTypes()
 {
     dict.Clear();
     for (int i = 0; i < PropertyASTList.Count; i++)
     {
         PropertyAST propertyAST = PropertyASTList[i];
         propertyAST.AnalyType();
     }
 }
Ejemplo n.º 3
0
        public SectionPropertiesDim(DimAST dimAST, SectionPropertiesRaw raw)
        {
            this.dimAST = dimAST;
            Raw         = raw;

            for (int i = 0; i < Raw.Properties.Count; i++)
            {
                PropertyASTRaw propertyRaw = Raw.Properties[i];
                PropertyAST    propertyAST = new PropertyAST(propertyRaw, this);
                PropertyASTList.Add(propertyAST);
            }
        }
Ejemplo n.º 4
0
        public void EmitBodys()
        {
            TypeBuilder dimBuilder = this.dimAST.DimBuilder;

            constructorBuilder = dimBuilder.DefineConstructor(
                MethodAttributes.Private | MethodAttributes.Static, CallingConventions.Standard, new Type[] { });
            ILGenerator IL = constructorBuilder.GetILGenerator();

            //foreach (var item in DimItems)
            //{
            //    //item.Emit(Builder, IL);
            //    FieldAttributes fieldAttr = FieldAttributes.Private | FieldAttributes.Static | FieldAttributes.InitOnly;
            //    var fieldBuilder = dimBuilder.DefineField(item.DimName, typeof(string), fieldAttr);
            //    EmitHelper.LoadString(IL, item.DimType);
            //    EmitHelper.StormField(IL, fieldBuilder);
            //}
            for (int i = 0; i < PropertyASTList.Count; i++)
            {
                PropertyAST propertyAST = PropertyASTList[i];
                propertyAST.EmitBody();
            }
            IL.Emit(OpCodes.Ret);
        }
Ejemplo n.º 5
0
 public void AddProperty(PropertyAST property)
 {
     Properties.Add(property);
 }