示例#1
0
        public ZLEnumInfo CreateZType()
        {
            var        EmitedType = EnumTypeBuilder.CreateType();
            ZLEnumInfo ztype      = ZTypeManager.GetByMarkType(EmitedType) as ZLEnumInfo;

            return(ztype);
        }
示例#2
0
 public ZDimType GetCreatedZType()
 {
     if (EmitedZType == null)
     {
         Type type = this.Builder.CreateType();
         EmitedZType = ZTypeManager.GetByMarkType(type) as ZDimType;
     }
     return(EmitedZType);
 }
示例#3
0
        public ZType Compile(ModuleBuilder moduleBuilder, string packageName)
        {
            AnalyName();
            EmitName(moduleBuilder, packageName);
            AnalyBody();
            EmitBody();
            var   EmitedType = Builder.CreateType();
            ZType ztype      = ZTypeManager.GetByMarkType(EmitedType) as ZType;

            return(ztype);
        }
示例#4
0
        public void CreateZType()
        {
            ProjectCompileResult compileResult = this.ProjectContext.CompileResult;

            if (!HasError())
            {
                Type       type  = this.ClassSection.Builder.CreateType();
                IZDescType ztype = ZTypeManager.GetByMarkType(type);
                this.FileContext.EmitedZClass = ztype as ZType;
                this.ProjectContext.CompileResult.CompiledTypes.Add(ztype);
            }
        }
示例#5
0
        //public void EmitBody()
        //{
        //    if (Properties != null)
        //    {
        //        Properties.EmitBodys();
        //    }
        //    foreach (ProcConstructorBase item in Constructors)
        //    {
        //        item.EmitBody();
        //    }
        //    foreach (ProcMethod item in Methods)
        //    {
        //        item.EmitBody();
        //    }
        //}

        public ZLClassInfo CreateZType()
        {
            if (!HasError())
            {
                Type        type       = this.ClassContext.GetTypeBuilder().CreateType();
                var         ztype      = ZTypeManager.GetByMarkType(type);
                ZLClassInfo zclasstype = (ZLClassInfo)ztype;
                this.FileContext.EmitedIZDescType = zclasstype;
                return(zclasstype);
            }
            return(null);
        }