parameters: (environment)
return_statement: return lexer
docstring: Return a lexer which is probably cached.
docstring_summary: Return a lexer which is probably cached.
docstring_tokens: Return a lexer which is probably cached .
function: def get_lexer(environment):
      """Return a lexer which is probably cached."""
      key = (environment.block_start_string,
             environment.block_end_string,
             environment.variable_start_string,
             environment.variable_end_string,
             environment.comment_start_string,
             environment.comment_end_string,
             environment.line_statement_prefix,
             environment.line_comment_prefix,
             environment.trim_blocks,
             environment.lstrip_blocks,
             environment.newline_sequence,
             environment.keep_trailing_newline)
      lexer = _lexer_cache.get(key)
      if lexer is None:
          lexer = Lexer(environment)
          _lexer_cache[key] = lexer
      return lexer
function_tokens: def get_lexer ( environment ) : key = ( environment . block_start_string , environment . block_end_string , environment . variable_start_string , environment . variable_end_string , environment . comment_start_string , environment . comment_end_string , environment . line_statement_prefix , environment . line_comment_prefix , environment . trim_blocks , environment . lstrip_blocks , environment . newline_sequence , environment . keep_trailing_newline ) lexer = _lexer_cache . get ( key ) if lexer is None : lexer = Lexer ( environment ) _lexer_cache [ key ] = lexer return lexer