var r, l;
function v() {
  if (l)
    return r;
  l = 1;
  function a(e, n = {}) {
    return n.variants = e, n;
  }
  function E(e) {
    const n = e.regex, t = "[A-Za-z0-9_$]+", i = a([
      e.C_LINE_COMMENT_MODE,
      e.C_BLOCK_COMMENT_MODE,
      e.COMMENT(
        "/\\*\\*",
        "\\*/",
        {
          relevance: 0,
          contains: [
            {
              // eat up @'s in emails to prevent them to be recognized as doctags
              begin: /\w+@/,
              relevance: 0
            },
            {
              className: "doctag",
              begin: "@[A-Za-z]+"
            }
          ]
        }
      )
    ]), c = {
      className: "regexp",
      begin: /~?\/[^\/\n]+\//,
      contains: [e.BACKSLASH_ESCAPE]
    }, o = a([
      e.BINARY_NUMBER_MODE,
      e.C_NUMBER_MODE
    ]), s = a(
      [
        {
          begin: /"""/,
          end: /"""/
        },
        {
          begin: /'''/,
          end: /'''/
        },
        {
          begin: "\\$/",
          end: "/\\$",
          relevance: 10
        },
        e.APOS_STRING_MODE,
        e.QUOTE_STRING_MODE
      ],
      { className: "string" }
    ), g = {
      match: [
        /(class|interface|trait|enum|record|extends|implements)/,
        /\s+/,
        e.UNDERSCORE_IDENT_RE
      ],
      scope: {
        1: "keyword",
        3: "title.class"
      }
    };
    return {
      name: "Groovy",
      keywords: {
        "variable.language": "this super",
        literal: "true false null",
        type: [
          "byte",
          "short",
          "char",
          "int",
          "long",
          "boolean",
          "float",
          "double",
          "void"
        ],
        keyword: [
          // groovy specific keywords
          "def",
          "as",
          "in",
          "assert",
          "trait",
          // common keywords with Java
          "abstract",
          "static",
          "volatile",
          "transient",
          "public",
          "private",
          "protected",
          "synchronized",
          "final",
          "class",
          "interface",
          "enum",
          "if",
          "else",
          "for",
          "while",
          "switch",
          "case",
          "break",
          "default",
          "continue",
          "throw",
          "throws",
          "try",
          "catch",
          "finally",
          "implements",
          "extends",
          "new",
          "import",
          "package",
          "return",
          "instanceof",
          "var"
        ]
      },
      contains: [
        e.SHEBANG({
          binary: "groovy",
          relevance: 10
        }),
        i,
        s,
        c,
        o,
        g,
        {
          className: "meta",
          begin: "@[A-Za-z]+",
          relevance: 0
        },
        {
          // highlight map keys and named parameters as attrs
          className: "attr",
          begin: t + "[ 	]*:",
          relevance: 0
        },
        {
          // catch middle element of the ternary operator
          // to avoid highlight it as a label, named parameter, or map key
          begin: /\?/,
          end: /:/,
          relevance: 0,
          contains: [
            i,
            s,
            c,
            o,
            "self"
          ]
        },
        {
          // highlight labeled statements
          className: "symbol",
          begin: "^[ 	]*" + n.lookahead(t + ":"),
          excludeBegin: !0,
          end: t + ":",
          relevance: 0
        }
      ],
      illegal: /#|<\//
    };
  }
  return r = E, r;
}
export {
  v as __require
};
