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.2 KB
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict'
|
---|
| 2 |
|
---|
| 3 | module.exports = monkey
|
---|
| 4 | monkey.displayName = 'monkey'
|
---|
| 5 | monkey.aliases = []
|
---|
| 6 | function monkey(Prism) {
|
---|
| 7 | Prism.languages.monkey = {
|
---|
| 8 | comment: {
|
---|
| 9 | pattern: /^#Rem\s[\s\S]*?^#End|'.+/im,
|
---|
| 10 | greedy: true
|
---|
| 11 | },
|
---|
| 12 | string: {
|
---|
| 13 | pattern: /"[^"\r\n]*"/,
|
---|
| 14 | greedy: true
|
---|
| 15 | },
|
---|
| 16 | preprocessor: {
|
---|
| 17 | pattern: /(^[ \t]*)#.+/m,
|
---|
| 18 | lookbehind: true,
|
---|
| 19 | greedy: true,
|
---|
| 20 | alias: 'property'
|
---|
| 21 | },
|
---|
| 22 | function: /\b\w+(?=\()/,
|
---|
| 23 | 'type-char': {
|
---|
| 24 | pattern: /\b[?%#$]/,
|
---|
| 25 | alias: 'class-name'
|
---|
| 26 | },
|
---|
| 27 | number: {
|
---|
| 28 | pattern:
|
---|
| 29 | /((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+(?:(?!\.\.)\.\d*)?|\$[\da-f]+)/i,
|
---|
| 30 | lookbehind: true
|
---|
| 31 | },
|
---|
| 32 | keyword:
|
---|
| 33 | /\b(?:Abstract|Array|Bool|Case|Catch|Class|Const|Continue|Default|Eachin|Else|ElseIf|End|EndIf|Exit|Extends|Extern|False|Field|Final|Float|For|Forever|Function|Global|If|Implements|Import|Inline|Int|Interface|Local|Method|Module|New|Next|Null|Object|Private|Property|Public|Repeat|Return|Select|Self|Step|Strict|String|Super|Then|Throw|To|True|Try|Until|Void|Wend|While)\b/i,
|
---|
| 34 | operator:
|
---|
| 35 | /\.\.|<[=>]?|>=?|:?=|(?:[+\-*\/&~|]|\b(?:Mod|Shl|Shr)\b)=?|\b(?:And|Not|Or)\b/i,
|
---|
| 36 | punctuation: /[.,:;()\[\]]/
|
---|
| 37 | }
|
---|
| 38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.