Esempio n. 1
0
        public void Import(ZLClassInfo zclassype)
        {
            string zname = zclassype.ZTypeName;

            ZLClassDict.Add(zname, zclassype);
            FileSegementer.AddWord(zname);
            ArgSegementer.AddWord(zname);

            foreach (ZLFieldInfo memberItem in zclassype.ZFields)
            {
                string[] itemNames = memberItem.GetZFieldZNames();
                foreach (var name in itemNames)
                {
                    //ZLPropertyDict.Add(name, memberItem);
                    FileSegementer.AddWord(name);
                }
            }

            foreach (ZLPropertyInfo memberItem in zclassype.ZPropertys)
            {
                string[] itemNames = memberItem.GetZPropertyZNames();
                foreach (var name in itemNames)
                {
                    //ZLPropertyDict.Add(name, memberItem);
                    FileSegementer.AddWord(name);
                }
            }

            foreach (ZLMethodInfo item in zclassype.ZMethods)
            {
                ImportMethod(item);
            }
        }
Esempio n. 2
0
        public void ImportZCompiling(ZCClassInfo zclassype)
        {
            string zname = zclassype.ZTypeName;

            CompilingClassDict.Add(zname, zclassype);
            FileSegementer.AddWord(zname);
            ArgSegementer.AddWord(zname);
        }
Esempio n. 3
0
        private void ImportZDesc(ZCMethodDesc desc)
        {
            string[] strparts = desc.GetTextParts();

            foreach (var item in strparts)
            {
                if (item.Length > 1)
                {
                    FileSegementer.AddWord(item);
                }
            }
        }
Esempio n. 4
0
 public void Import(ZLDimInfo zldim)
 {
     //AddZTypeWord(dtype);
     // ImportZDimItem(zldim);
     foreach (var dimName in zldim.Dims.Keys)
     {
         var dimType = zldim.Dims[dimName];
         ZLDimItemDict.Add(dimName, dimType);
         FileSegementer.AddWord(dimName);
         ArgSegementer.AddWord(dimName);
     }
 }
Esempio n. 5
0
        private void ImportMethodDesc(ZLMethodDesc desc)
        {
            string[] strparts = desc.GetTextParts();

            foreach (var item in strparts)
            {
                //if (item.Length > 1) //长度为1的也要添加
                {
                    FileSegementer.AddWord(item);
                    AddProcNamePart(item, desc);
                }
            }
        }
Esempio n. 6
0
        public void ImportStruct(ZCClassInfo zclassype)
        {
            /* Z语言程序生成的库没有field,所以不需要导入field */
            foreach (ZCPropertyInfo memberItem in zclassype.ZPropertys)
            {
                string[] itemNames = memberItem.GetZPropertyZNames();
                foreach (var name in itemNames)
                {
                    //ZLPropertyDict.Add(name, memberItem);
                    FileSegementer.AddWord(name);
                }
            }

            foreach (ZCMethodInfo item in zclassype.ZMethods)
            {
                ImportZMethod(item);
            }
        }
Esempio n. 7
0
        public void Import(ZLEnumInfo zlenum)
        {
            string zname = zlenum.ZTypeName;

            ZLEnumDict.Add(zname, zlenum);
            FileSegementer.AddWord(zname);
            ArgSegementer.AddWord(zname);

            foreach (ZLEnumItemInfo enumItem in zlenum.EnumElements)
            {
                string[] itemNames = enumItem.GetZNames();
                foreach (var name in itemNames)
                {
                    FileSegementer.AddWord(name);
                    ZLEnumItemDict.Add(name, enumItem);
                }
            }
        }