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.0 KB
|
Line | |
---|
1 | Prism.languages.wolfram = {
|
---|
2 | 'comment': // Allow one level of nesting - note: regex taken from applescipt
|
---|
3 | /\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,
|
---|
4 | 'string': {
|
---|
5 | pattern: /"(?:\\.|[^"\\\r\n])*"/,
|
---|
6 | greedy: true
|
---|
7 | },
|
---|
8 | 'keyword': /\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/,
|
---|
9 | 'context': {
|
---|
10 | pattern: /\b\w+`+\w*/,
|
---|
11 | alias: 'class-name'
|
---|
12 | },
|
---|
13 | 'blank': {
|
---|
14 | pattern: /\b\w+_\b/,
|
---|
15 | alias: 'regex'
|
---|
16 | },
|
---|
17 | 'global-variable': {
|
---|
18 | pattern: /\$\w+/,
|
---|
19 | alias: 'variable'
|
---|
20 | },
|
---|
21 | 'boolean': /\b(?:False|True)\b/,
|
---|
22 | 'number': /(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,
|
---|
23 | 'operator': /\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
|
---|
24 | 'punctuation': /[{}[\];(),.:]/
|
---|
25 | };
|
---|
26 |
|
---|
27 | Prism.languages.mathematica = Prism.languages.wolfram;
|
---|
28 | Prism.languages.wl = Prism.languages.wolfram;
|
---|
29 | Prism.languages.nb = Prism.languages.wolfram;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.