prism-idris.js 725 B

12345678910111213141516171819
  1. Prism.languages.idris = Prism.languages.extend('haskell', {
  2. 'comment': {
  3. pattern: /(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m,
  4. },
  5. 'keyword': /\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,
  6. 'builtin': undefined
  7. });
  8. Prism.languages.insertBefore('idris', 'keyword', {
  9. 'import-statement': {
  10. pattern: /(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,
  11. lookbehind: true,
  12. inside: {
  13. 'punctuation': /\./
  14. }
  15. }
  16. });
  17. Prism.languages.idr = Prism.languages.idris;