annotate DataTables-1.9.4/docs/media/js/shBrushJScript.js @ 9:7300ed4c1481 draft default tip

Uploaded
author saskia-hiltemann
date Mon, 04 Sep 2017 10:49:00 -0400
parents ac5f9272033b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
2 * SyntaxHighlighter
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
3 * http://alexgorbatchev.com/SyntaxHighlighter
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
4 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
5 * SyntaxHighlighter is donationware. If you are using it, please donate.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
6 * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
7 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
8 * @version
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
9 * 3.0.83 (July 02 2010)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
10 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
11 * @copyright
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
12 * Copyright (C) 2004-2010 Alex Gorbatchev.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
13 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
14 * @license
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
15 * Dual licensed under the MIT and GPL licenses.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
16 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
17 ;(function()
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
18 {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
19 // CommonJS
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
20 typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
21
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
22 function Brush()
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
23 {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
24 var keywords = 'break case catch continue ' +
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
25 'default delete do else false ' +
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
26 'for function if in instanceof ' +
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
27 'new null return super switch ' +
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
28 'this throw true try typeof var while with'
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
29 ;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
30
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
31 var r = SyntaxHighlighter.regexLib;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
32
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
33 this.regexList = [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
34 { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
35 { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
36 { regex: r.singleLineCComments, css: 'comments' }, // one line comments
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
37 { regex: r.multiLineCComments, css: 'comments' }, // multiline comments
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
38 { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
39 { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
40 ];
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
41
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
42 this.forHtmlScript(r.scriptScriptTags);
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
43 };
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
44
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
45 Brush.prototype = new SyntaxHighlighter.Highlighter();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
46 Brush.aliases = ['js', 'jscript', 'javascript'];
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
47
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
48 SyntaxHighlighter.brushes.JScript = Brush;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
49
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
50 // CommonJS
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
51 typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
52 })();