Synopsis - Synopsis.Processors.Comments.Grouper.Grouper

module Synopsis.Processors.Comments.Grouper
class Grouper
File: ../Synopsis/Processors/Comments/Grouper.py
A class that detects grouping tags and moves the enclosed nodes into a subnode (a 'Group')
Attributes Summary:
__group_stack
Class attributes Summary:
tags
Methods Summary:
__init__(self, * * kwds)
strip_dangling_groups(self)
As groups must not overlap with 'real' scopes, make sure all groups created in the current scope are closed when leaving the scope.
finalize(self)
push(self)
pop(self, decl)
Make sure the current group stack is empty.
push_group(self, group)
Push new group scope to the stack.
pop_group(self, decl = None)
Pop a group scope from the stack.
process_comments(self, decl)
Checks for grouping tags.
visit_declaration(self, decl)
visit_scope(self, scope)
Visits all children of the scope in a new scope.
visit_enum(self, enum)
visit_enumerator(self, enumor)
Methods Details:
strip_dangling_groups(self)
As groups must not overlap with 'real' scopes, make sure all groups created in the current scope are closed when leaving the scope.
finalize(self)
replace the ASG with the newly created one
push(self)
starts a new group stack to be able to validate group scopes
pop(self, decl)
Make sure the current group stack is empty.
push_group(self, group)
Push new group scope to the stack.
pop_group(self, decl = None)
Pop a group scope from the stack. decl -- an optional declaration from which to extract the context, used for the error message if needed.
process_comments(self, decl)
Checks for grouping tags. If an opening tag is found in the middle of a comment, a new Group is generated, the preceeding comments are associated with it, and is pushed onto the scope stack as well as the groups stack.
visit_scope(self, scope)
Visits all children of the scope in a new scope. The value of current_scope() at the end of the list is used to replace scope's list of declarations - hence you can remove (or insert) declarations from the list.
visit_enum(self, enum)
Does the same as visit_scope, but for the enum's list of enumerators
visit_enumerator(self, enumor)
Removes dummy enumerators
Generated on Thu Apr 16 16:27:06 2009 by
synopsis (version devel)