A class that removes empty namespaces
| Operations Summary: | |
| __init__(self) Overrides the default processAll() to setup the stack [Source] | |
| execute(self, ast) [Source] | |
| push(self) Pushes the current scope onto the stack and starts a new one [Source] | |
| pop(self, decl) Pops the current scope from the stack, and appends the given declaration to it [Source] | |
| pop_only(self) Only pops, doesn't append to scope [Source] | |
| add(self, decl) Adds the given decl to the current scope [Source] | |
| currscope(self) Returns the current scope: a list of declarations [Source] | |
| visitDeclaration(self, decl) Adds declaration to scope [Source] | |
| visitGroup(self, group) Overrides recursive behaviour to just add the group [Source] | |
| visitEnum(self, enum) Overrides recursive behaviour to just add the enum [Source] | |
| visitModule(self, module) Visits all children of the module, and if there are no declarations after that removes the module [Source] | |
| _count_not_forwards(self, decls) Returns the number of declarations not instances of AST.Forward [Source] | |