diff options
author | JinweiClarkChao <[email protected]> | 2014-02-20 12:50:15 +0800 |
---|---|---|
committer | JinweiClarkChao <[email protected]> | 2014-02-20 12:52:51 +0800 |
commit | 31fb10f393fbfd4d7adf528ec70624d2b8d247a8 (patch) | |
tree | 1009bb2a4f5fe89b8bc822b68104018ea8df5261 /Blocks/syntax/scripts/shBrushJavaFX.js | |
parent | be404e3e01ca839e730c884309c25abef10863c9 (diff) | |
download | jinwei.me-31fb10f393fbfd4d7adf528ec70624d2b8d247a8.tar.gz |
Six Blocks Version
Diffstat (limited to 'Blocks/syntax/scripts/shBrushJavaFX.js')
-rw-r--r-- | Blocks/syntax/scripts/shBrushJavaFX.js | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Blocks/syntax/scripts/shBrushJavaFX.js b/Blocks/syntax/scripts/shBrushJavaFX.js new file mode 100644 index 0000000..1a150a6 --- /dev/null +++ b/Blocks/syntax/scripts/shBrushJavaFX.js | |||
@@ -0,0 +1,58 @@ | |||
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 | })(); | ||