You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
894 B
32 lines
894 B
Prism.languages.apl = { |
|
'comment': /(?:⍝|#[! ]).*$/m, |
|
'string': { |
|
pattern: /'(?:[^'\r\n]|'')*'/, |
|
greedy: true |
|
}, |
|
'number': /¯?(?:\d*\.?\b\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+)?|¯|∞))?/i, |
|
'statement': /:[A-Z][a-z][A-Za-z]*\b/, |
|
'system-function': { |
|
pattern: /⎕[A-Z]+/i, |
|
alias: 'function' |
|
}, |
|
'constant': /[⍬⌾#⎕⍞]/, |
|
'function': /[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/, |
|
'monadic-operator': { |
|
pattern: /[\\\/⌿⍀¨⍨⌶&∥]/, |
|
alias: 'operator' |
|
}, |
|
'dyadic-operator': { |
|
pattern: /[.⍣⍠⍤∘⌸@⌺⍥]/, |
|
alias: 'operator' |
|
}, |
|
'assignment': { |
|
pattern: /←/, |
|
alias: 'keyword' |
|
}, |
|
'punctuation': /[\[;\]()◇⋄]/, |
|
'dfn': { |
|
pattern: /[{}⍺⍵⍶⍹∇⍫:]/, |
|
alias: 'builtin' |
|
} |
|
};
|
|
|