parameters: (source_files, native_type, emit_js)
return_statement: return result
docstring: Read, prepare and assemble the list of source files.
  
    Args:
      source_files: List of JavaScript-ish source files.
      native_type: String corresponding to a NativeType enum value, allowing us
          to treat different types of sources differently.
      emit_js: True if we should skip the byte conversion and just leave the
          sources as JS strings.
  
    Returns:
      An instance of Sources.
docstring_summary: Read, prepare and assemble the list of source files.
docstring_tokens: Read prepare and assemble the list of source files .
function: def PrepareSources(source_files, native_type, emit_js):
    """Read, prepare and assemble the list of source files.
  
    Args:
      source_files: List of JavaScript-ish source files.
      native_type: String corresponding to a NativeType enum value, allowing us
          to treat different types of sources differently.
      emit_js: True if we should skip the byte conversion and just leave the
          sources as JS strings.
  
    Returns:
      An instance of Sources.
    """
    filters = BuildFilterChain()
  
    source_files_and_contents = [(f, ReadFile(f)) for f in source_files]
  
    # Have a single not-quite-empty source file if there are none present;
    # otherwise you get errors trying to compile an empty C++ array.
    # It cannot be empty (or whitespace, which gets trimmed to empty), as
    # the deserialization code assumes each file is nonempty.
    if not source_files_and_contents:
      source_files_and_contents = [("dummy.js", "(function() {})")]
  
    result = Sources()
  
    for (source, contents) in source_files_and_contents:
      try:
        lines = filters(contents)
      except Error as e:
        raise Error("In file %s:\n%s" % (source, str(e)))
  
      result.modules.append(lines)
  
      name = os.path.basename(source)[:-3]
      result.names.append(name)
  
    return result
function_tokens: def PrepareSources ( source_files , native_type , emit_js ) : filters = BuildFilterChain ( ) source_files_and_contents = [ ( f , ReadFile ( f ) ) for f in source_files ] # Have a single not-quite-empty source file if there are none present; # otherwise you get errors trying to compile an empty C++ array. # It cannot be empty (or whitespace, which gets trimmed to empty), as # the deserialization code assumes each file is nonempty. if not source_files_and_contents : source_files_and_contents = [ ( "dummy.js" , "(function() {})" ) ] result = Sources ( ) for ( source , contents ) in source_files_and_contents : try : lines = filters ( contents ) except Error as e : raise Error ( "In file %s:\n%s" % ( source , str ( e ) ) ) result . modules . append ( lines ) name = os . path . basename ( source ) [ : - 3 ] result . names . append ( name ) return result