class_docstr: For the Elixir language.
  
  .. versionadded:: 1.5
class_docstr_tok: ["For","the","Elixir","language",".","..","versionadded",":",":","1.5"]
code: def gen_elixir_sigil_rules():
      # all valid sigil terminators (excluding heredocs)
      terminators = [
          (r"\{", r"\}", "}", "cb"),
          (r"\[", r"\]", r"\]", "sb"),
          (r"\(", r"\)", ")", "pa"),
          ("<", ">", ">", "ab"),
          ("/", "/", "/", "slas"),
          (r"\|", r"\|", "|", "pipe"),
          ('"', '"', '"', "quot"),
          ("'", "'", "'", "apos"),
      ]
  
      # heredocs have slightly different rules
      triquotes = [(r'"""', "triquot"), (r"'''", "triapos")]
  
      token = String.Other
      states = {"sigils": []}
  
      for term, name in triquotes:
          states["sigils"] += [
              (
                  r"(~[a-z])(%s)" % (term,),
                  bygroups(token, String.Heredoc),
                  (name + "-end", name + "-intp"),
              ),
              (
                  r"(~[A-Z])(%s)" % (term,),
                  bygroups(token, String.Heredoc),
                  (name + "-end", name + "-no-intp"),
              ),
          ]
  
          states[name + "-end"] = [
              (r"[a-zA-Z]+", token, "#pop"),
              default("#pop"),
          ]
          states[name + "-intp"] = [
              (
                  r"^(\s*)(" + term + ")",
                  bygroups(Whitespace, String.Heredoc),
                  "#pop",
              ),
              include("heredoc_interpol"),
          ]
          states[name + "-no-intp"] = [
              (
                  r"^(\s*)(" + term + ")",
                  bygroups(Whitespace, String.Heredoc),
                  "#pop",
              ),
              include("heredoc_no_interpol"),
          ]
  
      for lterm, rterm, rterm_class, name in terminators:
          states["sigils"] += [
              (r"~[a-z]" + lterm, token, name + "-intp"),
              (r"~[A-Z]" + lterm, token, name + "-no-intp"),
          ]
          states[name + "-intp"] = gen_elixir_sigstr_rules(
              rterm, rterm_class, token
          )
          states[name + "-no-intp"] = gen_elixir_sigstr_rules(
              rterm, rterm_class, token, interpol=False
          )
  
      return states
  
file_path: catboost/contrib/python/Pygments/py3/pygments/lexers/erlang.py
imports: import re
  from pygments.lexer import Lexer, RegexLexer, bygroups, words, do_insertions, include, default, line_re
  from pygments.token import Comment, Operator, Keyword, Name, String, Number, Punctuation, Generic, Whitespace
label_desc: Use image node_id 2 for calling the ElixirLexer obj's underlying member method code with example usage: obj.gen_elixir_sigil_rules() and returns: states