コード例 #1
0
ファイル: EnumAST.cs プロジェクト: pyzh/ZLanguage3
        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
ファイル: SectionEnum.cs プロジェクト: pyzh/ZCompileCore2
        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
ファイル: FileClass.cs プロジェクト: xonoer/ZCompileCore2
        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
ファイル: ClassAST.cs プロジェクト: pyzh/ZLanguage3
        //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);
        }