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:
1.1 KB
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict'
|
---|
| 2 |
|
---|
| 3 | module.exports = apl
|
---|
| 4 | apl.displayName = 'apl'
|
---|
| 5 | apl.aliases = []
|
---|
| 6 | function apl(Prism) {
|
---|
| 7 | Prism.languages.apl = {
|
---|
| 8 | comment: /(?:⍝|#[! ]).*$/m,
|
---|
| 9 | string: {
|
---|
| 10 | pattern: /'(?:[^'\r\n]|'')*'/,
|
---|
| 11 | greedy: true
|
---|
| 12 | },
|
---|
| 13 | number:
|
---|
| 14 | /¯?(?:\d*\.?\b\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+)?|¯|∞))?/i,
|
---|
| 15 | statement: /:[A-Z][a-z][A-Za-z]*\b/,
|
---|
| 16 | 'system-function': {
|
---|
| 17 | pattern: /⎕[A-Z]+/i,
|
---|
| 18 | alias: 'function'
|
---|
| 19 | },
|
---|
| 20 | constant: /[⍬⌾#⎕⍞]/,
|
---|
| 21 | function: /[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,
|
---|
| 22 | 'monadic-operator': {
|
---|
| 23 | pattern: /[\\\/⌿⍀¨⍨⌶&∥]/,
|
---|
| 24 | alias: 'operator'
|
---|
| 25 | },
|
---|
| 26 | 'dyadic-operator': {
|
---|
| 27 | pattern: /[.⍣⍠⍤∘⌸@⌺⍥]/,
|
---|
| 28 | alias: 'operator'
|
---|
| 29 | },
|
---|
| 30 | assignment: {
|
---|
| 31 | pattern: /←/,
|
---|
| 32 | alias: 'keyword'
|
---|
| 33 | },
|
---|
| 34 | punctuation: /[\[;\]()◇⋄]/,
|
---|
| 35 | dfn: {
|
---|
| 36 | pattern: /[{}⍺⍵⍶⍹∇⍫:]/,
|
---|
| 37 | alias: 'builtin'
|
---|
| 38 | }
|
---|
| 39 | }
|
---|
| 40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.