94 |
94 |
95 @param node AST tree node to scan |
95 @param node AST tree node to scan |
96 @yield tuple giving line number, offset within line and error code |
96 @yield tuple giving line number, offset within line and error code |
97 @ytype tuple of (int, int, str) |
97 @ytype tuple of (int, int, str) |
98 """ |
98 """ |
99 for error in self.__visitNode(node): |
99 yield from self.__visitNode(node) |
100 yield error |
|
101 self.__parents.append(node) |
100 self.__parents.append(node) |
102 for child in ast.iter_child_nodes(node): |
101 for child in ast.iter_child_nodes(node): |
103 for error in self.__visitTree(child): |
102 yield from self.__visitTree(child) |
104 yield error |
|
105 self.__parents.pop() |
103 self.__parents.pop() |
106 |
104 |
107 def __visitNode(self, node): |
105 def __visitNode(self, node): |
108 """ |
106 """ |
109 Private method to inspect the given AST node. |
107 Private method to inspect the given AST node. |