clean.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. Language: Clean
  3. Author: Camil Staps <info@camilstaps.nl>
  4. Category: functional
  5. Website: http://clean.cs.ru.nl
  6. */
  7. /** @type LanguageFn */
  8. function clean(hljs) {
  9. const KEYWORDS = [
  10. "if",
  11. "let",
  12. "in",
  13. "with",
  14. "where",
  15. "case",
  16. "of",
  17. "class",
  18. "instance",
  19. "otherwise",
  20. "implementation",
  21. "definition",
  22. "system",
  23. "module",
  24. "from",
  25. "import",
  26. "qualified",
  27. "as",
  28. "special",
  29. "code",
  30. "inline",
  31. "foreign",
  32. "export",
  33. "ccall",
  34. "stdcall",
  35. "generic",
  36. "derive",
  37. "infix",
  38. "infixl",
  39. "infixr"
  40. ];
  41. return {
  42. name: 'Clean',
  43. aliases: [
  44. 'icl',
  45. 'dcl'
  46. ],
  47. keywords: {
  48. keyword: KEYWORDS,
  49. built_in:
  50. 'Int Real Char Bool',
  51. literal:
  52. 'True False'
  53. },
  54. contains: [
  55. hljs.C_LINE_COMMENT_MODE,
  56. hljs.C_BLOCK_COMMENT_MODE,
  57. hljs.APOS_STRING_MODE,
  58. hljs.QUOTE_STRING_MODE,
  59. hljs.C_NUMBER_MODE,
  60. { // relevance booster
  61. begin: '->|<-[|:]?|#!?|>>=|\\{\\||\\|\\}|:==|=:|<>' }
  62. ]
  63. };
  64. }
  65. export { clean as default };