TypeDeclAST.py (7839:9e556fb25900) TypeDeclAST.py (9302:c2e70a9bc340)
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;

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

55 # Make the new type
56 new_type = Type(self.symtab, ident, self.location, self.pairs,
57 self.state_machine)
58
59 if machine:
60 machine.addType(new_type)
61
62 self.symtab.newSymbol(new_type)
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;

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

55 # Make the new type
56 new_type = Type(self.symtab, ident, self.location, self.pairs,
57 self.state_machine)
58
59 if machine:
60 machine.addType(new_type)
61
62 self.symtab.newSymbol(new_type)
63 self.symtab.pushFrame()
63
64 # Add all of the fields of the type to it
65 for field in self.field_asts:
66 field.generate(new_type)
64
65 # Add all of the fields of the type to it
66 for field in self.field_asts:
67 field.generate(new_type)
68
69 self.symtab.popFrame()