summaryrefslogtreecommitdiff
path: root/static/hl/languages/ada.min.js
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2021-03-18 00:23:57 -0700
committerDavid Luevano Alvarado <david@luevano.xyz>2021-03-18 00:23:57 -0700
commit3c10d209d706c286817e7150595113d9cda444bd (patch)
tree83f24325544855c64306c01f54cce31731b59f4a /static/hl/languages/ada.min.js
parentf8ae4d47bd7f3c0534822a78be8f0654195c4e1a (diff)
Add highligh.js
Diffstat (limited to 'static/hl/languages/ada.min.js')
-rw-r--r--static/hl/languages/ada.min.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/static/hl/languages/ada.min.js b/static/hl/languages/ada.min.js
new file mode 100644
index 0000000..8296751
--- /dev/null
+++ b/static/hl/languages/ada.min.js
@@ -0,0 +1,25 @@
+hljs.registerLanguage("ada",(()=>{"use strict";return e=>{
+const n="[A-Za-z](_?[A-Za-z0-9.])*",s="[]\\{\\}%#'\"",a=e.COMMENT("--","$"),r={
+begin:"\\s+:\\s+",end:"\\s*(:=|;|\\)|=>|$)",illegal:s,contains:[{
+beginKeywords:"loop for declare others",endsParent:!0},{className:"keyword",
+beginKeywords:"not null constant access function procedure in out aliased exception"
+},{className:"type",begin:n,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,{className:"string",begin:/"/,end:/"/,
+contains:[{begin:/""/,relevance:0}]},{className:"string",begin:/'.'/},{
+className:"number",
+begin:"\\b(\\d(_|\\d)*#\\w+(\\.\\w+)?#([eE][-+]?\\d(_|\\d)*)?|\\d(_|\\d)*(\\.\\d(_|\\d)*)?([eE][-+]?\\d(_|\\d)*)?)",
+relevance:0},{className:"symbol",begin:"'"+n},{className:"title",
+begin:"(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",
+end:"(is|$)",keywords:"package body",excludeBegin:!0,excludeEnd:!0,illegal:s},{
+begin:"(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+",
+end:"(\\bis|\\bwith|\\brenames|\\)\\s*;)",
+keywords:"overriding function procedure with is renames return",returnBegin:!0,
+contains:[a,{className:"title",
+begin:"(\\bwith\\s+)?\\b(function|procedure)\\s+",end:"(\\(|\\s+|$)",
+excludeBegin:!0,excludeEnd:!0,illegal:s},r,{className:"type",
+begin:"\\breturn\\s+",end:"(\\s+|;|$)",keywords:"return",excludeBegin:!0,
+excludeEnd:!0,endsParent:!0,illegal:s}]},{className:"type",
+begin:"\\b(sub)?type\\s+",end:"\\s+",keywords:"type",excludeBegin:!0,illegal:s
+},r]}}})()); \ No newline at end of file