A class that detects grouping tags and moves the enclosed nodes
into a subnode (a 'Group')
Methods Summary:
As groups must not overlap with 'real' scopes,
make sure all groups created in the current scope are closed
when leaving the scope.
Make sure the current group stack is empty.
Push new group scope to the stack.
Pop a group scope from the stack.
Checks for grouping tags.
Visits all children of the scope in a new scope.
Methods Details:
As groups must not overlap with 'real' scopes,
make sure all groups created in the current scope are closed
when leaving the scope.
replace the ASG with the newly created one
starts a new group stack to be able to validate group scopes
Make sure the current group stack is empty.
Push new group scope to the stack.
Pop a group scope from the stack.
decl -- an optional declaration from which to extract the context,
used for the error message if needed.
(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.
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.
Does the same as visit_scope, but for the enum's list of
enumerators
Removes dummy enumerators