rss layout now fully separated m/v/c
[dylansserver.git] / includes / syntax / scripts / shBrushJavaFX.js
1 /**
2 * SyntaxHighlighter
3 * http://alexgorbatchev.com/SyntaxHighlighter
4 *
5 * SyntaxHighlighter is donationware. If you are using it, please donate.
6 * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 *
8 * @version
9 * 3.0.83 (July 02 2010)
10 *
11 * @copyright
12 * Copyright (C) 2004-2010 Alex Gorbatchev.
13 *
14 * @license
15 * Dual licensed under the MIT and GPL licenses.
16 */
17 ;(function()
18 {
19 // CommonJS
20 typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21
22 function Brush()
23 {
24 // Contributed by Patrick Webster
25 // http://patrickwebster.blogspot.com/2009/04/javafx-brush-for-syntaxhighlighter.html
26 var datatypes = 'Boolean Byte Character Double Duration '
27 + 'Float Integer Long Number Short String Void'
28 ;
29
30 var keywords = 'abstract after and as assert at before bind bound break catch class '
31 + 'continue def delete else exclusive extends false finally first for from '
32 + 'function if import in indexof init insert instanceof into inverse last '
33 + 'lazy mixin mod nativearray new not null on or override package postinit '
34 + 'protected public public-init public-read replace return reverse sizeof '
35 + 'step super then this throw true try tween typeof var where while with '
36 + 'attribute let private readonly static trigger'
37 ;
38
39 this.regexList = [
40 { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' },
41 { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' },
42 { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
43 { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
44 { regex: /(-?\.?)(\b(\d*\.?\d+|\d+\.?\d*)(e[+-]?\d+)?|0x[a-f\d]+)\b\.?/gi, css: 'color2' }, // numbers
45 { regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'variable' }, // datatypes
46 { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
47 ];
48 this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
49 };
50
51 Brush.prototype = new SyntaxHighlighter.Highlighter();
52 Brush.aliases = ['jfx', 'javafx'];
53
54 SyntaxHighlighter.brushes.JavaFX = Brush;
55
56 // CommonJS
57 typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
58 })();