DeclListAST.py (6657:ef5fae93a3b2) | DeclListAST.py (6714:028047200ff7) |
---|---|
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; --- 24 unchanged lines hidden (view full) --- 33 34 if not isinstance(decls, (list, tuple)): 35 decls = [ decls ] 36 self.decls = decls 37 38 def __repr__(self): 39 return "[DeclListAST: %s]" % (', '.join(repr(d) for d in self.decls)) 40 | 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; --- 24 unchanged lines hidden (view full) --- 33 34 if not isinstance(decls, (list, tuple)): 35 decls = [ decls ] 36 self.decls = decls 37 38 def __repr__(self): 39 return "[DeclListAST: %s]" % (', '.join(repr(d) for d in self.decls)) 40 |
41 def files(self, hh, cc, parent=None): | 41 def files(self, parent=None): 42 s = set() |
42 for decl in self.decls: | 43 for decl in self.decls: |
43 decl.files(hh, cc, parent) | 44 s |= decl.files(parent) 45 return s |
44 45 def generate(self): 46 for decl in self.decls: 47 decl.generate() 48 49 def findMachines(self): 50 for decl in self.decls: 51 decl.findMachines() | 46 47 def generate(self): 48 for decl in self.decls: 49 decl.generate() 50 51 def findMachines(self): 52 for decl in self.decls: 53 decl.findMachines() |