ada.min.js 2.2 KB

1234567891011121314151617181920212223242526
  1. /*! `ada` grammar compiled for Highlight.js 11.7.0 */
  2. var hljsGrammar=(()=>{"use strict";return e=>{
  3. const n="[A-Za-z](_?[A-Za-z0-9.])*",s="[]\\{\\}%#'\"",a=e.COMMENT("--","$"),r={
  4. begin:"\\s+:\\s+",end:"\\s*(:=|;|\\)|=>|$)",illegal:s,contains:[{
  5. beginKeywords:"loop for declare others",endsParent:!0},{className:"keyword",
  6. beginKeywords:"not null constant access function procedure in out aliased exception"
  7. },{className:"type",begin:n,endsParent:!0,relevance:0}]};return{name:"Ada",
  8. case_insensitive:!0,keywords:{
  9. 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"],
  10. literal:["True","False"]},contains:[a,{className:"string",begin:/"/,end:/"/,
  11. contains:[{begin:/""/,relevance:0}]},{className:"string",begin:/'.'/},{
  12. className:"number",
  13. begin:"\\b(\\d(_|\\d)*#\\w+(\\.\\w+)?#([eE][-+]?\\d(_|\\d)*)?|\\d(_|\\d)*(\\.\\d(_|\\d)*)?([eE][-+]?\\d(_|\\d)*)?)",
  14. relevance:0},{className:"symbol",begin:"'"+n},{className:"title",
  15. begin:"(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",
  16. end:"(is|$)",keywords:"package body",excludeBegin:!0,excludeEnd:!0,illegal:s},{
  17. begin:"(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+",
  18. end:"(\\bis|\\bwith|\\brenames|\\)\\s*;)",
  19. keywords:"overriding function procedure with is renames return",returnBegin:!0,
  20. contains:[a,{className:"title",
  21. begin:"(\\bwith\\s+)?\\b(function|procedure)\\s+",end:"(\\(|\\s+|$)",
  22. excludeBegin:!0,excludeEnd:!0,illegal:s},r,{className:"type",
  23. begin:"\\breturn\\s+",end:"(\\s+|;|$)",keywords:"return",excludeBegin:!0,
  24. excludeEnd:!0,endsParent:!0,illegal:s}]},{className:"type",
  25. begin:"\\b(sub)?type\\s+",end:"\\s+",keywords:"type",excludeBegin:!0,illegal:s
  26. },r]}}})();export default hljsGrammar;