diff options
author | Andreas Gohr <andi@splitbrain.org> | 2007-04-01 21:21:49 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2007-04-01 21:21:49 +0200 |
commit | 9c0c2cfa2dbf879b6dfb923bdeccc302fd2022c3 (patch) | |
tree | 478fb0872fcabfbbc0ddea1e238637ab69078ce2 /inc/geshi/ruby.php | |
parent | 1a84a0f3f56866c0f2d06bda411a8020e7e823e5 (diff) | |
download | rpg-9c0c2cfa2dbf879b6dfb923bdeccc302fd2022c3.tar.gz rpg-9c0c2cfa2dbf879b6dfb923bdeccc302fd2022c3.tar.bz2 |
GeSHi update to 1.0.7.19
darcs-hash:20070401192149-7ad00-654ec9a23b88277521e00ef0b9ba1a283715128e.gz
Diffstat (limited to 'inc/geshi/ruby.php')
-rw-r--r-- | inc/geshi/ruby.php | 301 |
1 files changed, 186 insertions, 115 deletions
diff --git a/inc/geshi/ruby.php b/inc/geshi/ruby.php index b9b4b7454..90e56208f 100644 --- a/inc/geshi/ruby.php +++ b/inc/geshi/ruby.php @@ -2,26 +2,13 @@ /************************************************************************************* * ruby.php * -------- - * Author: Amit Gupta (http://blog.igeek.info/) - * Copyright: (c) 2005 Amit Gupta (http://blog.igeek.info/) - * Release Version: 1.0.7.18 - * Date Started: 2005/09/05 + * Author: Moises Deniz + * Copyright: (c) 2007 Moises Deniz + * Release Version: 1.0.7.19 + * Date Started: 2007/03/21 * * Ruby language file for GeSHi * - * CHANGES - * ------- - * 2006/01/05 (1.0.1) - * - Add =begin multiline comments (Juan J. Martínez) - * - Add ` string (Juan J. Martínez) - * 2005/09/05 (1.0.0) - * - First Release - * - * TODO (updated 2005/09/05) - * ------------------------- - * * Add the remaining keywords, methods, classes as per - * v1.8.2(as listed in the online manual) - * ************************************************************************************* * * This file is part of GeSHi. @@ -43,105 +30,189 @@ ************************************************************************************/ $language_data = array ( - 'LANG_NAME' => 'Ruby', - 'COMMENT_SINGLE' => array(1 => "#"), - 'COMMENT_MULTI' => array( "=begin" => "=end"), + 'LANG_NAME' => 'Ruby', + 'COMMENT_SINGLE' => array(1 => "#"), + 'COMMENT_MULTI' => array("=begin" => "=end"), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"', '`'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'alias', 'and', 'begin', 'break', 'case', 'class', - 'def', 'defined', 'do', 'else', 'elsif', 'end', - 'ensure', 'for', 'if', 'in', 'module', 'while', - 'next', 'not', 'or', 'redo', 'rescue', 'yield', - 'retry', 'super', 'then', 'undef', 'unless', - 'until', 'when', 'BEGIN', 'END', 'include' - - ), - 2 => array( - '__FILE__', '__LINE__', 'false', 'nil', 'self', 'true', 'return' - ), - 3 => array( - 'Array', 'Float', 'Integer', 'String', 'at_exit', - 'autoload', 'binding', 'caller', 'catch', 'chop', 'chop!', - 'chomp', 'chomp!', 'eval', 'exec', 'exit', 'exit!', 'fail', - 'fork', 'format', 'gets', 'global_variables', 'gsub', 'gsub!', - 'iterator?', 'lambda', 'load', 'local_variables', 'loop', 'open', - 'p', 'print', 'printf', 'proc', 'putc', 'puts', 'raise', - 'rand', 'readline', 'readlines', 'require', 'select', 'sleep', - 'split', 'sprintf', 'srand', 'sub', 'sub!', 'syscall', - 'system', 'test', 'trace_var', 'trap', 'untrace_var' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '@', '%', '&', '*', '|', '/', '<', '>', - '+', '-', '=>', '=>' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color:#9966CC; font-weight:bold;', - 2 => 'color:#0000FF; font-weight:bold;', - 3 => 'color:#CC0066; font-weight:bold;' - ), - 'COMMENTS' => array( - 1 => 'color:#008000; font-style:italic;', - 'MULTI' => 'color:#000080; font-style:italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color:#000099;' - ), - 'BRACKETS' => array( - 0 => 'color:#006600; font-weight:bold;' - ), - 'STRINGS' => array( - 0 => 'color:#996600;' - ), - 'NUMBERS' => array( - 0 => 'color:#006666;' - ), - 'METHODS' => array( - 1 => 'color:#9900CC;' - ), - 'SYMBOLS' => array( - 0 => 'color:#006600; font-weight:bold;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - 0 => array( - '<%' => '%>' - ) - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - 1 => true, - 2 => true, - ) + 'QUOTEMARKS' => array('"', '`','\''), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'alias', 'and', 'begin', 'break', 'case', 'class', + 'def', 'defined', 'do', 'else', 'elsif', 'end', + 'ensure', 'for', 'if', 'in', 'module', 'while', + 'next', 'not', 'or', 'redo', 'rescue', 'yield', + 'retry', 'super', 'then', 'undef', 'unless', + 'until', 'when', 'BEGIN', 'END', 'include' + ), + 2 => array( + '__FILE__', '__LINE__', 'false', 'nil', 'self', 'true', + 'return' + ), + 3 => array( + 'Array', 'Float', 'Integer', 'String', 'at_exit', + 'autoload', 'binding', 'caller', 'catch', 'chop', 'chop!', + 'chomp', 'chomp!', 'eval', 'exec', 'exit', 'exit!', 'fail', + 'fork', 'format', 'gets', 'global_variables', 'gsub', 'gsub!', + 'iterator?', 'lambda', 'load', 'local_variables', 'loop', + 'open', 'p', 'print', 'printf', 'proc', 'putc', 'puts', + 'raise', 'rand', 'readline', 'readlines', 'require', 'select', + 'sleep', 'split', 'sprintf', 'srand', 'sub', 'sub!', 'syscall', + 'system', 'trace_var', 'trap', 'untrace_var' + ), + 4 => array( + 'Abbrev', 'ArgumentError', 'Base64', 'Benchmark', + 'Benchmark::Tms', 'Bignum', 'Binding', 'CGI', 'CGI::Cookie', + 'CGI::HtmlExtension', 'CGI::QueryExtension', + 'CGI::Session', 'CGI::Session::FileStore', + 'CGI::Session::MemoryStore', 'Class', 'Comparable', 'Complex', + 'ConditionVariable', 'Continuation', 'Data', + 'Date', 'DateTime', 'Delegator', 'Dir', 'EOFError', 'ERB', + 'ERB::Util', 'Enumerable', 'Enumerable::Enumerator', 'Errno', + 'Exception', 'FalseClass', 'File', + 'File::Constants', 'File::Stat', 'FileTest', 'FileUtils', + 'FileUtils::DryRun', 'FileUtils::NoWrite', + 'FileUtils::StreamUtils_', 'FileUtils::Verbose', 'Find', + 'Fixnum', 'FloatDomainError', 'Forwardable', 'GC', 'Generator', + 'Hash', 'IO', 'IOError', 'Iconv', 'Iconv::BrokenLibrary', + 'Iconv::Failure', 'Iconv::IllegalSequence', + 'Iconv::InvalidCharacter', 'Iconv::InvalidEncoding', + 'Iconv::OutOfRange', 'IndexError', 'Interrupt', 'Kernel', + 'LoadError', 'LocalJumpError', 'Logger', 'Logger::Application', + 'Logger::Error', 'Logger::Formatter', 'Logger::LogDevice', + 'Logger::LogDevice::LogDeviceMutex', 'Logger::Severity', + 'Logger::ShiftingError', 'Marshal', 'MatchData', + 'Math', 'Matrix', 'Method', 'Module', 'Mutex', 'NameError', + 'NameError::message', 'NilClass', 'NoMemoryError', + 'NoMethodError', 'NotImplementedError', 'Numeric', 'Object', + 'ObjectSpace', 'Observable', 'PStore', 'PStore::Error', + 'Pathname', 'Precision', 'Proc', 'Process', 'Process::GID', + 'Process::Status', 'Process::Sys', 'Process::UID', 'Queue', + 'Range', 'RangeError', 'Rational', 'Regexp', 'RegexpError', + 'RuntimeError', 'ScriptError', 'SecurityError', 'Set', + 'Shellwords', 'Signal', 'SignalException', 'SimpleDelegator', + 'SingleForwardable', 'Singleton', 'SingletonClassMethods', + 'SizedQueue', 'SortedSet', 'StandardError', 'StringIO', + 'StringScanner', 'StringScanner::Error', 'Struct', 'Symbol', + 'SyncEnumerator', 'SyntaxError', 'SystemCallError', + 'SystemExit', 'SystemStackError', 'Tempfile', + 'Test::Unit::TestCase', 'Test::Unit', 'Test', 'Thread', + 'ThreadError', 'ThreadGroup', + 'ThreadsWait', 'Time', 'TrueClass', 'TypeError', 'URI', + 'URI::BadURIError', 'URI::Error', 'URI::Escape', 'URI::FTP', + 'URI::Generic', 'URI::HTTP', 'URI::HTTPS', + 'URI::InvalidComponentError', 'URI::InvalidURIError', + 'URI::LDAP', 'URI::MailTo', 'URI::REGEXP', + 'URI::REGEXP::PATTERN', 'UnboundMethod', 'Vector', 'YAML', + 'ZeroDivisionError', 'Zlib', + 'Zlib::BufError', 'Zlib::DataError', 'Zlib::Deflate', + 'Zlib::Error', 'Zlib::GzipFile', 'Zlib::GzipFile::CRCError', + 'Zlib::GzipFile::Error', 'Zlib::GzipFile::LengthError', + 'Zlib::GzipFile::NoFooter', 'Zlib::GzipReader', + 'Zlib::GzipWriter', 'Zlib::Inflate', 'Zlib::MemError', + 'Zlib::NeedDict', 'Zlib::StreamEnd', 'Zlib::StreamError', + 'Zlib::VersionError', + 'Zlib::ZStream', + 'Enumerable', + 'HTML::Selector', 'HashWithIndifferentAccess', 'Inflector', + 'Inflector::Inflections', 'Mime', 'Mime::Type', + 'OCI8AutoRecover', 'Symbol', 'TimeZone', 'XmlSimple' + ), + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '%', '&', '*', '|', '/', '<', '>', + '+', '-', '=>', '=>', '<<' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color:#9966CC; font-weight:bold;', + 2 => 'color:#0000FF; font-weight:bold;', + 3 => 'color:#CC0066; font-weight:bold;', + 4 => 'color:#CC00FF; font-weight:bold;', + ), + 'COMMENTS' => array( + 1 => 'color:#008000; font-style:italic;', + 'MULTI' => 'color:#000080; font-style:italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color:#000099;' + ), + 'BRACKETS' => array( + 0 => 'color:#006600; font-weight:bold;' + ), + 'STRINGS' => array( + 0 => 'color:#996600;' + ), + 'NUMBERS' => array( + 0 => 'color:#006666;' + ), + 'METHODS' => array( + 1 => 'color:#9900CC;' + ), + 'SYMBOLS' => array( + 0 => 'color:#006600; font-weight:bold;' + ), + 'REGEXPS' => array( + 0 => 'color:#ff6633; font-weight:bold;', + 1 => 'color:#0066ff; font-weight:bold;', + 2 => 'color:#6666ff; font-weight:bold;', + 3 => 'color:#ff3333; font-weight:bold;' + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + 0 => array( + GESHI_SEARCH => "([[:space:]])(\\$[a-zA-Z_][a-zA-Z0-9_]*)", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 1 => array( + GESHI_SEARCH => "([[:space:]])(@[a-zA-Z_][a-zA-Z0-9_]*)", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*", + 3 => array( + GESHI_SEARCH => "([[:space:]]|\[|\()(:[a-zA-Z_][a-zA-Z0-9_]*)", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '<%' => '%>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + ) ); ?> |