parameters: (value)
return_statement: return [value]
docstring: Converts a "GN-list" command-line parameter into a list.
  
    Conversions handled:
      * None -> []
      * '' -> []
      * 'asdf' -> ['asdf']
      * '["a", "b"]' -> ['a', 'b']
      * ['["a", "b"]', 'c'] -> ['a', 'b', 'c']  (flattened list)
  
    The common use for this behavior is in the Android build where things can
    take lists of @FileArg references that are expanded via ExpandFileArgs.
docstring_summary: Converts a "GN-list" command-line parameter into a list.
docstring_tokens: Converts a GN - list command - line parameter into a list .
function: def ParseGnList(value):
    """Converts a "GN-list" command-line parameter into a list.
  
    Conversions handled:
      * None -> []
      * '' -> []
      * 'asdf' -> ['asdf']
      * '["a", "b"]' -> ['a', 'b']
      * ['["a", "b"]', 'c'] -> ['a', 'b', 'c']  (flattened list)
  
    The common use for this behavior is in the Android build where things can
    take lists of @FileArg references that are expanded via ExpandFileArgs.
    """
    # Convert None to [].
    if not value:
      return []
    # Convert a list of GN lists to a flattened list.
    if isinstance(value, list):
      ret = []
      for arg in value:
        ret.extend(ParseGnList(arg))
      return ret
    # Convert normal GN list.
    if value.startswith('['):
      return gn_helpers.GNValueParser(value).ParseList()
    # Convert a single string value to a list.
    return [value]
function_tokens: def ParseGnList ( value ) : # Convert None to []. if not value : return [ ] # Convert a list of GN lists to a flattened list. if isinstance ( value , list ) : ret = [ ] for arg in value : ret . extend ( ParseGnList ( arg ) ) return ret # Convert normal GN list. if value . startswith ( '[' ) : return gn_helpers . GNValueParser ( value ) . ParseList ( ) # Convert a single string value to a list. return [ value ]