main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
966 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict'
|
---|
| 2 | var refractorHaskell = require('./haskell.js')
|
---|
| 3 | module.exports = idris
|
---|
| 4 | idris.displayName = 'idris'
|
---|
| 5 | idris.aliases = ['idr']
|
---|
| 6 | function idris(Prism) {
|
---|
| 7 | Prism.register(refractorHaskell)
|
---|
| 8 | Prism.languages.idris = Prism.languages.extend('haskell', {
|
---|
| 9 | comment: {
|
---|
| 10 | pattern: /(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m
|
---|
| 11 | },
|
---|
| 12 | keyword:
|
---|
| 13 | /\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/,
|
---|
| 14 | builtin: undefined
|
---|
| 15 | })
|
---|
| 16 | Prism.languages.insertBefore('idris', 'keyword', {
|
---|
| 17 | 'import-statement': {
|
---|
| 18 | pattern: /(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,
|
---|
| 19 | lookbehind: true,
|
---|
| 20 | inside: {
|
---|
| 21 | punctuation: /\./
|
---|
| 22 | }
|
---|
| 23 | }
|
---|
| 24 | })
|
---|
| 25 | Prism.languages.idr = Prism.languages.idris
|
---|
| 26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.