예제 #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));
 }