1.1 --- a/micropython/common.py Mon Nov 25 15:03:12 2013 +0100
1.2 +++ b/micropython/common.py Thu Nov 28 15:49:39 2013 +0100
1.3 @@ -47,11 +47,14 @@
1.4 definitions = []
1.5 for n in node.getChildNodes():
1.6 if isinstance(n, (compiler.ast.Class, compiler.ast.Function)):
1.7 + self.current_definition = n
1.8 definitions.append(self.dispatch(n))
1.9 - else:
1.10 - definitions += self.process_definitions(n)
1.11 + definitions += self.process_definitions(n)
1.12 return definitions
1.13
1.14 + def processing_definition(self, n):
1.15 + return self.current_definition is n
1.16 +
1.17 # Visitor support methods.
1.18
1.19 def default(self, node, *args):