angelscript.min.js 1.8 KB

123456789101112131415161718192021
  1. /*! `angelscript` grammar compiled for Highlight.js 11.7.0 */
  2. (()=>{var e=(()=>{"use strict";return e=>{const n={className:"built_in",
  3. begin:"\\b(void|bool|int8|int16|int32|int64|int|uint8|uint16|uint32|uint64|uint|string|ref|array|double|float|auto|dictionary)"
  4. },a={className:"symbol",begin:"[a-zA-Z0-9_]+@"},i={className:"keyword",
  5. begin:"<",end:">",contains:[n,a]};return n.contains=[i],a.contains=[i],{
  6. name:"AngelScript",aliases:["asc"],
  7. keywords:["for","in|0","break","continue","while","do|0","return","if","else","case","switch","namespace","is","cast","or","and","xor","not","get|0","in","inout|10","out","override","set|0","private","public","const","default|0","final","shared","external","mixin|10","enum","typedef","funcdef","this","super","import","from","interface","abstract|0","try","catch","protected","explicit","property"],
  8. illegal:"(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\\s*[^\\(])",contains:[{
  9. className:"string",begin:"'",end:"'",illegal:"\\n",
  10. contains:[e.BACKSLASH_ESCAPE],relevance:0},{className:"string",begin:'"""',
  11. end:'"""'},{className:"string",begin:'"',end:'"',illegal:"\\n",
  12. contains:[e.BACKSLASH_ESCAPE],relevance:0
  13. },e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",
  14. begin:"^\\s*\\[",end:"\\]"},{beginKeywords:"interface namespace",end:/\{/,
  15. illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]},{
  16. beginKeywords:"class",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",
  17. begin:"[a-zA-Z0-9_]+",contains:[{begin:"[:,]\\s*",contains:[{className:"symbol",
  18. begin:"[a-zA-Z0-9_]+"}]}]}]},n,a,{className:"literal",
  19. begin:"\\b(null|true|false)"},{className:"number",relevance:0,
  20. begin:"(-?)(\\b0[xXbBoOdD][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)"
  21. }]}}})();hljs.registerLanguage("angelscript",e)})();