# HG changeset patch # User Paul Boddie # Date 1385679068 -3600 # Node ID 9b425fa89ea4ce5f5ba48f18a7078dcc794b8b15 # Parent bd6f662272142e27cef7227837845e0e40fc2d99 Visit only definitions at a particular level, not all definitions in a module. diff -r bd6f66227214 -r 9b425fa89ea4 micropython/common.py --- a/micropython/common.py Thu Nov 28 23:47:49 2013 +0100 +++ b/micropython/common.py Thu Nov 28 23:51:08 2013 +0100 @@ -49,7 +49,8 @@ if isinstance(n, (compiler.ast.Class, compiler.ast.Function)): self.current_definition = n definitions.append(self.dispatch(n)) - definitions += self.process_definitions(n) + else: + definitions += self.process_definitions(n) return definitions def processing_definition(self, n):