e61a767b6dc3f5479960ad326f93995c5650bced
[phpfspot.git] / autocomplete / js / shBrushJScript.js
1 dp.sh.Brushes.JScript = function()\r
2 {\r
3         var keywords =  'abstract boolean break byte case catch char class const continue debugger ' +\r
4                                         'default delete do double else enum export extends false final finally float ' +\r
5                                         'for function goto if implements import in instanceof int interface long native ' +\r
6                                         'new null package private protected public return short static super switch ' +\r
7                                         'synchronized this throw throws transient true try typeof var void volatile while with';\r
8 \r
9         this.regexList = [\r
10                 { regex: new RegExp('//.*$', 'gm'),                                                     css: 'comment' },                       // one line comments\r
11                 { regex: new RegExp('/\\*[\\s\\S]*?\\*/', 'g'),                         css: 'comment' },                       // multiline comments\r
12                 { regex: new RegExp('"(?:\\.|[^\\""])*"', 'g'),                         css: 'string' },                        // double quoted strings\r
13                 { regex: new RegExp('\'(?:\\.|[^\\\'\'])*\'', 'g'),                     css: 'string' },                        // single quoted strings\r
14                 { regex: new RegExp('^\\s*#.*', 'gm'),                                          css: 'preprocessor' },          // preprocessor tags like #region and #endregion\r
15                 { regex: new RegExp(this.GetKeywords(keywords), 'gm'),          css: 'keyword' }                        // keywords\r
16                 ];\r
17 \r
18         this.CssClass = 'dp-c';\r
19 }\r
20 \r
21 dp.sh.Brushes.JScript.prototype = new dp.sh.Highlighter();\r
22 dp.sh.Brushes.JScript.Aliases   = ['js', 'jscript', 'javascript'];\r