~didrocks/+junk/face-detection-15.04

« back to all changes in this revision

Viewing changes to facedetection/www/bower_components/prism/components/prism-clike.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.clike = {
 
2
        'comment': [
 
3
                {
 
4
                        pattern: /(^|[^\\])\/\*[\w\W]*?\*\//,
 
5
                        lookbehind: true
 
6
                },
 
7
                {
 
8
                        pattern: /(^|[^\\:])\/\/.*/,
 
9
                        lookbehind: true
 
10
                }
 
11
        ],
 
12
        'string': /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
 
13
        'class-name': {
 
14
                pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,
 
15
                lookbehind: true,
 
16
                inside: {
 
17
                        punctuation: /(\.|\\)/
 
18
                }
 
19
        },
 
20
        'keyword': /\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,
 
21
        'boolean': /\b(true|false)\b/,
 
22
        'function': /[a-z0-9_]+(?=\()/i,
 
23
        'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,
 
24
        'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,
 
25
        'punctuation': /[{}[\];(),.:]/
 
26
};