extension_default = EXTENSIBILITY_IMPLIED | empty
# types
- defined_type = Unique(typereference) # todo: consider other defined types from 13.1
+ # todo: consider other defined types from 13.1
+ external_type_reference = module_reference + Suppress('.') + typereference
+ defined_type = external_type_reference | typereference
referenced_type = Unique(defined_type) # todo: consider other ref:d types from 16.3
# values
class ReferencedType(SemaNode):
def __init__(self, elements):
- self.type_name = elements[0]
+ # TODO: Module references are not resolved at the moment,
+ # and I'm not sure how to handle them.
+ if len(elements) > 1 and elements[0].ty == 'ModuleReference':
+ self.module_reference = elements[0].elements[0]
+ self.type_name = elements[1]
+ else:
+ self.module_reference = None
+ self.type_name = elements[0]
def reference_name(self):
return self.type_name