parameters: (filename, c_compiler=True)
return_statement: return mapping.get(extension)
docstring: Return the language from file name extension.
docstring_summary: Return the language from file name extension.
docstring_tokens: Return the language from file name extension .
function: def classify_source(filename, c_compiler=True):
      """ Return the language from file name extension. """
  
      mapping = {
          '.c': 'c' if c_compiler else 'c++',
          '.i': 'c-cpp-output' if c_compiler else 'c++-cpp-output',
          '.ii': 'c++-cpp-output',
          '.m': 'objective-c',
          '.mi': 'objective-c-cpp-output',
          '.mm': 'objective-c++',
          '.mii': 'objective-c++-cpp-output',
          '.C': 'c++',
          '.cc': 'c++',
          '.CC': 'c++',
          '.cp': 'c++',
          '.cpp': 'c++',
          '.cxx': 'c++',
          '.c++': 'c++',
          '.C++': 'c++',
          '.txx': 'c++'
      }
  
      __, extension = os.path.splitext(os.path.basename(filename))
      return mapping.get(extension)
function_tokens: def classify_source ( filename , c_compiler = True ) : mapping = { '.c' : 'c' if c_compiler else 'c++' , '.i' : 'c-cpp-output' if c_compiler else 'c++-cpp-output' , '.ii' : 'c++-cpp-output' , '.m' : 'objective-c' , '.mi' : 'objective-c-cpp-output' , '.mm' : 'objective-c++' , '.mii' : 'objective-c++-cpp-output' , '.C' : 'c++' , '.cc' : 'c++' , '.CC' : 'c++' , '.cp' : 'c++' , '.cpp' : 'c++' , '.cxx' : 'c++' , '.c++' : 'c++' , '.C++' : 'c++' , '.txx' : 'c++' } __ , extension = os . path . splitext ( os . path . basename ( filename ) ) return mapping . get ( extension )