def generate_record_forward_decl(self, tree): '''Generate forward declaration of record (struct, union, or class).''' if not tree.get_annotation(annotations.REQUIRED, False): return if not tree.get_annotation(annotations.FORWARD_DECLARATION, False): return declared = tree.get_annotation(annotations.DECLARED, False) gen_record(tree, self.output, declared=declared, declaration=True) tree.annotate(annotations.DECLARED, True)
def generate_record_definition(self, tree): '''Generate definition of record (struct, union, or class).''' declared = tree.get_annotation(annotations.DECLARED, False) gen_record(tree, self.output, declared=declared, declaration=False) tree.annotate(annotations.DECLARED, True) tree.annotate(annotations.DEFINED, True)