Ejemplo n.º 1
0
 def checkMember(self, context, name):
     if "count"==name:
         return IntegerType.instance
     elif "keys"==name:
         return SetType(TextType.instance)
     elif "values"==name:
         return ListType(self.itemType)
     else:
         return super(DictType, self).checkMember(context, name)
Ejemplo n.º 2
0
 def checkMember(self, context, name):
     if "count" == name:
         return IntegerType.instance
     elif "keys" == name:
         return SetType(TextType.instance)
     elif "values" == name:
         return ListType(AnyType.instance)
     elif name == "text":
         return TextType.instance
     else:
         return AnyType.instance
Ejemplo n.º 3
0
 def __init__(self, itemType, items = None):
     from prompto.type.SetType import SetType
     super().__init__( SetType(itemType))
     self.items = items if items is not None else set()
Ejemplo n.º 4
0
 def check(self, context):
     if self.itemType is None:
         self.itemType = self.inferElementType(context)
     return SetType(self.itemType)
Ejemplo n.º 5
0
 def check(self, context):
     if self.itemType is None:
         self.itemType = inferElementType(context, self.expressions)
     return SetType(self.itemType)
Ejemplo n.º 6
0
 def check(self, context):
     from prompto.type.SetType import SetType
     return SetType(self.itemType)