1;(function() 2{ 3 // CommonJS 4 SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null); 5 6 function Brush() 7 { 8 // Created by Peter Atoria @ http://iAtoria.com 9 10 var inits = 'class interface function package'; 11 12 var keywords = '-Infinity ...rest Array as AS3 Boolean break case catch const continue Date decodeURI ' + 13 'decodeURIComponent default delete do dynamic each else encodeURI encodeURIComponent escape ' + 14 'extends false final finally flash_proxy for get if implements import in include Infinity ' + 15 'instanceof int internal is isFinite isNaN isXMLName label namespace NaN native new null ' + 16 'Null Number Object object_proxy override parseFloat parseInt private protected public ' + 17 'return set static String super switch this throw true try typeof uint undefined unescape ' + 18 'use void while with' 19 ; 20 21 this.regexList = [ 22 { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments 23 { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments 24 { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings 25 { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings 26 { regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers 27 { regex: new RegExp(this.getKeywords(inits), 'gm'), css: 'color3' }, // initializations 28 { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords 29 { regex: new RegExp('var', 'gm'), css: 'variable' }, // variable 30 { regex: new RegExp('trace', 'gm'), css: 'color1' } // trace 31 ]; 32 33 this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags); 34 }; 35 36 Brush.prototype = new SyntaxHighlighter.Highlighter(); 37 Brush.aliases = ['actionscript3', 'as3']; 38 39 SyntaxHighlighter.brushes.AS3 = Brush; 40 41 // CommonJS 42 typeof(exports) != 'undefined' ? exports.Brush = Brush : null; 43})(); 44