Пример #1
0
 private void FindDefNameByType(BaijiType type, out string structName)
 {
     structName = null;
     if (type.GetType() == typeof(BaseType))
     {
         return;
     }
     if (type.GetType() == typeof(ListType))
     {
         FindDefNameByType(((ListType)type).Type, out structName);
         return;
     }
     if (type.GetType() == typeof(MapType))
     {
         FindDefNameByType(((MapType)type).ValueType, out structName);
         return;
     }
     if (type.GetType() == typeof(IdentifierType))
     {
         structName = ((IdentifierType)type).Name;
         return;
     }
 }
Пример #2
0
 public bool Accept(BaijiType type)
 {
     return(type.GetType() == typeof(BaseType));
 }
Пример #3
0
 public bool Accept(BaijiType type)
 {
     return(type.GetType() == typeof(IdentifierType));
 }