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/shBrushAS3.js | |
parent | be404e3e01ca839e730c884309c25abef10863c9 (diff) | |
download | jinwei.me-31fb10f393fbfd4d7adf528ec70624d2b8d247a8.tar.gz |
Six Blocks Version
Diffstat (limited to 'Blocks/syntax/scripts/shBrushAS3.js')
-rw-r--r-- | Blocks/syntax/scripts/shBrushAS3.js | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Blocks/syntax/scripts/shBrushAS3.js b/Blocks/syntax/scripts/shBrushAS3.js new file mode 100644 index 0000000..8aa3ed2 --- /dev/null +++ b/Blocks/syntax/scripts/shBrushAS3.js | |||
@@ -0,0 +1,59 @@ | |||
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 | // Created by Peter Atoria @ http://iAtoria.com | ||
25 | |||
26 | var inits = 'class interface function package'; | ||
27 | |||
28 | var keywords = '-Infinity ...rest Array as AS3 Boolean break case catch const continue Date decodeURI ' + | ||
29 | 'decodeURIComponent default delete do dynamic each else encodeURI encodeURIComponent escape ' + | ||
30 | 'extends false final finally flash_proxy for get if implements import in include Infinity ' + | ||
31 | 'instanceof int internal is isFinite isNaN isXMLName label namespace NaN native new null ' + | ||
32 | 'Null Number Object object_proxy override parseFloat parseInt private protected public ' + | ||
33 | 'return set static String super switch this throw true try typeof uint undefined unescape ' + | ||
34 | 'use void while with' | ||
35 | ; | ||
36 | |||
37 | this.regexList = [ | ||
38 | { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments | ||
39 | { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments | ||
40 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings | ||
41 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings | ||
42 | { regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers | ||
43 | { regex: new RegExp(this.getKeywords(inits), 'gm'), css: 'color3' }, // initializations | ||
44 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords | ||
45 | { regex: new RegExp('var', 'gm'), css: 'variable' }, // variable | ||
46 | { regex: new RegExp('trace', 'gm'), css: 'color1' } // trace | ||
47 | ]; | ||
48 | |||
49 | this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags); | ||
50 | }; | ||
51 | |||
52 | Brush.prototype = new SyntaxHighlighter.Highlighter(); | ||
53 | Brush.aliases = ['actionscript3', 'as3']; | ||
54 | |||
55 | SyntaxHighlighter.brushes.AS3 = Brush; | ||
56 | |||
57 | // CommonJS | ||
58 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null; | ||
59 | })(); | ||