Exemplo n.º 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;
     }
 }
Exemplo n.º 2
0
 public bool Accept(BaijiType type)
 {
     return(type.GetType() == typeof(BaseType));
 }
Exemplo n.º 3
0
 public bool Accept(BaijiType type)
 {
     return(type.GetType() == typeof(IdentifierType));
 }