def _parse_snippet_file(content, full_filename):
 filename = full_filename[:(- len('.snippet'))]
 segments = _splitall(filename)
 segments = segments[(segments.index('snippets') + 1):]
 assert (len(segments) in (2, 3))
 trigger = segments[1]
 description = (segments[2] if (2 < len(segments)) else '')
 if (content and content.endswith(os.linesep)):
  content = content[:(- len(os.linesep))]
 (yield ('snippet', (SnipMateSnippetDefinition(trigger, content, description, full_filename),)))

def _parse_snippet_file ( content , full_filename ) : filename = full_filename [ : ( - len ( '.snippet' ) ) ] segments = _splitall ( filename ) segments = segments [ ( segments . index ( 'snippets' ) + 1 ) : ] assert ( len ( segments ) in ( 2 , 3 ) ) trigger = segments [ 1 ] description = ( segments [ 2 ] if ( 2 < len ( segments ) ) else '' ) if ( content and content . endswith ( os . linesep ) ) : content = content [ : ( - len ( os . linesep ) ) ] ( yield ( 'snippet' , ( SnipMateSnippetDefinition ( trigger , content , description , full_filename ) , ) ) )
parses content assuming it is a .