prism-racket.js 497 B

123456789101112131415161718
  1. Prism.languages.racket = Prism.languages.extend('scheme', {
  2. 'lambda-parameter': {
  3. // the racket lambda syntax is a lot more complex, so we won't even attempt to capture it.
  4. // this will just prevent false positives of the `function` pattern
  5. pattern: /([(\[]lambda\s+[(\[])[^()\[\]'\s]+/,
  6. lookbehind: true
  7. }
  8. });
  9. Prism.languages.insertBefore('racket', 'string', {
  10. 'lang': {
  11. pattern: /^#lang.+/m,
  12. greedy: true,
  13. alias: 'keyword'
  14. }
  15. });
  16. Prism.languages.rkt = Prism.languages.racket;