Mercurial > hg > soundsoftware-site
diff vendor/gems/coderay-1.0.0/lib/coderay/token_kinds.rb @ 909:cbb26bc654de redmine-1.3
Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author | Chris Cannam |
---|---|
date | Fri, 24 Feb 2012 19:09:32 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/gems/coderay-1.0.0/lib/coderay/token_kinds.rb Fri Feb 24 19:09:32 2012 +0000 @@ -0,0 +1,90 @@ +module CodeRay + + # A Hash of all known token kinds and their associated CSS classes. + TokenKinds = Hash.new do |h, k| + warn 'Undefined Token kind: %p' % [k] if $CODERAY_DEBUG + false + end + + # speedup + TokenKinds.compare_by_identity if TokenKinds.respond_to? :compare_by_identity + + TokenKinds.update( # :nodoc: + :annotation => 'annotation', + :attribute_name => 'attribute-name', + :attribute_value => 'attribute-value', + :binary => 'bin', + :char => 'char', + :class => 'class', + :class_variable => 'class-variable', + :color => 'color', + :comment => 'comment', + :complex => 'complex', + :constant => 'constant', + :content => 'content', + :debug => 'debug', + :decorator => 'decorator', + :definition => 'definition', + :delimiter => 'delimiter', + :directive => 'directive', + :doc => 'doc', + :doctype => 'doctype', + :doc_string => 'doc-string', + :entity => 'entity', + :error => 'error', + :escape => 'escape', + :exception => 'exception', + :filename => 'filename', + :float => 'float', + :function => 'function', + :global_variable => 'global-variable', + :hex => 'hex', + :imaginary => 'imaginary', + :important => 'important', + :include => 'include', + :inline => 'inline', + :inline_delimiter => 'inline-delimiter', + :instance_variable => 'instance-variable', + :integer => 'integer', + :key => 'key', + :keyword => 'keyword', + :label => 'label', + :local_variable => 'local-variable', + :modifier => 'modifier', + :namespace => 'namespace', + :octal => 'octal', + :predefined => 'predefined', + :predefined_constant => 'predefined-constant', + :predefined_type => 'predefined-type', + :preprocessor => 'preprocessor', + :pseudo_class => 'pseudo-class', + :regexp => 'regexp', + :reserved => 'reserved', + :shell => 'shell', + :string => 'string', + :symbol => 'symbol', + :tag => 'tag', + :type => 'type', + :value => 'value', + :variable => 'variable', + + :change => 'change', + :delete => 'delete', + :head => 'head', + :insert => 'insert', + + :eyecatcher => 'eyecatcher', + + :ident => false, + :operator => false, + + :space => false, + :plain => false + ) + + TokenKinds[:method] = TokenKinds[:function] + TokenKinds[:escape] = TokenKinds[:delimiter] + TokenKinds[:docstring] = TokenKinds[:comment] + + TokenKinds.freeze +end