def ParseCodeLine(line):
  if regex.blank_code_line.match(line):
    return codeline.Blank()
  fmatch = regex.function_line.match(line)
  if fmatch:
    namespace, name, args = fmatch.groups()
    return codeline.Function(name, namespace, regex.function_arg.findall(args))
  cmatch = regex.command_line.match(line)
  if cmatch:
    args, name = cmatch.groups()
    flags = {
        'bang': '-bang' in args,
        'range': '-range' in args,
        'count': '-count' in args,
        'register': '-register' in args,
        'buffer': '-buffer' in args,
        'bar': '-bar' in args,
    }
    return codeline.Command(name, **flags)
  smatch = regex.setting_line.match(line)
  if smatch:
    name, = smatch.groups()
    return codeline.Setting('g:' + name)
  flagmatch = regex.flag_line.match(line)
  if flagmatch:
    a, b, default = flagmatch.groups()
    return codeline.Flag(a or b, default)
  return codeline.Unrecognized(line)
Zip file entries should implement the iterator protocol as files do.
dataset/ETHPy150Open google/vimdoc/vimdoc/parser.py/ParseCodeLine--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/python/test/test_zipstream.py/FileEntryMixin.test_next