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.erlang = {
|
---|
2 | 'comment': /%.+/,
|
---|
3 | 'string': {
|
---|
4 | pattern: /"(?:\\.|[^\\"\r\n])*"/,
|
---|
5 | greedy: true
|
---|
6 | },
|
---|
7 | 'quoted-function': {
|
---|
8 | pattern: /'(?:\\.|[^\\'\r\n])+'(?=\()/,
|
---|
9 | alias: 'function'
|
---|
10 | },
|
---|
11 | 'quoted-atom': {
|
---|
12 | pattern: /'(?:\\.|[^\\'\r\n])+'/,
|
---|
13 | alias: 'atom'
|
---|
14 | },
|
---|
15 | 'boolean': /\b(?:false|true)\b/,
|
---|
16 | 'keyword': /\b(?:after|begin|case|catch|end|fun|if|of|receive|try|when)\b/,
|
---|
17 | 'number': [
|
---|
18 | /\$\\?./,
|
---|
19 | /\b\d+#[a-z0-9]+/i,
|
---|
20 | /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i
|
---|
21 | ],
|
---|
22 | 'function': /\b[a-z][\w@]*(?=\()/,
|
---|
23 | 'variable': {
|
---|
24 | // Look-behind is used to prevent wrong highlighting of atoms containing "@"
|
---|
25 | pattern: /(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,
|
---|
26 | lookbehind: true
|
---|
27 | },
|
---|
28 | 'operator': [
|
---|
29 | /[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,
|
---|
30 | {
|
---|
31 | // We don't want to match <<
|
---|
32 | pattern: /(^|[^<])<(?!<)/,
|
---|
33 | lookbehind: true
|
---|
34 | },
|
---|
35 | {
|
---|
36 | // We don't want to match >>
|
---|
37 | pattern: /(^|[^>])>(?!>)/,
|
---|
38 | lookbehind: true
|
---|
39 | }
|
---|
40 | ],
|
---|
41 | 'atom': /\b[a-z][\w@]*/,
|
---|
42 | 'punctuation': /[()[\]{}:;,.#|]|<<|>>/
|
---|
43 |
|
---|
44 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.