'Checks that all classes and namespaces have been completely parsed.
Call this when all lines in a file have been processed.
Args:
filename: The name of the current file.
error: The function to call with any errors found.'

def CheckCompletedBlocks(self, filename, error):

    for obj in self.stack:
        if isinstance(obj, _ClassInfo):
            error(filename, obj.starting_linenum, 'build/class', 5, ('Failed    to    find    complete    declaration    of    class    %s' % obj.name))
        elif isinstance(obj, _NamespaceInfo):
            error(filename, obj.starting_linenum, 'build/namespaces', 5, ('Failed    to    find    complete    declaration    of    namespace    %s' % obj.name))
