def extract_haml(fileobj, keywords, comment_tags, options):
import haml<EOL>from mako import lexer, parsetree<EOL>from mako.ext.babelplugin import extract_nodes <EOL>encoding = options.get('<STR_LIT>', options.get('<STR_LIT>', None))<EOL>template_node = lexer.Lexer(haml.preprocessor(fileobj.read()), input_encoding=encoding).parse()<EOL>for extracted in extract_nodes(template_node.get_children(), keywords, comment_tags, options):<EOL><INDENT>yield extracted<EOL><DEDENT>
babel translation token extract function for haml files