def _generate_union_class_vars(self, data_type):
lineno = self.lineno<EOL>if data_type.catch_all_field:<EOL><INDENT>self.emit("<STR_LIT>" % data_type.catch_all_field.name)<EOL><DEDENT>elif not data_type.parent_type:<EOL><INDENT>self.emit('<STR_LIT>')<EOL><DEDENT>for field in data_type.fields:<EOL><INDENT>if is_void_type(field.data_type):<EOL><INDENT>field_name = fmt_var(field.name)<EOL>self.emit('<STR_LIT>')<EOL>self.emit('<STR_LIT>'.format(field_name))<EOL><DEDENT><DEDENT>if lineno != self.lineno:<EOL><INDENT>self.emit()<EOL><DEDENT>
Adds a _catch_all_ attribute to each class. Also, adds a placeholder
attribute for the construction of union members of void type.