parameters: (
      source, rule_dependencies, extension_to_rule_name, platforms, toolset
  )
return_statement: return (group, element)
docstring: Returns the group and element type of the source file.
  
    Arguments:
        source: The source file name.
        extension_to_rule_name: A dictionary mapping file extensions to rules.
  
    Returns:
        A pair of (group this file should be part of, the label of element)
docstring_summary: Returns the group and element type of the source file.
docstring_tokens: Returns the group and element type of the source file .
function: def _MapFileToMsBuildSourceType(
      source, rule_dependencies, extension_to_rule_name, platforms, toolset
  ):
      """Returns the group and element type of the source file.
  
    Arguments:
        source: The source file name.
        extension_to_rule_name: A dictionary mapping file extensions to rules.
  
    Returns:
        A pair of (group this file should be part of, the label of element)
    """
      _, ext = os.path.splitext(source)
      ext = ext.lower()
      if ext in extension_to_rule_name:
          group = "rule"
          element = extension_to_rule_name[ext]
      elif ext in [".cc", ".cpp", ".c", ".cxx", ".mm"]:
          group = "compile"
          element = "ClCompile"
      elif ext in [".h", ".hxx"]:
          group = "include"
          element = "ClInclude"
      elif ext == ".rc":
          group = "resource"
          element = "ResourceCompile"
      elif ext in [".s", ".asm"]:
          group = "masm"
          element = "MASM"
          if "arm64" in platforms and toolset == "target":
              element = "MARMASM"
      elif ext == ".idl":
          group = "midl"
          element = "Midl"
      elif source in rule_dependencies:
          group = "rule_dependency"
          element = "CustomBuild"
      else:
          group = "none"
          element = "None"
      return (group, element)
function_tokens: def _MapFileToMsBuildSourceType ( source , rule_dependencies , extension_to_rule_name , platforms , toolset ) : _ , ext = os . path . splitext ( source ) ext = ext . lower ( ) if ext in extension_to_rule_name : group = "rule" element = extension_to_rule_name [ ext ] elif ext in [ ".cc" , ".cpp" , ".c" , ".cxx" , ".mm" ] : group = "compile" element = "ClCompile" elif ext in [ ".h" , ".hxx" ] : group = "include" element = "ClInclude" elif ext == ".rc" : group = "resource" element = "ResourceCompile" elif ext in [ ".s" , ".asm" ] : group = "masm" element = "MASM" if "arm64" in platforms and toolset == "target" : element = "MARMASM" elif ext == ".idl" : group = "midl" element = "Midl" elif source in rule_dependencies : group = "rule_dependency" element = "CustomBuild" else : group = "none" element = "None" return ( group , element )