Deleted Added
sdiff udiff text old ( 6714:028047200ff7 ) new ( 7839:9e556fb25900 )
full compact
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 36 unchanged lines hidden (view full) ---

45 if parent:
46 ident = "%s_%s" % (parent, self.type_ast.ident)
47 else:
48 ident = self.type_ast.ident
49 return set(("%s.hh" % ident, "%s.cc" % ident))
50
51 def generate(self):
52 ident = str(self.type_ast)
53
54 # Make the new type
55 new_type = Type(self.symtab, ident, self.location, self.pairs,
56 self.state_machine)
57 self.symtab.newSymbol(new_type)
58
59 # Add all of the fields of the type to it
60 for field in self.field_asts:
61 field.generate(new_type)