From 4d57caedaa53da50eb55e574762cb82502b5fc02 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 12 Sep 2010 02:04:21 +0200 Subject: switch to geshi for highlighting Signed-off-by: Florian Pritz --- system/application/libraries/geshi/cil.php | 196 +++++++++++++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 system/application/libraries/geshi/cil.php (limited to 'system/application/libraries/geshi/cil.php') diff --git a/system/application/libraries/geshi/cil.php b/system/application/libraries/geshi/cil.php new file mode 100644 index 000000000..4ca93ecb0 --- /dev/null +++ b/system/application/libraries/geshi/cil.php @@ -0,0 +1,196 @@ + 'CIL', + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'COMMENT_SINGLE' => array('//'), + 'COMMENT_MULTI' => array(), + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array(//Dotted + '.zeroinit', '.vtfixup', '.vtentry', '.vtable', '.ver', '.try', '.subsystem', '.size', '.set', '.removeon', + '.publickeytoken', '.publickey', '.property', '.permissionset', '.permission', '.pdirect', '.param', '.pack', + '.override', '.other', '.namespace', '.mresource', '.module', '.method', '.maxstack', '.manifestres', '.locals', + '.localized', '.locale', '.line', '.language', '.import', '.imagebase', '.hash', '.get', '.fire', '.file', '.field', + '.export', '.event', '.entrypoint', '.emitbyte', '.data', '.custom', '.culture', '.ctor', '.corflags', '.class', + '.cctor', '.assembly', '.addon' + ), + 2 => array(//Attributes + 'wrapper', 'with', 'winapi', 'virtual', 'vector', 'vararg', 'value', 'userdefined', 'unused', 'unmanagedexp', + 'unmanaged', 'unicode', 'to', 'tls', 'thiscall', 'synchronized', 'struct', 'strict', 'storage', 'stdcall', + 'static', 'specialname', 'special', 'serializable', 'sequential', 'sealed', 'runtime', 'rtspecialname', 'request', + 'reqsecobj', 'reqrefuse', 'reqopt', 'reqmin', 'record', 'public', 'privatescope', 'private', 'preservesig', + 'prejitgrant', 'prejitdeny', 'platformapi', 'pinvokeimpl', 'pinned', 'permitonly', 'out', 'optil', 'opt', + 'notserialized', 'notremotable', 'not_in_gc_heap', 'noprocess', 'noncaslinkdemand', 'noncasinheritance', + 'noncasdemand', 'nometadata', 'nomangle', 'nomachine', 'noinlining', 'noappdomain', 'newslot', 'nested', 'native', + 'modreq', 'modopt', 'marshal', 'managed', 'literal', 'linkcheck', 'lcid', 'lasterr', 'internalcall', 'interface', + 'instance', 'initonly', 'init', 'inheritcheck', 'in', 'import', 'implicitres', 'implicitcom', 'implements', + 'illegal', 'il', 'hidebysig', 'handler', 'fromunmanaged', 'forwardref', 'fixed', 'finally', 'final', 'filter', + 'filetime', 'field', 'fault', 'fastcall', 'famorassem', 'family', 'famandassem', 'extern', 'extends', 'explicit', + 'error', 'enum', 'endmac', 'deny', 'demand', 'default', 'custom', 'compilercontrolled', 'clsid', 'class', 'cil', + 'cf', 'cdecl', 'catch', 'beforefieldinit', 'autochar', 'auto', 'at', 'assert', 'assembly', 'as', 'any', 'ansi', + 'alignment', 'algorithm', 'abstract' + ), + 3 => array(//Types + 'wchar', 'void', 'variant', 'unsigned', 'valuetype', 'typedref', 'tbstr', 'sysstring', 'syschar', 'string', + 'streamed_object', 'stream', 'stored_object', 'safearray', 'objectref', 'object', 'nullref', 'method', 'lpwstr', + 'lpvoid', 'lptstr', 'lpstruct', 'lpstr', 'iunknown', 'int64', 'int32', 'int16', 'int8', 'int', 'idispatch', + 'hresult', 'float64', 'float32', 'float', 'decimal', 'date', 'currency', 'char', 'carray', 'byvalstr', + 'bytearray', 'boxed', 'bool', 'blob_object', 'blob', 'array' + ), + 4 => array(//Prefix + 'volatile', 'unaligned', 'tail', 'readonly', 'no', 'constrained' + ), + 5 => array(//Suffix + 'un', 'u8', 'u4', 'u2', 'u1', 'u', 's', 'ref', 'r8', 'r4', 'm1', 'i8', 'i4', 'i2', 'i1', 'i'#, '.8', '.7', '.6', '.5', '.4', '.3', '.2', '.1', '.0' + ), + 6 => array(//Base + 'xor', 'switch', 'sub', 'stloc', + 'stind', 'starg', + 'shr', 'shl', 'ret', 'rem', 'pop', 'or', 'not', 'nop', 'neg', 'mul', + 'localloc', 'leave', 'ldnull', 'ldloca', + 'ldloc', 'ldind', 'ldftn', 'ldc', 'ldarga', + 'ldarg', 'jmp', 'initblk', 'endfinally', 'endfilter', + 'endfault', 'dup', 'div', 'cpblk', 'conv', 'clt', 'ckfinite', 'cgt', 'ceq', 'calli', + 'call', 'brzero', 'brtrue', 'brnull', 'brinst', + 'brfalse', 'break', 'br', 'bne', 'blt', 'ble', 'bgt', 'bge', 'beq', 'arglist', + 'and', 'add' + ), + 7 => array(//Object + 'unbox.any', 'unbox', 'throw', 'stsfld', 'stobj', 'stfld', 'stelem', 'sizeof', 'rethrow', 'refanyval', 'refanytype', 'newobj', + 'newarr', 'mkrefany', 'ldvirtftn', 'ldtoken', 'ldstr', 'ldsflda', 'ldsfld', 'ldobj', 'ldlen', 'ldflda', 'ldfld', + 'ldelema', 'ldelem', 'isinst', 'initobj', 'cpobj', 'castclass', + 'callvirt', 'callmostderived', 'box' + ), + 8 => array(//Other + 'prefixref', 'prefix7', 'prefix6', 'prefix5', 'prefix4', 'prefix3', 'prefix2', 'prefix1', 'prefix0' + ), + 9 => array(//Literal + 'true', 'null', 'false' + ), + 10 => array(//Comment-like + '#line', '^THE_END^' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '!!' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + 9 => true, + 10 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color:maroon;font-weight:bold;', + 2 => 'color:blue;font-weight:bold;', + 3 => 'color:purple;font-weight:bold;', + 4 => 'color:teal;', + 5 => 'color:blue;', + 6 => 'color:blue;', + 7 => 'color:blue;', + 8 => 'color:blue;', + 9 => 'color:00008B', + 10 => 'color:gray' + ), + 'COMMENTS' => array( + 0 => 'color:gray;font-style:italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #008000; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #006400;' + ), + 'STRINGS' => array( + 0 => 'color: #008000;' + ), + 'NUMBERS' => array( + 0 => 'color: #00008B;' + ), + 'METHODS' => array( + 1 => 'color: #000033;' + ), + 'SYMBOLS' => array( + 0 => 'color: #006400;' + ), + 'REGEXPS' => array( + 0 => 'color:blue;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + 9 => '', + 10 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '::' + ), + 'REGEXPS' => array( + 0 => '(?<=ldc\\.i4\\.)[0-8]|(?<=(?:ldarg|ldloc|stloc)\\.)[0-3]' # Pickup the opcodes that end with integers + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> -- cgit v1.2.3-24-g4f1b