rss layout now fully separated m/v/c
[dylansserver.git] / includes / syntax / scripts / shBrushAS3.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 // 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 })();