1.1 --- a/generator.py Mon Dec 05 16:03:06 2016 +0100
1.2 +++ b/generator.py Mon Dec 05 17:18:34 2016 +0100
1.3 @@ -29,7 +29,8 @@
1.4 encode_path, \
1.5 encode_predefined_reference, encode_size, \
1.6 encode_symbol, encode_tablename, \
1.7 - encode_type_attribute
1.8 + encode_type_attribute, decode_type_attribute, \
1.9 + is_type_attribute
1.10 from os import listdir
1.11 from os.path import exists, isdir, join, split
1.12 from referencing import Reference
1.13 @@ -824,6 +825,12 @@
1.14 structure.append("%s /* %s */" % (constant_value, attrname))
1.15 continue
1.16
1.17 + # Special class relationship attributes.
1.18 +
1.19 + elif is_type_attribute(attrname):
1.20 + structure.append("{0, &%s}" % encode_path(decode_type_attribute(attrname)))
1.21 + continue
1.22 +
1.23 structure.append(self.encode_member(origin, attrname, attr, kind))
1.24
1.25 def encode_member(self, path, name, ref, structure_type):