1.1 --- a/micropython/report.py Sun Oct 13 19:23:39 2013 +0200
1.2 +++ b/micropython/report.py Sun Oct 13 19:44:51 2013 +0200
1.3 @@ -429,17 +429,26 @@
1.4 return values
1.5
1.6 def _attribute_value_to_name(self, attr, value, target=False):
1.7 - if value and not isinstance(value, Instance) and (not target or value.parent):
1.8 - fullname = target and value.parent and value.parent.full_name() or value.full_name()
1.9 - elif value and isinstance(value, Const) and not target:
1.10 - fullname = "%s" % value.get_value()
1.11 - elif attr:
1.12 - if isinstance(attr.parent, Instance):
1.13 - fullname = "%s%s" % (attr.parent_type.full_name(), not target and ".%s" % attr.name or "")
1.14 - else:
1.15 - fullname = "%s%s" % (attr.parent.full_name(), not target and ".%s" % attr.name or "")
1.16 + fullname = None
1.17 + if target:
1.18 + if attr:
1.19 + if isinstance(attr.parent, Instance):
1.20 + fullname = attr.parent_type.full_name()
1.21 + else:
1.22 + fullname = attr.parent.full_name()
1.23 + elif value and not isinstance(value, Instance) and value.parent:
1.24 + fullname = value.parent.full_name()
1.25 else:
1.26 - fullname = None
1.27 + if value and not isinstance(value, Instance):
1.28 + fullname = value.full_name()
1.29 + elif value and isinstance(value, Const):
1.30 + fullname = "%s" % value.get_value()
1.31 + elif attr:
1.32 + if isinstance(attr.parent, Instance):
1.33 + fullname = "%s.%s" % (attr.parent_type.full_name(), attr.name)
1.34 + else:
1.35 + fullname = "%s.%s" % (attr.parent.full_name(), attr.name)
1.36 +
1.37 return fullname
1.38
1.39 def _attributes_to_target_names(self, attributes):