summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-ada.js
blob: 78ccd40a39005045d6017c9dbe21589fa608689f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Prism.languages.ada = {
  comment: /--.*/,
  string: /"(?:""|[^"\r\f\n])*"/,
  number: [
    {
      pattern:
        /\b\d(?:_?\d)*#[\dA-F](?:_?[\dA-F])*(?:\.[\dA-F](?:_?[\dA-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i,
    },
    {
      pattern: /\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i,
    },
  ],
  'attr-name': /\b'\w+/,
  keyword:
    /\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,
  boolean: /\b(?:false|true)\b/i,
  operator: /<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,
  punctuation: /\.\.?|[,;():]/,
  char: /'.'/,
  variable: /\b[a-z](?:\w)*\b/i,
};
|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/, function: [ { pattern: /(\|\s*)\w+/, lookbehind: !0, alias: 'filter' }, { pattern: /(\.\s*)(?:first|last|size)/, lookbehind: !0 }, ], boolean: /\b(?:false|nil|true)\b/, range: { pattern: /\.\./, alias: 'operator' }, number: /\b\d+(?:\.\d+)?\b/, operator: /[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/, punctuation: /[.,\[\]()]/, empty: { pattern: /\bempty\b/, alias: 'keyword' }, }), Prism.hooks.add('before-tokenize', function (e) { var i = !1; Prism.languages['markup-templating'].buildPlaceholders( e, 'liquid', /\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g, function (e) { var t = /^\{%-?\s*(\w+)/.exec(e); if (t) { var n = t[1]; if ('raw' === n && !i) return (i = !0); if ('endraw' === n) return !(i = !1); } return !i; } ); }), Prism.hooks.add('after-tokenize', function (e) { Prism.languages['markup-templating'].tokenizePlaceholders(e, 'liquid'); });