def handle_extends(tail, line_index):
 if tail:
  return ('extends', ([p.strip() for p in tail.split(',')],))
 else:
  return ('error', ("'extends' without file types", line_index))

def handle_extends ( tail , line_index ) : if tail : return ( 'extends' , ( [ p . strip ( ) for p in tail . split ( ',' ) ] , ) ) else : return ( 'error' , ( "'extends' without file types" , line_index ) )
handles an extends line in a snippet .