Mercurial > hg > soundsoftware-site
comparison 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 |
comparison
equal
deleted
inserted
replaced
908:c6c2cbd0afee | 909:cbb26bc654de |
---|---|
1 module CodeRay | |
2 | |
3 # A Hash of all known token kinds and their associated CSS classes. | |
4 TokenKinds = Hash.new do |h, k| | |
5 warn 'Undefined Token kind: %p' % [k] if $CODERAY_DEBUG | |
6 false | |
7 end | |
8 | |
9 # speedup | |
10 TokenKinds.compare_by_identity if TokenKinds.respond_to? :compare_by_identity | |
11 | |
12 TokenKinds.update( # :nodoc: | |
13 :annotation => 'annotation', | |
14 :attribute_name => 'attribute-name', | |
15 :attribute_value => 'attribute-value', | |
16 :binary => 'bin', | |
17 :char => 'char', | |
18 :class => 'class', | |
19 :class_variable => 'class-variable', | |
20 :color => 'color', | |
21 :comment => 'comment', | |
22 :complex => 'complex', | |
23 :constant => 'constant', | |
24 :content => 'content', | |
25 :debug => 'debug', | |
26 :decorator => 'decorator', | |
27 :definition => 'definition', | |
28 :delimiter => 'delimiter', | |
29 :directive => 'directive', | |
30 :doc => 'doc', | |
31 :doctype => 'doctype', | |
32 :doc_string => 'doc-string', | |
33 :entity => 'entity', | |
34 :error => 'error', | |
35 :escape => 'escape', | |
36 :exception => 'exception', | |
37 :filename => 'filename', | |
38 :float => 'float', | |
39 :function => 'function', | |
40 :global_variable => 'global-variable', | |
41 :hex => 'hex', | |
42 :imaginary => 'imaginary', | |
43 :important => 'important', | |
44 :include => 'include', | |
45 :inline => 'inline', | |
46 :inline_delimiter => 'inline-delimiter', | |
47 :instance_variable => 'instance-variable', | |
48 :integer => 'integer', | |
49 :key => 'key', | |
50 :keyword => 'keyword', | |
51 :label => 'label', | |
52 :local_variable => 'local-variable', | |
53 :modifier => 'modifier', | |
54 :namespace => 'namespace', | |
55 :octal => 'octal', | |
56 :predefined => 'predefined', | |
57 :predefined_constant => 'predefined-constant', | |
58 :predefined_type => 'predefined-type', | |
59 :preprocessor => 'preprocessor', | |
60 :pseudo_class => 'pseudo-class', | |
61 :regexp => 'regexp', | |
62 :reserved => 'reserved', | |
63 :shell => 'shell', | |
64 :string => 'string', | |
65 :symbol => 'symbol', | |
66 :tag => 'tag', | |
67 :type => 'type', | |
68 :value => 'value', | |
69 :variable => 'variable', | |
70 | |
71 :change => 'change', | |
72 :delete => 'delete', | |
73 :head => 'head', | |
74 :insert => 'insert', | |
75 | |
76 :eyecatcher => 'eyecatcher', | |
77 | |
78 :ident => false, | |
79 :operator => false, | |
80 | |
81 :space => false, | |
82 :plain => false | |
83 ) | |
84 | |
85 TokenKinds[:method] = TokenKinds[:function] | |
86 TokenKinds[:escape] = TokenKinds[:delimiter] | |
87 TokenKinds[:docstring] = TokenKinds[:comment] | |
88 | |
89 TokenKinds.freeze | |
90 end |