var o, l;
function T() {
  if (l)
    return o;
  l = 1;
  function _(n) {
    const t = n.regex, r = "[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?", m = "[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?", d = {
      $pattern: r,
      keyword: [
        "after",
        "alias",
        "and",
        "case",
        "catch",
        "cond",
        "defstruct",
        "defguard",
        "do",
        "else",
        "end",
        "fn",
        "for",
        "if",
        "import",
        "in",
        "not",
        "or",
        "quote",
        "raise",
        "receive",
        "require",
        "reraise",
        "rescue",
        "try",
        "unless",
        "unquote",
        "unquote_splicing",
        "use",
        "when",
        "with|0"
      ],
      literal: [
        "false",
        "nil",
        "true"
      ]
    }, i = {
      className: "subst",
      begin: /#\{/,
      end: /\}/,
      keywords: d
    }, u = {
      className: "number",
      begin: "(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[0-9][0-9_]*(\\.[0-9_]+([eE][-+]?[0-9]+)?)?)",
      relevance: 0
    }, b = {
      match: /\\[\s\S]/,
      scope: "char.escape",
      relevance: 0
    }, a = `[/|([{<"']`, s = [
      {
        begin: /"/,
        end: /"/
      },
      {
        begin: /'/,
        end: /'/
      },
      {
        begin: /\//,
        end: /\//
      },
      {
        begin: /\|/,
        end: /\|/
      },
      {
        begin: /\(/,
        end: /\)/
      },
      {
        begin: /\[/,
        end: /\]/
      },
      {
        begin: /\{/,
        end: /\}/
      },
      {
        begin: /</,
        end: />/
      }
    ], c = (e) => ({
      scope: "char.escape",
      begin: t.concat(/\\/, e),
      relevance: 0
    }), I = {
      className: "string",
      begin: "~[a-z](?=" + a + ")",
      contains: s.map((e) => n.inherit(
        e,
        { contains: [
          c(e.end),
          b,
          i
        ] }
      ))
    }, A = {
      className: "string",
      begin: "~[A-Z](?=" + a + ")",
      contains: s.map((e) => n.inherit(
        e,
        { contains: [c(e.end)] }
      ))
    }, f = {
      className: "regex",
      variants: [
        {
          begin: "~r(?=" + a + ")",
          contains: s.map((e) => n.inherit(
            e,
            {
              end: t.concat(e.end, /[uismxfU]{0,7}/),
              contains: [
                c(e.end),
                b,
                i
              ]
            }
          ))
        },
        {
          begin: "~R(?=" + a + ")",
          contains: s.map(
            (e) => n.inherit(
              e,
              {
                end: t.concat(e.end, /[uismxfU]{0,7}/),
                contains: [c(e.end)]
              }
            )
          )
        }
      ]
    }, E = {
      className: "string",
      contains: [
        n.BACKSLASH_ESCAPE,
        i
      ],
      variants: [
        {
          begin: /"""/,
          end: /"""/
        },
        {
          begin: /'''/,
          end: /'''/
        },
        {
          begin: /~S"""/,
          end: /"""/,
          contains: []
          // override default
        },
        {
          begin: /~S"/,
          end: /"/,
          contains: []
          // override default
        },
        {
          begin: /~S'''/,
          end: /'''/,
          contains: []
          // override default
        },
        {
          begin: /~S'/,
          end: /'/,
          contains: []
          // override default
        },
        {
          begin: /'/,
          end: /'/
        },
        {
          begin: /"/,
          end: /"/
        }
      ]
    }, g = {
      className: "function",
      beginKeywords: "def defp defmacro defmacrop",
      end: /\B\b/,
      // the mode is ended by the title
      contains: [
        n.inherit(n.TITLE_MODE, {
          begin: r,
          endsParent: !0
        })
      ]
    }, L = n.inherit(g, {
      className: "class",
      beginKeywords: "defimpl defmodule defprotocol defrecord",
      end: /\bdo\b|$|;/
    }), S = [
      E,
      f,
      A,
      I,
      n.HASH_COMMENT_MODE,
      L,
      g,
      { begin: "::" },
      {
        className: "symbol",
        begin: ":(?![\\s:])",
        contains: [
          E,
          { begin: m }
        ],
        relevance: 0
      },
      {
        className: "symbol",
        begin: r + ":(?!:)",
        relevance: 0
      },
      {
        // Usage of a module, struct, etc.
        className: "title.class",
        begin: /(\b[A-Z][a-zA-Z0-9_]+)/,
        relevance: 0
      },
      u,
      {
        className: "variable",
        begin: "(\\$\\W)|((\\$|@@?)(\\w+))"
      }
      // -> has been removed, capnproto always uses this grammar construct
    ];
    return i.contains = S, {
      name: "Elixir",
      aliases: [
        "ex",
        "exs"
      ],
      keywords: d,
      contains: S
    };
  }
  return o = _, o;
}
export {
  T as __require
};
