erlang-repl.js 1019 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. module.exports = function(hljs) {
  2. return {
  3. keywords: {
  4. built_in:
  5. 'spawn spawn_link self',
  6. keyword:
  7. 'after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if ' +
  8. 'let not of or orelse|10 query receive rem try when xor'
  9. },
  10. contains: [
  11. {
  12. className: 'meta', begin: '^[0-9]+> ',
  13. relevance: 10
  14. },
  15. hljs.COMMENT('%', '$'),
  16. {
  17. className: 'number',
  18. begin: '\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)',
  19. relevance: 0
  20. },
  21. hljs.APOS_STRING_MODE,
  22. hljs.QUOTE_STRING_MODE,
  23. {
  24. begin: '\\?(::)?([A-Z]\\w*(::)?)+'
  25. },
  26. {
  27. begin: '->'
  28. },
  29. {
  30. begin: 'ok'
  31. },
  32. {
  33. begin: '!'
  34. },
  35. {
  36. begin: '(\\b[a-z\'][a-zA-Z0-9_\']*:[a-z\'][a-zA-Z0-9_\']*)|(\\b[a-z\'][a-zA-Z0-9_\']*)',
  37. relevance: 0
  38. },
  39. {
  40. begin: '[A-Z][a-zA-Z0-9_\']*',
  41. relevance: 0
  42. }
  43. ]
  44. };
  45. };