diff options
author | JinweiClarkChao <[email protected]> | 2014-08-22 17:23:02 +0800 |
---|---|---|
committer | Jinwei Zhao <[email protected]> | 2017-01-13 15:07:42 +0800 |
commit | 80255411ee7040e0cebbf6b05d2ce323f6f2596e (patch) | |
tree | 295b0ef6c85e7cb091b63719ab041596879690fa /Back/Blocks/syntax/scripts/shBrushAS3.js | |
parent | 13be3d058713e1467ffc573a90cc694b80526135 (diff) | |
download | jinwei.me-80255411ee7040e0cebbf6b05d2ce323f6f2596e.tar.gz |
backup
Diffstat (limited to 'Back/Blocks/syntax/scripts/shBrushAS3.js')
-rw-r--r-- | Back/Blocks/syntax/scripts/shBrushAS3.js | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Back/Blocks/syntax/scripts/shBrushAS3.js b/Back/Blocks/syntax/scripts/shBrushAS3.js new file mode 100644 index 0000000..8aa3ed2 --- /dev/null +++ b/Back/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 | })(); | ||