golo.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. Language: Golo
  3. Author: Philippe Charriere <ph.charriere@gmail.com>
  4. Description: a lightweight dynamic language for the JVM
  5. Website: http://golo-lang.org/
  6. Category: system
  7. */
  8. function golo(hljs) {
  9. const KEYWORDS = [
  10. "println",
  11. "readln",
  12. "print",
  13. "import",
  14. "module",
  15. "function",
  16. "local",
  17. "return",
  18. "let",
  19. "var",
  20. "while",
  21. "for",
  22. "foreach",
  23. "times",
  24. "in",
  25. "case",
  26. "when",
  27. "match",
  28. "with",
  29. "break",
  30. "continue",
  31. "augment",
  32. "augmentation",
  33. "each",
  34. "find",
  35. "filter",
  36. "reduce",
  37. "if",
  38. "then",
  39. "else",
  40. "otherwise",
  41. "try",
  42. "catch",
  43. "finally",
  44. "raise",
  45. "throw",
  46. "orIfNull",
  47. "DynamicObject|10",
  48. "DynamicVariable",
  49. "struct",
  50. "Observable",
  51. "map",
  52. "set",
  53. "vector",
  54. "list",
  55. "array"
  56. ];
  57. return {
  58. name: 'Golo',
  59. keywords: {
  60. keyword: KEYWORDS,
  61. literal: [
  62. "true",
  63. "false",
  64. "null"
  65. ]
  66. },
  67. contains: [
  68. hljs.HASH_COMMENT_MODE,
  69. hljs.QUOTE_STRING_MODE,
  70. hljs.C_NUMBER_MODE,
  71. {
  72. className: 'meta',
  73. begin: '@[A-Za-z]+'
  74. }
  75. ]
  76. };
  77. }
  78. export { golo as default };