Debian Codegraph @

src/site/resources/scripts/shBrushJScript.js

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