aboutsummaryrefslogtreecommitdiff
path: root/upstream/clipper-6.4.2/Documentation/Scripts/SyntaxHighlighter/scripts/shBrushPython.js
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-01-24 18:44:56 +0100
committerjaseg <git@jaseg.de>2021-01-24 18:44:56 +0100
commitf7b4cc602b9a646fbc66f3f17d6bb9c20efc3ead (patch)
treed7b110b65e93b87fc65472559ac74e7eb961bc7c /upstream/clipper-6.4.2/Documentation/Scripts/SyntaxHighlighter/scripts/shBrushPython.js
downloadgerbolyze-f7b4cc602b9a646fbc66f3f17d6bb9c20efc3ead.tar.gz
gerbolyze-f7b4cc602b9a646fbc66f3f17d6bb9c20efc3ead.tar.bz2
gerbolyze-f7b4cc602b9a646fbc66f3f17d6bb9c20efc3ead.zip
Initial commit
Diffstat (limited to 'upstream/clipper-6.4.2/Documentation/Scripts/SyntaxHighlighter/scripts/shBrushPython.js')
-rw-r--r--upstream/clipper-6.4.2/Documentation/Scripts/SyntaxHighlighter/scripts/shBrushPython.js64
1 files changed, 64 insertions, 0 deletions
diff --git a/upstream/clipper-6.4.2/Documentation/Scripts/SyntaxHighlighter/scripts/shBrushPython.js b/upstream/clipper-6.4.2/Documentation/Scripts/SyntaxHighlighter/scripts/shBrushPython.js
new file mode 100644
index 0000000..ce77462
--- /dev/null
+++ b/upstream/clipper-6.4.2/Documentation/Scripts/SyntaxHighlighter/scripts/shBrushPython.js
@@ -0,0 +1,64 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // Contributed by Gheorghe Milas and Ahmad Sherif
+
+ var keywords = 'and assert break class continue def del elif else ' +
+ 'except exec finally for from global if import in is ' +
+ 'lambda not or pass print raise return try yield while';
+
+ var funcs = '__import__ abs all any apply basestring bin bool buffer callable ' +
+ 'chr classmethod cmp coerce compile complex delattr dict dir ' +
+ 'divmod enumerate eval execfile file filter float format frozenset ' +
+ 'getattr globals hasattr hash help hex id input int intern ' +
+ 'isinstance issubclass iter len list locals long map max min next ' +
+ 'object oct open ord pow print property range raw_input reduce ' +
+ 'reload repr reversed round set setattr slice sorted staticmethod ' +
+ 'str sum super tuple type type unichr unicode vars xrange zip';
+
+ var special = 'None True False self cls class_';
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' },
+ { regex: /^\s*@\w+/gm, css: 'decorator' },
+ { regex: /(['\"]{3})([^\1])*?\1/gm, css: 'comments' },
+ { regex: /"(?!")(?:\.|\\\"|[^\""\n])*"/gm, css: 'string' },
+ { regex: /'(?!')(?:\.|(\\\')|[^\''\n])*'/gm, css: 'string' },
+ { regex: /\+|\-|\*|\/|\%|=|==/gm, css: 'keyword' },
+ { regex: /\b\d+\.?\w*/g, css: 'value' },
+ { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' },
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' },
+ { regex: new RegExp(this.getKeywords(special), 'gm'), css: 'color1' }
+ ];
+
+ this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['py', 'python'];
+
+ SyntaxHighlighter.brushes.Python = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();