ultimix
shBrushJScript.js
Go to the documentation of this file.
1 
30 SyntaxHighlighter.brushes.JScript = function()
31 {
32  var keywords = 'break case catch continue ' +
33  'default delete do else false ' +
34  'for function if in instanceof ' +
35  'new null return super switch ' +
36  'this throw true try typeof var while with'
37  ;
38 
39  this.regexList = [
40  { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
41  { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
42  { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
43  { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
44  { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
45  { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
46  ];
47 
48  this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);
49 };
50 
51 SyntaxHighlighter.brushes.JScript.prototype = new SyntaxHighlighter.Highlighter();
52 SyntaxHighlighter.brushes.JScript.aliases = ['js', 'jscript', 'javascript'];