class_docstr: Base class for all lexers.
class_docstr_tok: ["Base","class","for","all","lexers","."]
docstr: Takes a :class:`~prompt_toolkit.document.Document` and returns a
  callable that takes a line number and returns a list of
  ``(style_str, text)`` tuples for that line.
  
  XXX: Note that in the past, this was supposed to return a list
       of ``(Token, text)`` tuples, just like a Pygments lexer.
docstr_tok: ["Takes","a",":","class",":","`","~prompt_toolkit.document.Document","`","and","returns","a","callable","that","takes","a","line","number","and","returns","a","list","of","``","(","style_str",",","text",")","``","tuples","for","that","line",".","XXX",":","Note","that","in","the","past",",","this","was","supposed","to","return","a","list","of","``","(","Token",",","text",")","``","tuples",",","just","like","a","Pygments","lexer","."]
code: def lex_document(
      self, document: Document
  ) -> Callable[[int], StyleAndTextTuples]:
      """
      Takes a :class:`~prompt_toolkit.document.Document` and returns a
      callable that takes a line number and returns a list of
      ``(style_str, text)`` tuples for that line.
  
      XXX: Note that in the past, this was supposed to return a list
           of ``(Token, text)`` tuples, just like a Pygments lexer.
      """
  
file_path: catboost/contrib/python/prompt-toolkit/py3/prompt_toolkit/lexers/base.py
imports: from __future__ import annotations
  from abc import ABCMeta, abstractmethod
  from typing import Callable, Hashable
  from prompt_toolkit.document import Document
  from prompt_toolkit.formatted_text.base import StyleAndTextTuples
label_desc: Use image node_id 1 for calling the Lexer obj's underlying member method code with example usage: obj.lex_document(document) without return types