parameters: (command)
return_statement: return result if result.files else None
docstring: Returns a value when the command is a compilation, None otherwise.
  
      The value on success is a named tuple with the following attributes:
  
          files:    list of source files
          flags:    list of compile options
          compiler: string value of 'c' or 'c++'
docstring_summary: Returns a value when the command is a compilation, None otherwise.
docstring_tokens: Returns a value when the command is a compilation None otherwise .
function: def split_command(command):
      """ Returns a value when the command is a compilation, None otherwise.
  
      The value on success is a named tuple with the following attributes:
  
          files:    list of source files
          flags:    list of compile options
          compiler: string value of 'c' or 'c++' """
  
      # the result of this method
      result = collections.namedtuple('Compilation',
                                      ['compiler', 'flags', 'files'])
      result.compiler = compiler_language(command)
      result.flags = []
      result.files = []
      # quit right now, if the program was not a C/C++ compiler
      if not result.compiler:
          return None
      # iterate on the compile options
      args = iter(command[1:])
      for arg in args:
          # quit when compilation pass is not involved
          if arg in {'-E', '-S', '-cc1', '-M', '-MM', '-###'}:
              return None
          # ignore some flags
          elif arg in IGNORED_FLAGS:
              count = IGNORED_FLAGS[arg]
              for _ in range(count):
                  next(args)
          elif re.match(r'^-(l|L|Wl,).+', arg):
              pass
          # some parameters could look like filename, take as compile option
          elif arg in {'-D', '-I'}:
              result.flags.extend([arg, next(args)])
          # parameter which looks source file is taken...
          elif re.match(r'^[^-].+', arg) and classify_source(arg):
              result.files.append(arg)
          # and consider everything else as compile option.
          else:
              result.flags.append(arg)
      # do extra check on number of source files
      return result if result.files else None
function_tokens: def split_command ( command ) : # the result of this method result = collections . namedtuple ( 'Compilation' , [ 'compiler' , 'flags' , 'files' ] ) result . compiler = compiler_language ( command ) result . flags = [ ] result . files = [ ] # quit right now, if the program was not a C/C++ compiler if not result . compiler : return None # iterate on the compile options args = iter ( command [ 1 : ] ) for arg in args : # quit when compilation pass is not involved if arg in { '-E' , '-S' , '-cc1' , '-M' , '-MM' , '-###' } : return None # ignore some flags elif arg in IGNORED_FLAGS : count = IGNORED_FLAGS [ arg ] for _ in range ( count ) : next ( args ) elif re . match ( r'^-(l|L|Wl,).+' , arg ) : pass # some parameters could look like filename, take as compile option elif arg in { '-D' , '-I' } : result . flags . extend ( [ arg , next ( args ) ] ) # parameter which looks source file is taken... elif re . match ( r'^[^-].+' , arg ) and classify_source ( arg ) : result . files . append ( arg ) # and consider everything else as compile option. else : result . flags . append ( arg ) # do extra check on number of source files return result if result . files else None