2013-11-28 | Paul Boddie | raw files shortlog changelog graph | Visit only definitions at a particular level, not all definitions in a module. | syspython-as-target |
micropython/common.py (file) |
1.1 --- a/micropython/common.py Thu Nov 28 23:47:49 2013 +0100 1.2 +++ b/micropython/common.py Thu Nov 28 23:51:08 2013 +0100 1.3 @@ -49,7 +49,8 @@ 1.4 if isinstance(n, (compiler.ast.Class, compiler.ast.Function)): 1.5 self.current_definition = n 1.6 definitions.append(self.dispatch(n)) 1.7 - definitions += self.process_definitions(n) 1.8 + else: 1.9 + definitions += self.process_definitions(n) 1.10 return definitions 1.11 1.12 def processing_definition(self, n):