~didrocks/+junk/face-detection-15.04

« back to all changes in this revision

Viewing changes to facedetection/www/bower_components/prism/components/prism-erlang.js

  • Committer: Didier Roche
  • Date: 2016-05-10 23:09:11 UTC
  • Revision ID: didier.roche@canonical.com-20160510230911-c7xr490zrj3yrzxd
New version

Show diffs side-by-side

added added

removed removed

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