elm.min.js 1.2 KB

123456789101112131415161718
  1. /*! `elm` grammar compiled for Highlight.js 11.7.0 */
  2. (()=>{var e=(()=>{"use strict";return e=>{const n={
  3. variants:[e.COMMENT("--","$"),e.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},i={
  4. className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},s={begin:"\\(",end:"\\)",
  5. illegal:'"',contains:[{className:"type",
  6. begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},n]};return{name:"Elm",
  7. keywords:["let","in","if","then","else","case","of","where","module","import","exposing","type","alias","as","infix","infixl","infixr","port","effect","command","subscription"],
  8. contains:[{beginKeywords:"port effect module",end:"exposing",
  9. keywords:"port effect module where command subscription exposing",
  10. contains:[s,n],illegal:"\\W\\.|;"},{begin:"import",end:"$",
  11. keywords:"import as exposing",contains:[s,n],illegal:"\\W\\.|;"},{begin:"type",
  12. end:"$",keywords:"type alias",contains:[i,s,{begin:/\{/,end:/\}/,
  13. contains:s.contains},n]},{beginKeywords:"infix infixl infixr",end:"$",
  14. contains:[e.C_NUMBER_MODE,n]},{begin:"port",end:"$",keywords:"port",contains:[n]
  15. },{className:"string",begin:"'\\\\?.",end:"'",illegal:"."
  16. },e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,i,e.inherit(e.TITLE_MODE,{
  17. begin:"^[_a-z][\\w']*"}),n,{begin:"->|<-"}],illegal:/;/}}})()
  18. ;hljs.registerLanguage("elm",e)})();