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); } }
public void ImportZCompiling(ZCClassInfo zclassype) { string zname = zclassype.ZTypeName; CompilingClassDict.Add(zname, zclassype); FileSegementer.AddWord(zname); ArgSegementer.AddWord(zname); }
private void ImportZDesc(ZCMethodDesc desc) { string[] strparts = desc.GetTextParts(); foreach (var item in strparts) { if (item.Length > 1) { FileSegementer.AddWord(item); } } }
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); } }
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); } } }
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); } }
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); } } }