parameters: (parent_filter_name, sources,
                               extension_to_rule_name,
                               filter_group, source_group)
docstring: Creates the list of filters and sources to be added in the filter file.
  
    Args:
        parent_filter_name: The name of the filter under which the sources are
            found.
        sources: The hierarchy of filters and sources to process.
        extension_to_rule_name: A dictionary mapping file extensions to rules.
        filter_group: The list to which filter entries will be appended.
        source_group: The list to which source entries will be appeneded.
docstring_summary: Creates the list of filters and sources to be added in the filter file.
docstring_tokens: Creates the list of filters and sources to be added in the filter file .
function: def _AppendFiltersForMSBuild(parent_filter_name, sources,
                               extension_to_rule_name,
                               filter_group, source_group):
    """Creates the list of filters and sources to be added in the filter file.
  
    Args:
        parent_filter_name: The name of the filter under which the sources are
            found.
        sources: The hierarchy of filters and sources to process.
        extension_to_rule_name: A dictionary mapping file extensions to rules.
        filter_group: The list to which filter entries will be appended.
        source_group: The list to which source entries will be appeneded.
    """
    for source in sources:
      if isinstance(source, MSVSProject.Filter):
        # We have a sub-filter.  Create the name of that sub-filter.
        if not parent_filter_name:
          filter_name = source.name
        else:
          filter_name = '%s\\%s' % (parent_filter_name, source.name)
        # Add the filter to the group.
        filter_group.append(
            ['Filter', {'Include': filter_name},
             ['UniqueIdentifier', MSVSNew.MakeGuid(source.name)]])
        # Recurse and add its dependents.
        _AppendFiltersForMSBuild(filter_name, source.contents,
                                 extension_to_rule_name,
                                 filter_group, source_group)
      else:
        # It's a source.  Create a source entry.
        _, element = _MapFileToMsBuildSourceType(source, extension_to_rule_name)
        source_entry = [element, {'Include': source}]
        # Specify the filter it is part of, if any.
        if parent_filter_name:
          source_entry.append(['Filter', parent_filter_name])
        source_group.append(source_entry)
function_tokens: def _AppendFiltersForMSBuild ( parent_filter_name , sources , extension_to_rule_name , filter_group , source_group ) : for source in sources : if isinstance ( source , MSVSProject . Filter ) : # We have a sub-filter.  Create the name of that sub-filter. if not parent_filter_name : filter_name = source . name else : filter_name = '%s\\%s' % ( parent_filter_name , source . name ) # Add the filter to the group. filter_group . append ( [ 'Filter' , { 'Include' : filter_name } , [ 'UniqueIdentifier' , MSVSNew . MakeGuid ( source . name ) ] ] ) # Recurse and add its dependents. _AppendFiltersForMSBuild ( filter_name , source . contents , extension_to_rule_name , filter_group , source_group ) else : # It's a source.  Create a source entry. _ , element = _MapFileToMsBuildSourceType ( source , extension_to_rule_name ) source_entry = [ element , { 'Include' : source } ] # Specify the filter it is part of, if any. if parent_filter_name : source_entry . append ( [ 'Filter' , parent_filter_name ] ) source_group . append ( source_entry )