import {
  a as o,
  c as g
} from "./chunk-IO47FP3U.js";

// ../node_modules/highlight.js/lib/languages/ada.js
var E = g((y, c) => {
  function b(d) {
    let n = "\\d(_|\\d)*", s = "[eE][-+]?" + n, l = n + "(\\." + n + ")?(" + s + ")?", t = "\\w+", u = "\\b(" + (n + "#" + t + "(\\." + t + ")?#(" + s + ")?") + "|" + l + ")", r = "[A-Za-z](_?[A-Za-z0-9.])*", e = `[]\\{\\}%#'"`, a = d.COMMENT("--", "$"), i = {
      // TODO: These spaces are not required by the Ada syntax
      // however, I have yet to see handwritten Ada code where
      // someone does not put spaces around :
      begin: "\\s+:\\s+",
      end: "\\s*(:=|;|\\)|=>|$)",
      // endsWithParent: true,
      // returnBegin: true,
      illegal: e,
      contains: [
        {
          // workaround to avoid highlighting
          // named loops and declare blocks
          beginKeywords: "loop for declare others",
          endsParent: !0
        },
        {
          // properly highlight all modifiers
          className: "keyword",
          beginKeywords: "not null constant access function procedure in out aliased exception"
        },
        {
          className: "type",
          begin: r,
          endsParent: !0,
          relevance: 0
        }
      ]
    };
    return {
      name: "Ada",
      case_insensitive: !0,
      keywords: {
        keyword: "abort else new return abs elsif not reverse abstract end accept entry select access exception of separate aliased exit or some all others subtype and for out synchronized array function overriding at tagged generic package task begin goto pragma terminate body private then if procedure type case in protected constant interface is raise use declare range delay limited record when delta loop rem while digits renames with do mod requeue xor",
        literal: "True False"
      },
      contains: [
        a,
        // strings "foobar"
        {
          className: "string",
          begin: /"/,
          end: /"/,
          contains: [{
            begin: /""/,
            relevance: 0
          }]
        },
        // characters ''
        {
          // character literals always contain one char
          className: "string",
          begin: /'.'/
        },
        {
          // number literals
          className: "number",
          begin: u,
          relevance: 0
        },
        {
          // Attributes
          className: "symbol",
          begin: "'" + r
        },
        {
          // package definition, maybe inside generic
          className: "title",
          begin: "(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",
          end: "(is|$)",
          keywords: "package body",
          excludeBegin: !0,
          excludeEnd: !0,
          illegal: e
        },
        {
          // function/procedure declaration/definition
          // maybe inside generic
          begin: "(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+",
          end: "(\\bis|\\bwith|\\brenames|\\)\\s*;)",
          keywords: "overriding function procedure with is renames return",
          // we need to re-match the 'function' keyword, so that
          // the title mode below matches only exactly once
          returnBegin: !0,
          contains: [
            a,
            {
              // name of the function/procedure
              className: "title",
              begin: "(\\bwith\\s+)?\\b(function|procedure)\\s+",
              end: "(\\(|\\s+|$)",
              excludeBegin: !0,
              excludeEnd: !0,
              illegal: e
            },
            // 'self'
            // // parameter types
            i,
            {
              // return type
              className: "type",
              begin: "\\breturn\\s+",
              end: "(\\s+|;|$)",
              keywords: "return",
              excludeBegin: !0,
              excludeEnd: !0,
              // we are done with functions
              endsParent: !0,
              illegal: e
            }
          ]
        },
        {
          // new type declarations
          // maybe inside generic
          className: "type",
          begin: "\\b(sub)?type\\s+",
          end: "\\s+",
          keywords: "type",
          excludeBegin: !0,
          illegal: e
        },
        // see comment above the definition
        i
        // no markup
        // relevance boosters for small snippets
        // {begin: '\\s*=>\\s*'},
        // {begin: '\\s*:=\\s*'},
        // {begin: '\\s+:=\\s+'},
      ]
    };
  }
  o(b, "ada");
  c.exports = b;
});

export {
  E as a
};
