class_docstr: Lexer for YAML, a human-friendly data serialization
  language.
  
  .. versionadded:: 0.11
class_docstr_tok: ["Lexer","for","YAML",",","a","human-friendly","data","serialization","language",".","..","versionadded",":",":","0.11"]
docstr: Save a possible indentation level.
docstr_tok: ["Save","a","possible","indentation","level","."]
code: def save_indent(token_class, start=False):
      """Save a possible indentation level."""
  
      def callback(lexer, match, context):
          text = match.group()
          extra = ""
          if start:
              context.next_indent = len(text)
              if context.next_indent < context.indent:
                  while context.next_indent < context.indent:
                      context.indent = context.indent_stack.pop()
                  if context.next_indent > context.indent:
                      extra = text[context.indent :]
                      text = text[: context.indent]
          else:
              context.next_indent += len(text)
          if text:
              yield match.start(), token_class, text
          if extra:
              yield match.start() + len(text), token_class.Error, extra
          context.pos = match.end()
  
      return callback
  
imports: from pygments.lexer import Lexer, ExtendedRegexLexer, LexerContext, include, bygroups
  from pygments.token import Comment, Error, Keyword, Literal, Name, Number, Punctuation, String, Whitespace
label_desc: Use image node_id 3 for calling the YamlLexer obj's underlying member method code with example usage: obj.save_indent(token_class, start) and returns: callback