From a635c931ff8aa79728d93a4835e06a75e8f90be8 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 14 Feb 2012 01:17:10 +0100 Subject: bump geshi to 1.0.8.10 Signed-off-by: Florian Pritz --- application/libraries/geshi/ecmascript.php | 210 +++++++++++++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 application/libraries/geshi/ecmascript.php (limited to 'application/libraries/geshi/ecmascript.php') diff --git a/application/libraries/geshi/ecmascript.php b/application/libraries/geshi/ecmascript.php new file mode 100644 index 000000000..e220c839b --- /dev/null +++ b/application/libraries/geshi/ecmascript.php @@ -0,0 +1,210 @@ + 'ECMAScript', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + // Regular Expression Literals + 'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\*\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\*\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\*\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", + //Hexadecimal Char Specs + 2 => "#\\\\x[\da-fA-F]{2}#", + //Hexadecimal Char Specs + 3 => "#\\\\u[\da-fA-F]{4}#", + //Hexadecimal Char Specs + 4 => "#\\\\U[\da-fA-F]{8}#", + //Octal Char Specs + 5 => "#\\\\[0-7]{1,3}#" + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | + GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( // Reserved literals + 'false', 'true', + 'null' + ), + 2 => array( // Main keywords + 'break', 'case', 'catch', 'continue', 'default', 'delete', 'do', 'else', + 'finally', 'for', 'function', 'if', 'in', 'instanceof', 'new', 'return', + 'switch', 'this', 'throw', 'try', 'typeof', 'var', 'void', 'while', + 'with' + ), + 3 => array( // Extra keywords or keywords reserved for future use + 'abstract', 'as', 'boolean', 'byte', 'char', 'class', 'const', 'debugger', + 'double', 'enum', 'export', 'extends', 'final', 'float', 'goto', 'implements', + 'import', 'int', 'interface', 'is', 'long', 'native', 'namespace', 'package', + 'private', 'protected', 'public', 'short', 'static', 'super', 'synchronized', 'throws', + 'transient', 'use', 'volatile' + ), + 4 => array( // Operators + 'get', 'set' + ), + 5 => array( // Built-in object classes + 'Array', 'Boolean', 'Date', 'EvalError', 'Error', 'Function', 'Math', 'Number', + 'Object', 'RangeError', 'ReferenceError', 'RegExp', 'String', 'SyntaxError', 'TypeError', 'URIError' + ), + 6 => array( // Global properties + 'Infinity', 'NaN', 'undefined' + ), + 7 => array( // Global methods + 'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', + 'eval', 'isFinite', 'isNaN', 'parseFloat', 'parseInt', + // The escape and unescape functions do not work properly for non-ASCII characters and have been deprecated. + // In JavaScript 1.5 and later, use encodeURI, decodeURI, encodeURIComponent, and decodeURIComponent. + 'escape', 'unescape' + ), + 8 => array( // Function's arguments + 'arguments' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', + '+', '-', '*', '/', '%', + '!', '.', '&', '|', '^', + '<', '>', '=', '~', + ',', ';', '?', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #009999;', + 2 => 'color: #1500C8;', + 3 => 'color: #1500C8;', + 4 => 'color: #1500C8;', + 5 => 'color: #1500C8;', + 6 => 'color: #1500C8;', + 7 => 'color: #1500C8;', + 8 => 'color: #1500C8;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #CC0000;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #3366CC;', + 1 => 'color: #3366CC;', + 2 => 'color: #3366CC;', + 3 => 'color: #3366CC;', + 4 => 'color: #3366CC;', + 5 => 'color: #3366CC;', + 'HARD' => '', + ), + 'BRACKETS' => array( + 0 => 'color: #008800;' + ), + 'STRINGS' => array( + 0 => 'color: #9900FF;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF00FF;', + GESHI_NUMBER_BIN_PREFIX_0B => 'color: #FF00FF;', + GESHI_NUMBER_OCT_PREFIX => 'color: #FF00FF;', + GESHI_NUMBER_HEX_PREFIX => 'color: #FF00FF;', + GESHI_NUMBER_FLT_SCI_SHORT => 'color: #FF00FF;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color: #FF00FF;', + GESHI_NUMBER_FLT_NONSCI_F => 'color: #FF00FF;', + GESHI_NUMBER_FLT_NONSCI => 'color: #FF00FF;' + ), + 'METHODS' => array( + 1 => 'color: #660066;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file -- cgit v1.2.3-24-g4f1b