checkoff 0.200.0 → 0.203.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +130 -28
  3. data/.git-hooks/pre_commit/solargraph_typecheck.rb +12 -11
  4. data/.overcommit.yml +27 -2
  5. data/.rubocop.yml +20 -2
  6. data/.rubocop_todo.yml +90 -0
  7. data/.solargraph.yml +10 -1
  8. data/DEVELOPMENT.md +1 -1
  9. data/Gemfile +11 -8
  10. data/Gemfile.lock +66 -42
  11. data/LICENSE +1 -1
  12. data/Makefile +14 -12
  13. data/bin/brakeman +27 -0
  14. data/bin/overcommit_branch +117 -0
  15. data/bin/spoom +27 -0
  16. data/bin/srb +27 -0
  17. data/bin/srb-rbi +27 -0
  18. data/bin/tapioca +27 -0
  19. data/config/annotations_misc.rb +35 -0
  20. data/docs/cookiecutter_input.json +1 -0
  21. data/fix.sh +14 -6
  22. data/lib/checkoff/custom_fields.rb +3 -2
  23. data/lib/checkoff/internal/search_url/simple_param_converter.rb +11 -0
  24. data/lib/checkoff/version.rb +1 -1
  25. data/requirements_dev.txt +1 -1
  26. data/sorbet/config +4 -0
  27. data/sorbet/rbi/annotations/.gitattributes +1 -0
  28. data/sorbet/rbi/annotations/activesupport.rbi +453 -0
  29. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  30. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  31. data/sorbet/rbi/annotations/mocha.rbi +34 -0
  32. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  33. data/sorbet/rbi/annotations/webmock.rbi +9 -0
  34. data/sorbet/rbi/dsl/.gitattributes +1 -0
  35. data/sorbet/rbi/dsl/active_support/callbacks.rbi +23 -0
  36. data/sorbet/rbi/gems/.gitattributes +1 -0
  37. data/sorbet/rbi/gems/activesupport@7.1.3.rbi +18749 -0
  38. data/sorbet/rbi/gems/addressable@2.8.6.rbi +1994 -0
  39. data/sorbet/rbi/gems/ansi@1.5.0.rbi +688 -0
  40. data/sorbet/rbi/gems/asana@0.10.6-ab9393136d9ca59b75e42a661fdddc1c65c8f7c3.rbi +6142 -0
  41. data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
  42. data/sorbet/rbi/gems/backport@1.2.0.rbi +523 -0
  43. data/sorbet/rbi/gems/base64@0.2.0.rbi +509 -0
  44. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +618 -0
  45. data/sorbet/rbi/gems/bigdecimal@3.1.5.rbi +78 -0
  46. data/sorbet/rbi/gems/builder@3.2.4.rbi +505 -0
  47. data/sorbet/rbi/gems/bump@0.10.0.rbi +169 -0
  48. data/sorbet/rbi/gems/cache@0.4.1.rbi +211 -0
  49. data/sorbet/rbi/gems/cache_method@0.2.7.rbi +293 -0
  50. data/sorbet/rbi/gems/chef-utils@18.3.0.rbi +9 -0
  51. data/sorbet/rbi/gems/childprocess@5.1.0.rbi +383 -0
  52. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3427 -0
  53. data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +11591 -0
  54. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +9 -0
  55. data/sorbet/rbi/gems/crack@0.4.5.rbi +145 -0
  56. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +969 -0
  57. data/sorbet/rbi/gems/docile@1.4.0.rbi +377 -0
  58. data/sorbet/rbi/gems/drb@2.2.0.rbi +1347 -0
  59. data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +9 -0
  60. data/sorbet/rbi/gems/erubi@1.13.0.rbi +152 -0
  61. data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +222 -0
  62. data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +126 -0
  63. data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +136 -0
  64. data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +145 -0
  65. data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +259 -0
  66. data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +142 -0
  67. data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +118 -0
  68. data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +125 -0
  69. data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +133 -0
  70. data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +198 -0
  71. data/sorbet/rbi/gems/faraday@1.10.3.rbi +2729 -0
  72. data/sorbet/rbi/gems/faraday_middleware-multi_json@0.0.6.rbi +29 -0
  73. data/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi +1004 -0
  74. data/sorbet/rbi/gems/gli@2.21.1.rbi +9 -0
  75. data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +351 -0
  76. data/sorbet/rbi/gems/i18n@1.14.1.rbi +2326 -0
  77. data/sorbet/rbi/gems/imagen@0.1.8.rbi +340 -0
  78. data/sorbet/rbi/gems/iniparse@1.5.0.rbi +899 -0
  79. data/sorbet/rbi/gems/jaro_winkler@1.6.0.rbi +22 -0
  80. data/sorbet/rbi/gems/json@2.7.1.rbi +1562 -0
  81. data/sorbet/rbi/gems/jwt@2.7.1.rbi +1405 -0
  82. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +128 -0
  83. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +3272 -0
  84. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
  85. data/sorbet/rbi/gems/logger@1.6.1.rbi +920 -0
  86. data/sorbet/rbi/gems/mdl@0.13.0.rbi +445 -0
  87. data/sorbet/rbi/gems/method_source@1.0.0.rbi +273 -0
  88. data/sorbet/rbi/gems/mime-types-data@3.2023.1205.rbi +127 -0
  89. data/sorbet/rbi/gems/mime-types@3.5.1.rbi +1252 -0
  90. data/sorbet/rbi/gems/minitest-profile@0.0.2.rbi +136 -0
  91. data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +1014 -0
  92. data/sorbet/rbi/gems/minitest@5.21.1.rbi +1539 -0
  93. data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +314 -0
  94. data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +581 -0
  95. data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +629 -0
  96. data/sorbet/rbi/gems/mocha@2.1.0.rbi +12 -0
  97. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +268 -0
  98. data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +102 -0
  99. data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +234 -0
  100. data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +94 -0
  101. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  102. data/sorbet/rbi/gems/nokogiri@1.16.7.rbi +7311 -0
  103. data/sorbet/rbi/gems/oauth2@1.4.11.rbi +833 -0
  104. data/sorbet/rbi/gems/ostruct@0.6.1.rbi +354 -0
  105. data/sorbet/rbi/gems/overcommit@0.64.0.rbi +2400 -0
  106. data/sorbet/rbi/gems/parallel@1.23.0.rbi +274 -0
  107. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +7253 -0
  108. data/sorbet/rbi/gems/prism@1.2.0.rbi +39085 -0
  109. data/sorbet/rbi/gems/pry@0.14.2.rbi +10070 -0
  110. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +936 -0
  111. data/sorbet/rbi/gems/punchlist@1.3.2.rbi +173 -0
  112. data/sorbet/rbi/gems/racc@1.7.3.rbi +162 -0
  113. data/sorbet/rbi/gems/rack@3.0.8.rbi +5184 -0
  114. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  115. data/sorbet/rbi/gems/rake@13.1.0.rbi +3022 -0
  116. data/sorbet/rbi/gems/rbi@0.2.1.rbi +4535 -0
  117. data/sorbet/rbi/gems/rbs@2.8.4.rbi +5613 -0
  118. data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +3750 -0
  119. data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +390 -0
  120. data/sorbet/rbi/gems/rexml@3.2.6.rbi +4888 -0
  121. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7061 -0
  122. data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +2577 -0
  123. data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +3262 -0
  124. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +329 -0
  125. data/sorbet/rbi/gems/rubocop@1.59.0.rbi +57238 -0
  126. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  127. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +9 -0
  128. data/sorbet/rbi/gems/rugged@1.6.3.rbi +1577 -0
  129. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +217 -0
  130. data/sorbet/rbi/gems/simplecov-lcov@0.8.0.rbi +256 -0
  131. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2149 -0
  132. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +9 -0
  133. data/sorbet/rbi/gems/solargraph@0.50.1-904b9304770a59fac393c5cc3cad481e5bdf0fd8.rbi +9396 -0
  134. data/sorbet/rbi/gems/source_finder@3.2.1.rbi +317 -0
  135. data/sorbet/rbi/gems/spoom@1.5.0.rbi +4932 -0
  136. data/sorbet/rbi/gems/tapioca@0.16.4.rbi +3604 -0
  137. data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
  138. data/sorbet/rbi/gems/tilt@2.4.0.rbi +933 -0
  139. data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +9 -0
  140. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
  141. data/sorbet/rbi/gems/undercover@0.5.0.rbi +433 -0
  142. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
  143. data/sorbet/rbi/gems/webmock@3.19.1.rbi +1769 -0
  144. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  145. data/sorbet/rbi/gems/yard@0.9.34.rbi +18247 -0
  146. data/sorbet/rbi/todo.rbi +11 -0
  147. data/sorbet/tapioca/config.yml +13 -0
  148. data/sorbet/tapioca/require.rb +4 -0
  149. metadata +134 -3
@@ -0,0 +1,3427 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `coderay` gem.
5
+ # Please instead update this file by running `bin/tapioca gem coderay`.
6
+
7
+
8
+ # = CodeRay Library
9
+ #
10
+ # CodeRay is a Ruby library for syntax highlighting.
11
+ #
12
+ # I try to make CodeRay easy to use and intuitive, but at the same time fully
13
+ # featured, complete, fast and efficient.
14
+ #
15
+ # See README.
16
+ #
17
+ # It consists mainly of
18
+ # * the main engine: CodeRay (Scanners::Scanner, Tokens, Encoders::Encoder)
19
+ # * the plugin system: PluginHost, Plugin
20
+ # * the scanners in CodeRay::Scanners
21
+ # * the encoders in CodeRay::Encoders
22
+ # * the styles in CodeRay::Styles
23
+ #
24
+ # Here's a fancy graphic to light up this gray docu:
25
+ #
26
+ # http://cycnus.de/raindark/coderay/scheme.png
27
+ #
28
+ # == Documentation
29
+ #
30
+ # See CodeRay, Encoders, Scanners, Tokens.
31
+ #
32
+ # == Usage
33
+ #
34
+ # Remember you need RubyGems to use CodeRay, unless you have it in your load
35
+ # path. Run Ruby with -rubygems option if required.
36
+ #
37
+ # === Highlight Ruby code in a string as html
38
+ #
39
+ # require 'coderay'
40
+ # print CodeRay.scan('puts "Hello, world!"', :ruby).html
41
+ #
42
+ # # prints something like this:
43
+ # puts <span class="s">&quot;Hello, world!&quot;</span>
44
+ #
45
+ #
46
+ # === Highlight C code from a file in a html div
47
+ #
48
+ # require 'coderay'
49
+ # print CodeRay.scan(File.read('ruby.h'), :c).div
50
+ # print CodeRay.scan_file('ruby.h').html.div
51
+ #
52
+ # You can include this div in your page. The used CSS styles can be printed with
53
+ #
54
+ # % coderay_stylesheet
55
+ #
56
+ # === Highlight without typing too much
57
+ #
58
+ # If you are one of the hasty (or lazy, or extremely curious) people, just run this file:
59
+ #
60
+ # % ruby -rubygems /path/to/coderay/coderay.rb > example.html
61
+ #
62
+ # and look at the file it created in your browser.
63
+ #
64
+ # = CodeRay Module
65
+ #
66
+ # The CodeRay module provides convenience methods for the engine.
67
+ #
68
+ # * The +lang+ and +format+ arguments select Scanner and Encoder to use. These are
69
+ # simply lower-case symbols, like <tt>:python</tt> or <tt>:html</tt>.
70
+ # * All methods take an optional hash as last parameter, +options+, that is send to
71
+ # the Encoder / Scanner.
72
+ # * Input and language are always sorted in this order: +code+, +lang+.
73
+ # (This is in alphabetical order, if you need a mnemonic ;)
74
+ #
75
+ # You should be able to highlight everything you want just using these methods;
76
+ # so there is no need to dive into CodeRay's deep class hierarchy.
77
+ #
78
+ # The examples in the demo directory demonstrate common cases using this interface.
79
+ #
80
+ # = Basic Access Ways
81
+ #
82
+ # Read this to get a general view what CodeRay provides.
83
+ #
84
+ # == Scanning
85
+ #
86
+ # Scanning means analysing an input string, splitting it up into Tokens.
87
+ # Each Token knows about what type it is: string, comment, class name, etc.
88
+ #
89
+ # Each +lang+ (language) has its own Scanner; for example, <tt>:ruby</tt> code is
90
+ # handled by CodeRay::Scanners::Ruby.
91
+ #
92
+ # CodeRay.scan:: Scan a string in a given language into Tokens.
93
+ # This is the most common method to use.
94
+ # CodeRay.scan_file:: Scan a file and guess the language using FileType.
95
+ #
96
+ # The Tokens object you get from these methods can encode itself; see Tokens.
97
+ #
98
+ # == Encoding
99
+ #
100
+ # Encoding means compiling Tokens into an output. This can be colored HTML or
101
+ # LaTeX, a textual statistic or just the number of non-whitespace tokens.
102
+ #
103
+ # Each Encoder provides output in a specific +format+, so you select Encoders via
104
+ # formats like <tt>:html</tt> or <tt>:statistic</tt>.
105
+ #
106
+ # CodeRay.encode:: Scan and encode a string in a given language.
107
+ # CodeRay.encode_tokens:: Encode the given tokens.
108
+ # CodeRay.encode_file:: Scan a file, guess the language using FileType and encode it.
109
+ #
110
+ # == All-in-One Encoding
111
+ #
112
+ # CodeRay.encode:: Highlight a string with a given input and output format.
113
+ #
114
+ # == Instanciating
115
+ #
116
+ # You can use an Encoder instance to highlight multiple inputs. This way, the setup
117
+ # for this Encoder must only be done once.
118
+ #
119
+ # CodeRay.encoder:: Create an Encoder instance with format and options.
120
+ # CodeRay.scanner:: Create an Scanner instance for lang, with '' as default code.
121
+ #
122
+ # To make use of CodeRay.scanner, use CodeRay::Scanner::code=.
123
+ #
124
+ # The scanning methods provide more flexibility; we recommend to use these.
125
+ #
126
+ # == Reusing Scanners and Encoders
127
+ #
128
+ # If you want to re-use scanners and encoders (because that is faster), see
129
+ # CodeRay::Duo for the most convenient (and recommended) interface.
130
+ #
131
+ # source://coderay//lib/coderay.rb#126
132
+ module CodeRay
133
+ class << self
134
+ # Assuming the path is a subpath of lib/coderay/
135
+ #
136
+ # source://coderay//lib/coderay.rb#133
137
+ def coderay_path(*path); end
138
+
139
+ # Encode a string.
140
+ #
141
+ # This scans +code+ with the the Scanner for +lang+ and then
142
+ # encodes it with the Encoder for +format+.
143
+ # +options+ will be passed to the Encoder.
144
+ #
145
+ # See CodeRay::Encoder.encode.
146
+ #
147
+ # source://coderay//lib/coderay.rb#196
148
+ def encode(code, lang, format, options = T.unsafe(nil)); end
149
+
150
+ # Encodes +filename+ (a path to a code file) with the Scanner for +lang+.
151
+ #
152
+ # See CodeRay.scan_file.
153
+ # Notice that the second argument is the output +format+, not the input language.
154
+ #
155
+ # Example:
156
+ # require 'coderay'
157
+ # page = CodeRay.encode_file 'some_c_code.c', :html
158
+ #
159
+ # source://coderay//lib/coderay.rb#221
160
+ def encode_file(filename, format, options = T.unsafe(nil)); end
161
+
162
+ # Encode pre-scanned Tokens.
163
+ # Use this together with CodeRay.scan:
164
+ #
165
+ # require 'coderay'
166
+ #
167
+ # # Highlight a short Ruby code example in a HTML span
168
+ # tokens = CodeRay.scan '1 + 2', :ruby
169
+ # puts CodeRay.encode_tokens(tokens, :span)
170
+ #
171
+ # source://coderay//lib/coderay.rb#209
172
+ def encode_tokens(tokens, format, options = T.unsafe(nil)); end
173
+
174
+ # Finds the Encoder class for +format+ and creates an instance, passing
175
+ # +options+ to it.
176
+ #
177
+ # Example:
178
+ # require 'coderay'
179
+ #
180
+ # stats = CodeRay.encoder(:statistic)
181
+ # stats.encode("puts 17 + 4\n", :ruby)
182
+ #
183
+ # puts '%d out of %d tokens have the kind :integer.' % [
184
+ # stats.type_stats[:integer].count,
185
+ # stats.real_token_count
186
+ # ]
187
+ # #-> 2 out of 4 tokens have the kind :integer.
188
+ #
189
+ # source://coderay//lib/coderay.rb#260
190
+ def encoder(format, options = T.unsafe(nil)); end
191
+
192
+ # Extract the options for the scanner from the +options+ hash.
193
+ #
194
+ # Returns an empty Hash if <tt>:scanner_options</tt> is not set.
195
+ #
196
+ # This is used if a method like CodeRay.encode has to provide options
197
+ # for Encoder _and_ scanner.
198
+ #
199
+ # source://coderay//lib/coderay.rb#278
200
+ def get_scanner_options(options); end
201
+
202
+ # Highlight a string into a HTML <div>.
203
+ #
204
+ # CSS styles use classes, so you have to include a stylesheet
205
+ # in your output.
206
+ #
207
+ # See encode.
208
+ #
209
+ # source://coderay//lib/coderay.rb#232
210
+ def highlight(code, lang, options = T.unsafe(nil), format = T.unsafe(nil)); end
211
+
212
+ # Highlight a file into a HTML <div>.
213
+ #
214
+ # CSS styles use classes, so you have to include a stylesheet
215
+ # in your output.
216
+ #
217
+ # See encode.
218
+ #
219
+ # source://coderay//lib/coderay.rb#242
220
+ def highlight_file(filename, options = T.unsafe(nil), format = T.unsafe(nil)); end
221
+
222
+ # Scans the given +code+ (a String) with the Scanner for +lang+.
223
+ #
224
+ # This is a simple way to use CodeRay. Example:
225
+ # require 'coderay'
226
+ # page = CodeRay.scan("puts 'Hello, world!'", :ruby).html
227
+ #
228
+ # See also demo/demo_simple.
229
+ #
230
+ # source://coderay//lib/coderay.rb#168
231
+ def scan(code, lang, options = T.unsafe(nil), &block); end
232
+
233
+ # Scans +filename+ (a path to a code file) with the Scanner for +lang+.
234
+ #
235
+ # If +lang+ is :auto or omitted, the CodeRay::FileType module is used to
236
+ # determine it. If it cannot find out what type it is, it uses
237
+ # CodeRay::Scanners::Text.
238
+ #
239
+ # Calls CodeRay.scan.
240
+ #
241
+ # Example:
242
+ # require 'coderay'
243
+ # page = CodeRay.scan_file('some_c_code.c').html
244
+ #
245
+ # source://coderay//lib/coderay.rb#183
246
+ def scan_file(filename, lang = T.unsafe(nil), options = T.unsafe(nil), &block); end
247
+
248
+ # Finds the Scanner class for +lang+ and creates an instance, passing
249
+ # +options+ to it.
250
+ #
251
+ # See Scanner.new.
252
+ #
253
+ # source://coderay//lib/coderay.rb#268
254
+ def scanner(lang, options = T.unsafe(nil), &block); end
255
+ end
256
+ end
257
+
258
+ # source://coderay//lib/coderay.rb#130
259
+ CodeRay::CODERAY_PATH = T.let(T.unsafe(nil), String)
260
+
261
+ # = Duo
262
+ #
263
+ # A Duo is a convenient way to use CodeRay. You just create a Duo,
264
+ # giving it a lang (language of the input code) and a format (desired
265
+ # output format), and call Duo#highlight with the code.
266
+ #
267
+ # Duo makes it easy to re-use both scanner and encoder for a repetitive
268
+ # task. It also provides a very easy interface syntax:
269
+ #
270
+ # require 'coderay'
271
+ # CodeRay::Duo[:python, :div].highlight 'import this'
272
+ #
273
+ # Until you want to do uncommon things with CodeRay, I recommend to use
274
+ # this method, since it takes care of everything.
275
+ #
276
+ # source://coderay//lib/coderay/duo.rb#17
277
+ class CodeRay::Duo
278
+ # Create a new Duo, holding a lang and a format to highlight code.
279
+ #
280
+ # simple:
281
+ # CodeRay::Duo[:ruby, :html].highlight 'bla 42'
282
+ #
283
+ # with options:
284
+ # CodeRay::Duo[:ruby, :html, :hint => :debug].highlight '????::??'
285
+ #
286
+ # alternative syntax without options:
287
+ # CodeRay::Duo[:ruby => :statistic].encode 'class << self; end'
288
+ #
289
+ # alternative syntax with options:
290
+ # CodeRay::Duo[{ :ruby => :statistic }, :do => :something].encode 'abc'
291
+ #
292
+ # The options are forwarded to scanner and encoder
293
+ # (see CodeRay.get_scanner_options).
294
+ #
295
+ # @return [Duo] a new instance of Duo
296
+ #
297
+ # source://coderay//lib/coderay/duo.rb#37
298
+ def initialize(lang = T.unsafe(nil), format = T.unsafe(nil), options = T.unsafe(nil)); end
299
+
300
+ # Tokenize and highlight the code using +scanner+ and +encoder+.
301
+ # Allows to use Duo like a proc object:
302
+ #
303
+ # CodeRay::Duo[:python => :yaml].call(code)
304
+ #
305
+ # or, in Ruby 1.9 and later:
306
+ #
307
+ # CodeRay::Duo[:python => :yaml].(code)
308
+ #
309
+ # source://coderay//lib/coderay/duo.rb#64
310
+ def call(code, options = T.unsafe(nil)); end
311
+
312
+ # Tokenize and highlight the code using +scanner+ and +encoder+.
313
+ #
314
+ # source://coderay//lib/coderay/duo.rb#64
315
+ def encode(code, options = T.unsafe(nil)); end
316
+
317
+ # The encoder of the duo. Only created once.
318
+ #
319
+ # source://coderay//lib/coderay/duo.rb#59
320
+ def encoder; end
321
+
322
+ # Returns the value of attribute format.
323
+ #
324
+ # source://coderay//lib/coderay/duo.rb#19
325
+ def format; end
326
+
327
+ # Sets the attribute format
328
+ #
329
+ # @param value the value to set the attribute format to.
330
+ #
331
+ # source://coderay//lib/coderay/duo.rb#19
332
+ def format=(_arg0); end
333
+
334
+ # Tokenize and highlight the code using +scanner+ and +encoder+.
335
+ #
336
+ # source://coderay//lib/coderay/duo.rb#64
337
+ def highlight(code, options = T.unsafe(nil)); end
338
+
339
+ # Returns the value of attribute lang.
340
+ #
341
+ # source://coderay//lib/coderay/duo.rb#19
342
+ def lang; end
343
+
344
+ # Sets the attribute lang
345
+ #
346
+ # @param value the value to set the attribute lang to.
347
+ #
348
+ # source://coderay//lib/coderay/duo.rb#19
349
+ def lang=(_arg0); end
350
+
351
+ # Returns the value of attribute options.
352
+ #
353
+ # source://coderay//lib/coderay/duo.rb#19
354
+ def options; end
355
+
356
+ # Sets the attribute options
357
+ #
358
+ # @param value the value to set the attribute options to.
359
+ #
360
+ # source://coderay//lib/coderay/duo.rb#19
361
+ def options=(_arg0); end
362
+
363
+ # The scanner of the duo. Only created once.
364
+ #
365
+ # source://coderay//lib/coderay/duo.rb#54
366
+ def scanner; end
367
+
368
+ class << self
369
+ # To allow calls like Duo[:ruby, :html].highlight.
370
+ def [](*_arg0); end
371
+ end
372
+ end
373
+
374
+ # This module holds the Encoder class and its subclasses.
375
+ # For example, the HTML encoder is named CodeRay::Encoders::HTML
376
+ # can be found in coderay/encoders/html.
377
+ #
378
+ # Encoders also provides methods and constants for the register
379
+ # mechanism and the [] method that returns the Encoder class
380
+ # belonging to the given format.
381
+ #
382
+ # source://coderay//lib/coderay/encoders.rb#10
383
+ module CodeRay::Encoders
384
+ extend ::CodeRay::PluginHost
385
+ end
386
+
387
+ # A simple Filter that removes all tokens of the :comment kind.
388
+ #
389
+ # Alias: +remove_comments+
390
+ #
391
+ # Usage:
392
+ # CodeRay.scan('print # foo', :ruby).comment_filter.text
393
+ # #-> "print "
394
+ #
395
+ # See also: TokenKindFilter, LinesOfCode
396
+ #
397
+ # source://coderay//lib/coderay/encoders/comment_filter.rb#15
398
+ class CodeRay::Encoders::CommentFilter < ::CodeRay::Encoders::TokenKindFilter; end
399
+
400
+ # source://coderay//lib/coderay/encoders/comment_filter.rb#19
401
+ CodeRay::Encoders::CommentFilter::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
402
+
403
+ # Returns the number of tokens.
404
+ #
405
+ # Text and block tokens are counted.
406
+ #
407
+ # source://coderay//lib/coderay/encoders/count.rb#7
408
+ class CodeRay::Encoders::Count < ::CodeRay::Encoders::Encoder
409
+ # source://coderay//lib/coderay/encoders/count.rb#29
410
+ def begin_group(kind); end
411
+
412
+ # source://coderay//lib/coderay/encoders/count.rb#29
413
+ def begin_line(kind); end
414
+
415
+ # source://coderay//lib/coderay/encoders/count.rb#29
416
+ def end_group(kind); end
417
+
418
+ # source://coderay//lib/coderay/encoders/count.rb#29
419
+ def end_line(kind); end
420
+
421
+ # source://coderay//lib/coderay/encoders/count.rb#25
422
+ def text_token(text, kind); end
423
+
424
+ protected
425
+
426
+ # source://coderay//lib/coderay/encoders/count.rb#19
427
+ def finish(options); end
428
+
429
+ # source://coderay//lib/coderay/encoders/count.rb#13
430
+ def setup(options); end
431
+ end
432
+
433
+ # = Debug Encoder
434
+ #
435
+ # Fast encoder producing simple debug output.
436
+ #
437
+ # It is readable and diff-able and is used for testing.
438
+ #
439
+ # You cannot fully restore the tokens information from the
440
+ # output, because consecutive :space tokens are merged.
441
+ #
442
+ # See also: Scanners::Debug
443
+ #
444
+ # source://coderay//lib/coderay/encoders/debug.rb#14
445
+ class CodeRay::Encoders::Debug < ::CodeRay::Encoders::Encoder
446
+ # source://coderay//lib/coderay/encoders/debug.rb#30
447
+ def begin_group(kind); end
448
+
449
+ # source://coderay//lib/coderay/encoders/debug.rb#38
450
+ def begin_line(kind); end
451
+
452
+ # source://coderay//lib/coderay/encoders/debug.rb#34
453
+ def end_group(kind); end
454
+
455
+ # source://coderay//lib/coderay/encoders/debug.rb#42
456
+ def end_line(kind); end
457
+
458
+ # source://coderay//lib/coderay/encoders/debug.rb#20
459
+ def text_token(text, kind); end
460
+ end
461
+
462
+ # source://coderay//lib/coderay/encoders/debug.rb#18
463
+ CodeRay::Encoders::Debug::FILE_EXTENSION = T.let(T.unsafe(nil), String)
464
+
465
+ # = Debug Lint Encoder
466
+ #
467
+ # Debug encoder with additional checks for:
468
+ #
469
+ # - empty tokens
470
+ # - incorrect nesting
471
+ #
472
+ # It will raise an InvalidTokenStream exception when any of the above occurs.
473
+ #
474
+ # See also: Encoders::Debug
475
+ #
476
+ # source://coderay//lib/coderay/encoders/debug_lint.rb#16
477
+ class CodeRay::Encoders::DebugLint < ::CodeRay::Encoders::Debug
478
+ # source://coderay//lib/coderay/encoders/debug_lint.rb#26
479
+ def begin_group(kind); end
480
+
481
+ # source://coderay//lib/coderay/encoders/debug_lint.rb#37
482
+ def begin_line(kind); end
483
+
484
+ # @raise [Lint::IncorrectTokenGroupNesting]
485
+ #
486
+ # source://coderay//lib/coderay/encoders/debug_lint.rb#31
487
+ def end_group(kind); end
488
+
489
+ # @raise [Lint::IncorrectTokenGroupNesting]
490
+ #
491
+ # source://coderay//lib/coderay/encoders/debug_lint.rb#42
492
+ def end_line(kind); end
493
+
494
+ # @raise [Lint::EmptyToken]
495
+ #
496
+ # source://coderay//lib/coderay/encoders/debug_lint.rb#20
497
+ def text_token(text, kind); end
498
+
499
+ protected
500
+
501
+ # source://coderay//lib/coderay/encoders/debug_lint.rb#55
502
+ def finish(options); end
503
+
504
+ # source://coderay//lib/coderay/encoders/debug_lint.rb#50
505
+ def setup(options); end
506
+ end
507
+
508
+ # Wraps HTML output into a DIV element, using inline styles by default.
509
+ #
510
+ # See Encoders::HTML for available options.
511
+ #
512
+ # source://coderay//lib/coderay/encoders/div.rb#9
513
+ class CodeRay::Encoders::Div < ::CodeRay::Encoders::HTML; end
514
+
515
+ # source://coderay//lib/coderay/encoders/div.rb#15
516
+ CodeRay::Encoders::Div::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
517
+
518
+ # source://coderay//lib/coderay/encoders/div.rb#11
519
+ CodeRay::Encoders::Div::FILE_EXTENSION = T.let(T.unsafe(nil), String)
520
+
521
+ # = Encoder
522
+ #
523
+ # The Encoder base class. Together with Scanner and
524
+ # Tokens, it forms the highlighting triad.
525
+ #
526
+ # Encoder instances take a Tokens object and do something with it.
527
+ #
528
+ # The most common Encoder is surely the HTML encoder
529
+ # (CodeRay::Encoders::HTML). It highlights the code in a colorful
530
+ # html page.
531
+ # If you want the highlighted code in a div or a span instead,
532
+ # use its subclasses Div and Span.
533
+ #
534
+ # source://coderay//lib/coderay/encoders/encoder.rb#16
535
+ class CodeRay::Encoders::Encoder
536
+ extend ::CodeRay::Plugin
537
+
538
+ # Creates a new Encoder.
539
+ # +options+ is saved and used for all encode operations, as long
540
+ # as you don't overwrite it there by passing additional options.
541
+ #
542
+ # Encoder objects provide three encode methods:
543
+ # - encode simply takes a +code+ string and a +lang+
544
+ # - encode_tokens expects a +tokens+ object instead
545
+ #
546
+ # Each method has an optional +options+ parameter. These are
547
+ # added to the options you passed at creation.
548
+ #
549
+ # @return [Encoder] a new instance of Encoder
550
+ #
551
+ # source://coderay//lib/coderay/encoders/encoder.rb#55
552
+ def initialize(options = T.unsafe(nil)); end
553
+
554
+ # source://coderay//lib/coderay/encoders/encoder.rb#87
555
+ def <<(token); end
556
+
557
+ # Starts a token group with the given +kind+.
558
+ #
559
+ # source://coderay//lib/coderay/encoders/encoder.rb#123
560
+ def begin_group(kind); end
561
+
562
+ # Starts a new line token group with the given +kind+.
563
+ #
564
+ # source://coderay//lib/coderay/encoders/encoder.rb#131
565
+ def begin_line(kind); end
566
+
567
+ # Encode the given +code+ using the Scanner for +lang+.
568
+ #
569
+ # source://coderay//lib/coderay/encoders/encoder.rb#70
570
+ def encode(code, lang, options = T.unsafe(nil)); end
571
+
572
+ # Encode a Tokens object.
573
+ #
574
+ # source://coderay//lib/coderay/encoders/encoder.rb#61
575
+ def encode_tokens(tokens, options = T.unsafe(nil)); end
576
+
577
+ # Ends a token group with the given +kind+.
578
+ #
579
+ # source://coderay//lib/coderay/encoders/encoder.rb#127
580
+ def end_group(kind); end
581
+
582
+ # Ends a new line token group with the given +kind+.
583
+ #
584
+ # source://coderay//lib/coderay/encoders/encoder.rb#135
585
+ def end_line(kind); end
586
+
587
+ # The default file extension for this encoder.
588
+ #
589
+ # source://coderay//lib/coderay/encoders/encoder.rb#83
590
+ def file_extension; end
591
+
592
+ # Encode the given +code+ using the Scanner for +lang+.
593
+ # You can use highlight instead of encode, if that seems
594
+ # more clear to you.
595
+ #
596
+ # source://coderay//lib/coderay/encoders/encoder.rb#70
597
+ def highlight(code, lang, options = T.unsafe(nil)); end
598
+
599
+ # The options you gave the Encoder at creating.
600
+ #
601
+ # source://coderay//lib/coderay/encoders/encoder.rb#43
602
+ def options; end
603
+
604
+ # The options you gave the Encoder at creating.
605
+ #
606
+ # source://coderay//lib/coderay/encoders/encoder.rb#43
607
+ def options=(_arg0); end
608
+
609
+ # The options you gave the Encoder at creating.
610
+ #
611
+ # source://coderay//lib/coderay/encoders/encoder.rb#43
612
+ def scanner; end
613
+
614
+ # The options you gave the Encoder at creating.
615
+ #
616
+ # source://coderay//lib/coderay/encoders/encoder.rb#43
617
+ def scanner=(_arg0); end
618
+
619
+ # Called for each text token ([text, kind]), where text is a String.
620
+ #
621
+ # source://coderay//lib/coderay/encoders/encoder.rb#118
622
+ def text_token(text, kind); end
623
+
624
+ # Called with +content+ and +kind+ of the currently scanned token.
625
+ # For simple scanners, it's enougth to implement this method.
626
+ #
627
+ # By default, it calls text_token, begin_group, end_group, begin_line,
628
+ # or end_line, depending on the +content+.
629
+ #
630
+ # source://coderay//lib/coderay/encoders/encoder.rb#100
631
+ def token(content, kind); end
632
+
633
+ # Do the encoding.
634
+ #
635
+ # The already created +tokens+ object must be used; it must be a
636
+ # Tokens object.
637
+ #
638
+ # source://coderay//lib/coderay/encoders/encoder.rb#168
639
+ def tokens(tokens, options = T.unsafe(nil)); end
640
+
641
+ protected
642
+
643
+ # Do the encoding.
644
+ #
645
+ # The already created +tokens+ object must be used; it must be a
646
+ # Tokens object.
647
+ #
648
+ # source://coderay//lib/coderay/encoders/encoder.rb#168
649
+ def compile(tokens, options = T.unsafe(nil)); end
650
+
651
+ # Called with merged options after encoding starts.
652
+ # The return value is the result of encoding, typically @out.
653
+ #
654
+ # source://coderay//lib/coderay/encoders/encoder.rb#160
655
+ def finish(options); end
656
+
657
+ # source://coderay//lib/coderay/encoders/encoder.rb#148
658
+ def get_output(options); end
659
+
660
+ # Append data.to_s to the output. Returns the argument.
661
+ #
662
+ # source://coderay//lib/coderay/encoders/encoder.rb#153
663
+ def output(data); end
664
+
665
+ # Called with merged options before encoding starts.
666
+ # Sets @out to an empty string.
667
+ #
668
+ # See the HTML Encoder for an example of option caching.
669
+ #
670
+ # source://coderay//lib/coderay/encoders/encoder.rb#144
671
+ def setup(options); end
672
+
673
+ class << self
674
+ # If FILE_EXTENSION isn't defined, this method returns the
675
+ # downcase class name instead.
676
+ #
677
+ # source://coderay//lib/coderay/encoders/encoder.rb#24
678
+ def const_missing(sym); end
679
+
680
+ # The default file extension for output file of this encoder class.
681
+ #
682
+ # source://coderay//lib/coderay/encoders/encoder.rb#33
683
+ def file_extension; end
684
+ end
685
+ end
686
+
687
+ # Subclasses are to store their default options in this constant.
688
+ #
689
+ # source://coderay//lib/coderay/encoders/encoder.rb#40
690
+ CodeRay::Encoders::Encoder::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
691
+
692
+ # source://coderay//lib/coderay/helpers/plugin.rb#41
693
+ CodeRay::Encoders::Encoder::PLUGIN_HOST = CodeRay::Encoders
694
+
695
+ # A Filter encoder has another Tokens instance as output.
696
+ # It can be subclass to select, remove, or modify tokens in the stream.
697
+ #
698
+ # Subclasses of Filter are called "Filters" and can be chained.
699
+ #
700
+ # == Options
701
+ #
702
+ # === :tokens
703
+ #
704
+ # The Tokens object which will receive the output.
705
+ #
706
+ # Default: Tokens.new
707
+ #
708
+ # See also: TokenKindFilter
709
+ #
710
+ # source://coderay//lib/coderay/encoders/filter.rb#18
711
+ class CodeRay::Encoders::Filter < ::CodeRay::Encoders::Encoder
712
+ # source://coderay//lib/coderay/encoders/filter.rb#39
713
+ def begin_group(kind); end
714
+
715
+ # source://coderay//lib/coderay/encoders/filter.rb#43
716
+ def begin_line(kind); end
717
+
718
+ # source://coderay//lib/coderay/encoders/filter.rb#47
719
+ def end_group(kind); end
720
+
721
+ # source://coderay//lib/coderay/encoders/filter.rb#51
722
+ def end_line(kind); end
723
+
724
+ # source://coderay//lib/coderay/encoders/filter.rb#35
725
+ def text_token(text, kind); end
726
+
727
+ protected
728
+
729
+ # source://coderay//lib/coderay/encoders/filter.rb#29
730
+ def finish(options); end
731
+
732
+ # source://coderay//lib/coderay/encoders/filter.rb#23
733
+ def setup(options); end
734
+ end
735
+
736
+ # = HTML Encoder
737
+ #
738
+ # This is CodeRay's most important highlighter:
739
+ # It provides save, fast XHTML generation and CSS support.
740
+ #
741
+ # == Usage
742
+ #
743
+ # require 'coderay'
744
+ # puts CodeRay.scan('Some /code/', :ruby).html #-> a HTML page
745
+ # puts CodeRay.scan('Some /code/', :ruby).html(:wrap => :span)
746
+ # #-> <span class="CodeRay"><span class="co">Some</span> /code/</span>
747
+ # puts CodeRay.scan('Some /code/', :ruby).span #-> the same
748
+ #
749
+ # puts CodeRay.scan('Some code', :ruby).html(
750
+ # :wrap => nil,
751
+ # :line_numbers => :inline,
752
+ # :css => :style
753
+ # )
754
+ #
755
+ # == Options
756
+ #
757
+ # === :tab_width
758
+ # Convert \t characters to +n+ spaces (a number or false.)
759
+ # false will keep tab characters untouched.
760
+ #
761
+ # Default: 8
762
+ #
763
+ # === :css
764
+ # How to include the styles; can be :class or :style.
765
+ #
766
+ # Default: :class
767
+ #
768
+ # === :wrap
769
+ # Wrap in :page, :div, :span or nil.
770
+ #
771
+ # You can also use Encoders::Div and Encoders::Span.
772
+ #
773
+ # Default: nil
774
+ #
775
+ # === :title
776
+ #
777
+ # The title of the HTML page (works only when :wrap is set to :page.)
778
+ #
779
+ # Default: 'CodeRay output'
780
+ #
781
+ # === :break_lines
782
+ #
783
+ # Split multiline blocks at line breaks.
784
+ # Forced to true if :line_numbers option is set to :inline.
785
+ #
786
+ # Default: false
787
+ #
788
+ # === :line_numbers
789
+ # Include line numbers in :table, :inline, or nil (no line numbers)
790
+ #
791
+ # Default: nil
792
+ #
793
+ # === :line_number_anchors
794
+ # Adds anchors and links to the line numbers. Can be false (off), true (on),
795
+ # or a prefix string that will be prepended to the anchor name.
796
+ #
797
+ # The prefix must consist only of letters, digits, and underscores.
798
+ #
799
+ # Default: true, default prefix name: "line"
800
+ #
801
+ # === :line_number_start
802
+ # Where to start with line number counting.
803
+ #
804
+ # Default: 1
805
+ #
806
+ # === :bold_every
807
+ # Make every +n+-th number appear bold.
808
+ #
809
+ # Default: 10
810
+ #
811
+ # === :highlight_lines
812
+ #
813
+ # Highlights certain line numbers.
814
+ # Can be any Enumerable, typically just an Array or Range, of numbers.
815
+ #
816
+ # Bolding is deactivated when :highlight_lines is set. It only makes sense
817
+ # in combination with :line_numbers.
818
+ #
819
+ # Default: nil
820
+ #
821
+ # === :hint
822
+ # Include some information into the output using the title attribute.
823
+ # Can be :info (show token kind on mouse-over), :info_long (with full path)
824
+ # or :debug (via inspect).
825
+ #
826
+ # Default: false
827
+ #
828
+ # source://coderay//lib/coderay/encoders/html.rb#97
829
+ class CodeRay::Encoders::HTML < ::CodeRay::Encoders::Encoder
830
+ # token groups, eg. strings
831
+ #
832
+ # source://coderay//lib/coderay/encoders/html.rb#235
833
+ def begin_group(kind); end
834
+
835
+ # whole lines to be highlighted, eg. a deleted line in a diff
836
+ #
837
+ # source://coderay//lib/coderay/encoders/html.rb#247
838
+ def begin_line(kind); end
839
+
840
+ # Returns the value of attribute css.
841
+ #
842
+ # source://coderay//lib/coderay/encoders/html.rb#126
843
+ def css; end
844
+
845
+ # source://coderay//lib/coderay/encoders/html.rb#241
846
+ def end_group(kind); end
847
+
848
+ # source://coderay//lib/coderay/encoders/html.rb#261
849
+ def end_line(kind); end
850
+
851
+ # source://coderay//lib/coderay/encoders/html.rb#221
852
+ def text_token(text, kind); end
853
+
854
+ protected
855
+
856
+ # source://coderay//lib/coderay/encoders/html.rb#316
857
+ def break_lines(text, style); end
858
+
859
+ # source://coderay//lib/coderay/encoders/html.rb#310
860
+ def check_group_nesting(name, kind); end
861
+
862
+ # source://coderay//lib/coderay/encoders/html.rb#268
863
+ def check_options!(options); end
864
+
865
+ # source://coderay//lib/coderay/encoders/html.rb#324
866
+ def close_span; end
867
+
868
+ # source://coderay//lib/coderay/encoders/html.rb#280
869
+ def css_class_for_kinds(kinds); end
870
+
871
+ # source://coderay//lib/coderay/encoders/html.rb#195
872
+ def finish(options); end
873
+
874
+ # source://coderay//lib/coderay/encoders/html.rb#289
875
+ def make_span_for_kinds(method, hint); end
876
+
877
+ # source://coderay//lib/coderay/encoders/html.rb#172
878
+ def setup(options); end
879
+
880
+ # source://coderay//lib/coderay/encoders/html.rb#284
881
+ def style_for_kinds(kinds); end
882
+
883
+ class << self
884
+ # source://coderay//lib/coderay/encoders/html.rb#130
885
+ def make_html_escape_hash; end
886
+
887
+ # Generate a hint about the given +kinds+ in a +hint+ style.
888
+ #
889
+ # +hint+ may be :info, :info_long or :debug.
890
+ #
891
+ # source://coderay//lib/coderay/encoders/html.rb#157
892
+ def token_path_to_hint(hint, kinds); end
893
+ end
894
+ end
895
+
896
+ # source://coderay//lib/coderay/encoders/html/css.rb#5
897
+ class CodeRay::Encoders::HTML::CSS
898
+ # @return [CSS] a new instance of CSS
899
+ #
900
+ # source://coderay//lib/coderay/encoders/html/css.rb#13
901
+ def initialize(style = T.unsafe(nil)); end
902
+
903
+ # source://coderay//lib/coderay/encoders/html/css.rb#23
904
+ def get_style_for_css_classes(css_classes); end
905
+
906
+ # Returns the value of attribute stylesheet.
907
+ #
908
+ # source://coderay//lib/coderay/encoders/html/css.rb#7
909
+ def stylesheet; end
910
+
911
+ private
912
+
913
+ # source://coderay//lib/coderay/encoders/html/css.rb#49
914
+ def parse(stylesheet); end
915
+
916
+ class << self
917
+ # source://coderay//lib/coderay/encoders/html/css.rb#9
918
+ def load_stylesheet(style = T.unsafe(nil)); end
919
+ end
920
+ end
921
+
922
+ # source://coderay//lib/coderay/encoders/html/css.rb#36
923
+ CodeRay::Encoders::HTML::CSS::CSS_CLASS_PATTERN = T.let(T.unsafe(nil), Regexp)
924
+
925
+ # source://coderay//lib/coderay/encoders/html.rb#103
926
+ CodeRay::Encoders::HTML::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
927
+
928
+ # source://coderay//lib/coderay/encoders/html.rb#101
929
+ CodeRay::Encoders::HTML::FILE_EXTENSION = T.let(T.unsafe(nil), String)
930
+
931
+ # source://coderay//lib/coderay/encoders/html.rb#143
932
+ CodeRay::Encoders::HTML::HTML_ESCAPE = T.let(T.unsafe(nil), Hash)
933
+
934
+ # source://coderay//lib/coderay/encoders/html.rb#144
935
+ CodeRay::Encoders::HTML::HTML_ESCAPE_PATTERN = T.let(T.unsafe(nil), Regexp)
936
+
937
+ # source://coderay//lib/coderay/encoders/html/numbering.rb#6
938
+ module CodeRay::Encoders::HTML::Numbering
939
+ class << self
940
+ # source://coderay//lib/coderay/encoders/html/numbering.rb#8
941
+ def number!(output, mode = T.unsafe(nil), options = T.unsafe(nil)); end
942
+ end
943
+ end
944
+
945
+ # This module is included in the output String of the HTML Encoder.
946
+ #
947
+ # It provides methods like wrap, div, page etc.
948
+ #
949
+ # Remember to use #clone instead of #dup to keep the modules the object was
950
+ # extended with.
951
+ #
952
+ # TODO: Rewrite this without monkey patching.
953
+ #
954
+ # source://coderay//lib/coderay/encoders/html/output.rb#14
955
+ module CodeRay::Encoders::HTML::Output
956
+ # source://coderay//lib/coderay/encoders/html/output.rb#57
957
+ def apply_title!(title); end
958
+
959
+ # Returns the value of attribute css.
960
+ #
961
+ # source://coderay//lib/coderay/encoders/html/output.rb#16
962
+ def css; end
963
+
964
+ # Sets the attribute css
965
+ #
966
+ # @param value the value to set the attribute css to.
967
+ #
968
+ # source://coderay//lib/coderay/encoders/html/output.rb#16
969
+ def css=(_arg0); end
970
+
971
+ # source://coderay//lib/coderay/encoders/html/output.rb#86
972
+ def stylesheet(in_tag = T.unsafe(nil)); end
973
+
974
+ # source://coderay//lib/coderay/encoders/html/output.rb#62
975
+ def wrap!(element, *args); end
976
+
977
+ # source://coderay//lib/coderay/encoders/html/output.rb#52
978
+ def wrap_in!(template); end
979
+
980
+ # source://coderay//lib/coderay/encoders/html/output.rb#47
981
+ def wrapped_in; end
982
+
983
+ # Sets the attribute wrapped_in
984
+ #
985
+ # @param value the value to set the attribute wrapped_in to.
986
+ #
987
+ # source://coderay//lib/coderay/encoders/html/output.rb#50
988
+ def wrapped_in=(_arg0); end
989
+
990
+ # @return [Boolean]
991
+ #
992
+ # source://coderay//lib/coderay/encoders/html/output.rb#43
993
+ def wrapped_in?(element); end
994
+
995
+ class << self
996
+ # Raises an exception if an object that doesn't respond to to_str is extended by Output,
997
+ # to prevent users from misuse. Use Module#remove_method to disable.
998
+ #
999
+ # source://coderay//lib/coderay/encoders/html/output.rb#22
1000
+ def extended(o); end
1001
+
1002
+ # source://coderay//lib/coderay/encoders/html/output.rb#26
1003
+ def make_stylesheet(css, in_tag = T.unsafe(nil)); end
1004
+
1005
+ # source://coderay//lib/coderay/encoders/html/output.rb#36
1006
+ def page_template_for_css(css); end
1007
+ end
1008
+ end
1009
+
1010
+ # source://coderay//lib/coderay/encoders/html/output.rb#117
1011
+ CodeRay::Encoders::HTML::Output::DIV = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template)
1012
+
1013
+ # source://coderay//lib/coderay/encoders/html/output.rb#130
1014
+ CodeRay::Encoders::HTML::Output::PAGE = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template)
1015
+
1016
+ # source://coderay//lib/coderay/encoders/html/output.rb#115
1017
+ CodeRay::Encoders::HTML::Output::SPAN = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template)
1018
+
1019
+ # source://coderay//lib/coderay/encoders/html/output.rb#123
1020
+ CodeRay::Encoders::HTML::Output::TABLE = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template)
1021
+
1022
+ # -- don't include the templates in docu
1023
+ #
1024
+ # source://coderay//lib/coderay/encoders/html/output.rb#92
1025
+ class CodeRay::Encoders::HTML::Output::Template < ::String
1026
+ # source://coderay//lib/coderay/encoders/html/output.rb#104
1027
+ def apply(target, replacement); end
1028
+
1029
+ class << self
1030
+ # source://coderay//lib/coderay/encoders/html/output.rb#94
1031
+ def wrap!(str, template, target); end
1032
+ end
1033
+ end
1034
+
1035
+ # source://coderay//lib/coderay/encoders/html.rb#146
1036
+ CodeRay::Encoders::HTML::TOKEN_KIND_TO_INFO = T.let(T.unsafe(nil), Hash)
1037
+
1038
+ # source://coderay//lib/coderay/encoders/html.rb#150
1039
+ CodeRay::Encoders::HTML::TRANSPARENT_TOKEN_KINDS = T.let(T.unsafe(nil), Set)
1040
+
1041
+ # A simple JSON Encoder.
1042
+ #
1043
+ # Example:
1044
+ # CodeRay.scan('puts "Hello world!"', :ruby).json
1045
+ # yields
1046
+ # [
1047
+ # {"type"=>"text", "text"=>"puts", "kind"=>"ident"},
1048
+ # {"type"=>"text", "text"=>" ", "kind"=>"space"},
1049
+ # {"type"=>"block", "action"=>"open", "kind"=>"string"},
1050
+ # {"type"=>"text", "text"=>"\"", "kind"=>"delimiter"},
1051
+ # {"type"=>"text", "text"=>"Hello world!", "kind"=>"content"},
1052
+ # {"type"=>"text", "text"=>"\"", "kind"=>"delimiter"},
1053
+ # {"type"=>"block", "action"=>"close", "kind"=>"string"},
1054
+ # ]
1055
+ #
1056
+ # source://coderay//lib/coderay/encoders/json.rb#18
1057
+ class CodeRay::Encoders::JSON < ::CodeRay::Encoders::Encoder
1058
+ # source://coderay//lib/coderay/encoders/json.rb#64
1059
+ def begin_group(kind); end
1060
+
1061
+ # source://coderay//lib/coderay/encoders/json.rb#72
1062
+ def begin_line(kind); end
1063
+
1064
+ # source://coderay//lib/coderay/encoders/json.rb#68
1065
+ def end_group(kind); end
1066
+
1067
+ # source://coderay//lib/coderay/encoders/json.rb#76
1068
+ def end_line(kind); end
1069
+
1070
+ # source://coderay//lib/coderay/encoders/json.rb#60
1071
+ def text_token(text, kind); end
1072
+
1073
+ protected
1074
+
1075
+ # source://coderay//lib/coderay/encoders/json.rb#49
1076
+ def append(data); end
1077
+
1078
+ # source://coderay//lib/coderay/encoders/json.rb#45
1079
+ def finish(options); end
1080
+
1081
+ # source://coderay//lib/coderay/encoders/json.rb#38
1082
+ def setup(options); end
1083
+ end
1084
+
1085
+ # source://coderay//lib/coderay/encoders/json.rb#35
1086
+ CodeRay::Encoders::JSON::FILE_EXTENSION = T.let(T.unsafe(nil), String)
1087
+
1088
+ # Counts the LoC (Lines of Code). Returns an Integer >= 0.
1089
+ #
1090
+ # Alias: +loc+
1091
+ #
1092
+ # Everything that is not comment, markup, doctype/shebang, or an empty line,
1093
+ # is considered to be code.
1094
+ #
1095
+ # For example,
1096
+ # * HTML files not containing JavaScript have 0 LoC
1097
+ # * in a Java class without comments, LoC is the number of non-empty lines
1098
+ #
1099
+ # A Scanner class should define the token kinds that are not code in the
1100
+ # KINDS_NOT_LOC constant, which defaults to [:comment, :doctype].
1101
+ #
1102
+ # source://coderay//lib/coderay/encoders/lines_of_code.rb#17
1103
+ class CodeRay::Encoders::LinesOfCode < ::CodeRay::Encoders::TokenKindFilter
1104
+ protected
1105
+
1106
+ # source://coderay//lib/coderay/encoders/lines_of_code.rb#38
1107
+ def finish(options); end
1108
+
1109
+ # source://coderay//lib/coderay/encoders/lines_of_code.rb#25
1110
+ def setup(options); end
1111
+ end
1112
+
1113
+ # source://coderay//lib/coderay/encoders/lines_of_code.rb#21
1114
+ CodeRay::Encoders::LinesOfCode::NON_EMPTY_LINE = T.let(T.unsafe(nil), Regexp)
1115
+
1116
+ # = Lint Encoder
1117
+ #
1118
+ # Checks for:
1119
+ #
1120
+ # - empty tokens
1121
+ # - incorrect nesting
1122
+ #
1123
+ # It will raise an InvalidTokenStream exception when any of the above occurs.
1124
+ #
1125
+ # See also: Encoders::DebugLint
1126
+ #
1127
+ # source://coderay//lib/coderay/encoders/lint.rb#14
1128
+ class CodeRay::Encoders::Lint < ::CodeRay::Encoders::Debug
1129
+ # source://coderay//lib/coderay/encoders/lint.rb#28
1130
+ def begin_group(kind); end
1131
+
1132
+ # source://coderay//lib/coderay/encoders/lint.rb#37
1133
+ def begin_line(kind); end
1134
+
1135
+ # @raise [IncorrectTokenGroupNesting]
1136
+ #
1137
+ # source://coderay//lib/coderay/encoders/lint.rb#32
1138
+ def end_group(kind); end
1139
+
1140
+ # @raise [IncorrectTokenGroupNesting]
1141
+ #
1142
+ # source://coderay//lib/coderay/encoders/lint.rb#41
1143
+ def end_line(kind); end
1144
+
1145
+ # @raise [EmptyToken]
1146
+ #
1147
+ # source://coderay//lib/coderay/encoders/lint.rb#23
1148
+ def text_token(text, kind); end
1149
+
1150
+ protected
1151
+
1152
+ # source://coderay//lib/coderay/encoders/lint.rb#52
1153
+ def finish(options); end
1154
+
1155
+ # source://coderay//lib/coderay/encoders/lint.rb#48
1156
+ def setup(options); end
1157
+ end
1158
+
1159
+ # source://coderay//lib/coderay/encoders/lint.rb#19
1160
+ class CodeRay::Encoders::Lint::EmptyToken < ::CodeRay::Encoders::Lint::InvalidTokenStream; end
1161
+
1162
+ # source://coderay//lib/coderay/encoders/lint.rb#21
1163
+ class CodeRay::Encoders::Lint::IncorrectTokenGroupNesting < ::CodeRay::Encoders::Lint::InvalidTokenStream; end
1164
+
1165
+ # source://coderay//lib/coderay/encoders/lint.rb#18
1166
+ class CodeRay::Encoders::Lint::InvalidTokenStream < ::StandardError; end
1167
+
1168
+ # source://coderay//lib/coderay/encoders/lint.rb#20
1169
+ class CodeRay::Encoders::Lint::UnknownTokenKind < ::CodeRay::Encoders::Lint::InvalidTokenStream; end
1170
+
1171
+ # = Null Encoder
1172
+ #
1173
+ # Does nothing and returns an empty string.
1174
+ #
1175
+ # source://coderay//lib/coderay/encoders/null.rb#7
1176
+ class CodeRay::Encoders::Null < ::CodeRay::Encoders::Encoder
1177
+ # source://coderay//lib/coderay/encoders/null.rb#11
1178
+ def text_token(text, kind); end
1179
+ end
1180
+
1181
+ # Wraps the output into a HTML page, using CSS classes and
1182
+ # line numbers in the table format by default.
1183
+ #
1184
+ # See Encoders::HTML for available options.
1185
+ #
1186
+ # source://coderay//lib/coderay/encoders/page.rb#10
1187
+ class CodeRay::Encoders::Page < ::CodeRay::Encoders::HTML; end
1188
+
1189
+ # source://coderay//lib/coderay/encoders/page.rb#16
1190
+ CodeRay::Encoders::Page::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
1191
+
1192
+ # source://coderay//lib/coderay/encoders/page.rb#12
1193
+ CodeRay::Encoders::Page::FILE_EXTENSION = T.let(T.unsafe(nil), String)
1194
+
1195
+ # Wraps HTML output into a SPAN element, using inline styles by default.
1196
+ #
1197
+ # See Encoders::HTML for available options.
1198
+ #
1199
+ # source://coderay//lib/coderay/encoders/span.rb#9
1200
+ class CodeRay::Encoders::Span < ::CodeRay::Encoders::HTML; end
1201
+
1202
+ # source://coderay//lib/coderay/encoders/span.rb#15
1203
+ CodeRay::Encoders::Span::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
1204
+
1205
+ # source://coderay//lib/coderay/encoders/span.rb#11
1206
+ CodeRay::Encoders::Span::FILE_EXTENSION = T.let(T.unsafe(nil), String)
1207
+
1208
+ # Makes a statistic for the given tokens.
1209
+ #
1210
+ # Alias: +stats+
1211
+ #
1212
+ # source://coderay//lib/coderay/encoders/statistic.rb#7
1213
+ class CodeRay::Encoders::Statistic < ::CodeRay::Encoders::Encoder
1214
+ # source://coderay//lib/coderay/encoders/statistic.rb#70
1215
+ def begin_group(kind); end
1216
+
1217
+ # source://coderay//lib/coderay/encoders/statistic.rb#78
1218
+ def begin_line(kind); end
1219
+
1220
+ # source://coderay//lib/coderay/encoders/statistic.rb#86
1221
+ def block_token(action, kind); end
1222
+
1223
+ # source://coderay//lib/coderay/encoders/statistic.rb#74
1224
+ def end_group(kind); end
1225
+
1226
+ # source://coderay//lib/coderay/encoders/statistic.rb#82
1227
+ def end_line(kind); end
1228
+
1229
+ # source://coderay//lib/coderay/encoders/statistic.rb#11
1230
+ def real_token_count; end
1231
+
1232
+ # source://coderay//lib/coderay/encoders/statistic.rb#62
1233
+ def text_token(text, kind); end
1234
+
1235
+ # source://coderay//lib/coderay/encoders/statistic.rb#11
1236
+ def type_stats; end
1237
+
1238
+ protected
1239
+
1240
+ # source://coderay//lib/coderay/encoders/statistic.rb#42
1241
+ def finish(options); end
1242
+
1243
+ # source://coderay//lib/coderay/encoders/statistic.rb#17
1244
+ def setup(options); end
1245
+ end
1246
+
1247
+ # source://coderay//lib/coderay/encoders/statistic.rb#24
1248
+ CodeRay::Encoders::Statistic::STATS = T.let(T.unsafe(nil), String)
1249
+
1250
+ # source://coderay//lib/coderay/encoders/statistic.rb#38
1251
+ CodeRay::Encoders::Statistic::TOKEN_TYPES_ROW = T.let(T.unsafe(nil), String)
1252
+
1253
+ # source://coderay//lib/coderay/encoders/statistic.rb#13
1254
+ class CodeRay::Encoders::Statistic::TypeStats < ::Struct
1255
+ # Returns the value of attribute count
1256
+ #
1257
+ # @return [Object] the current value of count
1258
+ def count; end
1259
+
1260
+ # Sets the attribute count
1261
+ #
1262
+ # @param value [Object] the value to set the attribute count to.
1263
+ # @return [Object] the newly set value
1264
+ def count=(_); end
1265
+
1266
+ # Returns the value of attribute size
1267
+ #
1268
+ # @return [Object] the current value of size
1269
+ def size; end
1270
+
1271
+ # Sets the attribute size
1272
+ #
1273
+ # @param value [Object] the value to set the attribute size to.
1274
+ # @return [Object] the newly set value
1275
+ def size=(_); end
1276
+
1277
+ class << self
1278
+ def [](*_arg0); end
1279
+ def inspect; end
1280
+ def keyword_init?; end
1281
+ def members; end
1282
+ def new(*_arg0); end
1283
+ end
1284
+ end
1285
+
1286
+ # source://coderay//lib/coderay/encoders/terminal.rb#17
1287
+ class CodeRay::Encoders::Terminal < ::CodeRay::Encoders::Encoder
1288
+ # source://coderay//lib/coderay/encoders/terminal.rb#156
1289
+ def begin_group(kind); end
1290
+
1291
+ # source://coderay//lib/coderay/encoders/terminal.rb#156
1292
+ def begin_line(kind); end
1293
+
1294
+ # source://coderay//lib/coderay/encoders/terminal.rb#162
1295
+ def end_group(kind); end
1296
+
1297
+ # source://coderay//lib/coderay/encoders/terminal.rb#172
1298
+ def end_line(kind); end
1299
+
1300
+ # source://coderay//lib/coderay/encoders/terminal.rb#141
1301
+ def text_token(text, kind); end
1302
+
1303
+ protected
1304
+
1305
+ # source://coderay//lib/coderay/encoders/terminal.rb#133
1306
+ def setup(options); end
1307
+
1308
+ private
1309
+
1310
+ # source://coderay//lib/coderay/encoders/terminal.rb#179
1311
+ def open_token(kind); end
1312
+ end
1313
+
1314
+ # source://coderay//lib/coderay/encoders/terminal.rb#21
1315
+ CodeRay::Encoders::Terminal::TOKEN_COLORS = T.let(T.unsafe(nil), Hash)
1316
+
1317
+ # Concats the tokens into a single string, resulting in the original
1318
+ # code string if no tokens were removed.
1319
+ #
1320
+ # Alias: +plain+, +plaintext+
1321
+ #
1322
+ # == Options
1323
+ #
1324
+ # === :separator
1325
+ # A separator string to join the tokens.
1326
+ #
1327
+ # Default: empty String
1328
+ #
1329
+ # source://coderay//lib/coderay/encoders/text.rb#15
1330
+ class CodeRay::Encoders::Text < ::CodeRay::Encoders::Encoder
1331
+ # source://coderay//lib/coderay/encoders/text.rb#25
1332
+ def text_token(text, kind); end
1333
+
1334
+ protected
1335
+
1336
+ # source://coderay//lib/coderay/encoders/text.rb#36
1337
+ def setup(options); end
1338
+ end
1339
+
1340
+ # source://coderay//lib/coderay/encoders/text.rb#21
1341
+ CodeRay::Encoders::Text::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
1342
+
1343
+ # source://coderay//lib/coderay/encoders/text.rb#19
1344
+ CodeRay::Encoders::Text::FILE_EXTENSION = T.let(T.unsafe(nil), String)
1345
+
1346
+ # A Filter that selects tokens based on their token kind.
1347
+ #
1348
+ # == Options
1349
+ #
1350
+ # === :exclude
1351
+ #
1352
+ # One or many symbols (in an Array) which shall be excluded.
1353
+ #
1354
+ # Default: []
1355
+ #
1356
+ # === :include
1357
+ #
1358
+ # One or many symbols (in an array) which shall be included.
1359
+ #
1360
+ # Default: :all, which means all tokens are included.
1361
+ #
1362
+ # Exclusion wins over inclusion.
1363
+ #
1364
+ # See also: CommentFilter
1365
+ #
1366
+ # source://coderay//lib/coderay/encoders/token_kind_filter.rb#25
1367
+ class CodeRay::Encoders::TokenKindFilter < ::CodeRay::Encoders::Filter
1368
+ # Add the token group to the output stream if +kind+ matches the
1369
+ # conditions.
1370
+ #
1371
+ # If it does not, all tokens inside the group are excluded from the
1372
+ # stream, even if their kinds match.
1373
+ #
1374
+ # source://coderay//lib/coderay/encoders/token_kind_filter.rb#66
1375
+ def begin_group(kind); end
1376
+
1377
+ # See +begin_group+.
1378
+ #
1379
+ # source://coderay//lib/coderay/encoders/token_kind_filter.rb#77
1380
+ def begin_line(kind); end
1381
+
1382
+ # Take care of re-enabling the delegation of tokens to the output stream
1383
+ # if an exluded group has ended.
1384
+ #
1385
+ # source://coderay//lib/coderay/encoders/token_kind_filter.rb#89
1386
+ def end_group(kind); end
1387
+
1388
+ # See +end_group+.
1389
+ #
1390
+ # source://coderay//lib/coderay/encoders/token_kind_filter.rb#99
1391
+ def end_line(kind); end
1392
+
1393
+ # Add the token to the output stream if +kind+ matches the conditions.
1394
+ #
1395
+ # source://coderay//lib/coderay/encoders/token_kind_filter.rb#57
1396
+ def text_token(text, kind); end
1397
+
1398
+ protected
1399
+
1400
+ # @return [Boolean]
1401
+ #
1402
+ # source://coderay//lib/coderay/encoders/token_kind_filter.rb#49
1403
+ def include_group?(kind); end
1404
+
1405
+ # @return [Boolean]
1406
+ #
1407
+ # source://coderay//lib/coderay/encoders/token_kind_filter.rb#45
1408
+ def include_text_token?(text, kind); end
1409
+
1410
+ # source://coderay//lib/coderay/encoders/token_kind_filter.rb#35
1411
+ def setup(options); end
1412
+ end
1413
+
1414
+ # source://coderay//lib/coderay/encoders/token_kind_filter.rb#29
1415
+ CodeRay::Encoders::TokenKindFilter::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
1416
+
1417
+ # = XML Encoder
1418
+ #
1419
+ # Uses REXML. Very slow.
1420
+ #
1421
+ # source://coderay//lib/coderay/encoders/xml.rb#7
1422
+ class CodeRay::Encoders::XML < ::CodeRay::Encoders::Encoder
1423
+ # source://coderay//lib/coderay/encoders/xml.rb#58
1424
+ def begin_group(kind); end
1425
+
1426
+ # source://coderay//lib/coderay/encoders/xml.rb#62
1427
+ def end_group(kind); end
1428
+
1429
+ # source://coderay//lib/coderay/encoders/xml.rb#38
1430
+ def text_token(text, kind); end
1431
+
1432
+ protected
1433
+
1434
+ # source://coderay//lib/coderay/encoders/xml.rb#31
1435
+ def finish(options); end
1436
+
1437
+ # source://coderay//lib/coderay/encoders/xml.rb#22
1438
+ def setup(options); end
1439
+ end
1440
+
1441
+ # source://coderay//lib/coderay/encoders/xml.rb#15
1442
+ CodeRay::Encoders::XML::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
1443
+
1444
+ # source://coderay//lib/coderay/encoders/xml.rb#11
1445
+ CodeRay::Encoders::XML::FILE_EXTENSION = T.let(T.unsafe(nil), String)
1446
+
1447
+ # = YAML Encoder
1448
+ #
1449
+ # Slow.
1450
+ #
1451
+ # source://coderay//lib/coderay/encoders/yaml.rb#9
1452
+ class CodeRay::Encoders::YAML < ::CodeRay::Encoders::Encoder
1453
+ # source://coderay//lib/coderay/encoders/yaml.rb#31
1454
+ def begin_group(kind); end
1455
+
1456
+ # source://coderay//lib/coderay/encoders/yaml.rb#39
1457
+ def begin_line(kind); end
1458
+
1459
+ # source://coderay//lib/coderay/encoders/yaml.rb#35
1460
+ def end_group(kind); end
1461
+
1462
+ # source://coderay//lib/coderay/encoders/yaml.rb#43
1463
+ def end_line(kind); end
1464
+
1465
+ # source://coderay//lib/coderay/encoders/yaml.rb#27
1466
+ def text_token(text, kind); end
1467
+
1468
+ protected
1469
+
1470
+ # source://coderay//lib/coderay/encoders/yaml.rb#22
1471
+ def finish(options); end
1472
+
1473
+ # source://coderay//lib/coderay/encoders/yaml.rb#16
1474
+ def setup(options); end
1475
+ end
1476
+
1477
+ # source://coderay//lib/coderay/encoders/yaml.rb#13
1478
+ CodeRay::Encoders::YAML::FILE_EXTENSION = T.let(T.unsafe(nil), String)
1479
+
1480
+ # = FileType
1481
+ #
1482
+ # A simple filetype recognizer.
1483
+ #
1484
+ # == Usage
1485
+ #
1486
+ # # determine the type of the given
1487
+ # lang = FileType[file_name]
1488
+ #
1489
+ # # return :text if the file type is unknown
1490
+ # lang = FileType.fetch file_name, :text
1491
+ #
1492
+ # # try the shebang line, too
1493
+ # lang = FileType.fetch file_name, :text, true
1494
+ #
1495
+ # source://coderay//lib/coderay/helpers/file_type.rb#17
1496
+ module CodeRay::FileType
1497
+ class << self
1498
+ # Try to determine the file type of the file.
1499
+ #
1500
+ # +filename+ is a relative or absolute path to a file.
1501
+ #
1502
+ # The file itself is only accessed when +read_shebang+ is set to true.
1503
+ # That means you can get filetypes from files that don't exist.
1504
+ #
1505
+ # source://coderay//lib/coderay/helpers/file_type.rb#29
1506
+ def [](filename, read_shebang = T.unsafe(nil)); end
1507
+
1508
+ # This works like Hash#fetch.
1509
+ #
1510
+ # If the filetype cannot be found, the +default+ value
1511
+ # is returned.
1512
+ #
1513
+ # source://coderay//lib/coderay/helpers/file_type.rb#50
1514
+ def fetch(filename, default = T.unsafe(nil), read_shebang = T.unsafe(nil)); end
1515
+
1516
+ protected
1517
+
1518
+ # source://coderay//lib/coderay/helpers/file_type.rb#66
1519
+ def type_from_shebang(filename); end
1520
+ end
1521
+ end
1522
+
1523
+ # source://coderay//lib/coderay/helpers/file_type.rb#79
1524
+ CodeRay::FileType::TypeFromExt = T.let(T.unsafe(nil), Hash)
1525
+
1526
+ # source://coderay//lib/coderay/helpers/file_type.rb#139
1527
+ CodeRay::FileType::TypeFromName = T.let(T.unsafe(nil), Hash)
1528
+
1529
+ # source://coderay//lib/coderay/helpers/file_type.rb#137
1530
+ CodeRay::FileType::TypeFromShebang = T.let(T.unsafe(nil), Regexp)
1531
+
1532
+ # source://coderay//lib/coderay/helpers/file_type.rb#19
1533
+ class CodeRay::FileType::UnknownFileType < ::Exception; end
1534
+
1535
+ # = Plugin
1536
+ #
1537
+ # Plugins have to include this module.
1538
+ #
1539
+ # IMPORTANT: Use extend for this module.
1540
+ #
1541
+ # See CodeRay::PluginHost for examples.
1542
+ #
1543
+ # source://coderay//lib/coderay/helpers/plugin.rb#10
1544
+ module CodeRay::Plugin
1545
+ # source://coderay//lib/coderay/helpers/plugin.rb#46
1546
+ def aliases; end
1547
+
1548
+ # The PluginHost for this Plugin class.
1549
+ #
1550
+ # source://coderay//lib/coderay/helpers/plugin.rb#39
1551
+ def plugin_host(host = T.unsafe(nil)); end
1552
+
1553
+ # Returns the value of attribute plugin_id.
1554
+ #
1555
+ # source://coderay//lib/coderay/helpers/plugin.rb#12
1556
+ def plugin_id; end
1557
+
1558
+ # Register this class for the given +id+.
1559
+ #
1560
+ # Example:
1561
+ # class MyPlugin < PluginHost::BaseClass
1562
+ # register_for :my_id
1563
+ # ...
1564
+ # end
1565
+ #
1566
+ # See PluginHost.register.
1567
+ #
1568
+ # source://coderay//lib/coderay/helpers/plugin.rb#23
1569
+ def register_for(id); end
1570
+
1571
+ # Returns the title of the plugin, or sets it to the
1572
+ # optional argument +title+.
1573
+ #
1574
+ # source://coderay//lib/coderay/helpers/plugin.rb#30
1575
+ def title(title = T.unsafe(nil)); end
1576
+ end
1577
+
1578
+ # = PluginHost
1579
+ #
1580
+ # A simple subclass/subfolder plugin system.
1581
+ #
1582
+ # Example:
1583
+ # class Generators
1584
+ # extend PluginHost
1585
+ # plugin_path 'app/generators'
1586
+ # end
1587
+ #
1588
+ # class Generator
1589
+ # extend Plugin
1590
+ # PLUGIN_HOST = Generators
1591
+ # end
1592
+ #
1593
+ # class FancyGenerator < Generator
1594
+ # register_for :fancy
1595
+ # end
1596
+ #
1597
+ # Generators[:fancy] #-> FancyGenerator
1598
+ # # or
1599
+ # CodeRay.require_plugin 'Generators/fancy'
1600
+ # # or
1601
+ # Generators::Fancy
1602
+ #
1603
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#27
1604
+ module CodeRay::PluginHost
1605
+ # Returns the Plugin for +id+.
1606
+ #
1607
+ # Example:
1608
+ # yaml_plugin = MyPluginHost[:yaml]
1609
+ #
1610
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#49
1611
+ def [](id, *args, &blk); end
1612
+
1613
+ # Returns an array of all Plugins.
1614
+ #
1615
+ # Note: This loads all plugins using load_all.
1616
+ #
1617
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#151
1618
+ def all_plugins; end
1619
+
1620
+ # Tries to +load+ the missing plugin by translating +const+ to the
1621
+ # underscore form (eg. LinesOfCode becomes lines_of_code).
1622
+ #
1623
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#61
1624
+ def const_missing(const); end
1625
+
1626
+ # Define the default plugin to use when no plugin is found
1627
+ # for a given id, or return the default plugin.
1628
+ #
1629
+ # See also map.
1630
+ #
1631
+ # class MyColorHost < PluginHost
1632
+ # map :navy => :dark_blue
1633
+ # default :gray
1634
+ # end
1635
+ #
1636
+ # MyColorHost.default # loads and returns the Gray plugin
1637
+ #
1638
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#114
1639
+ def default(id = T.unsafe(nil)); end
1640
+
1641
+ # Returns an array of all .rb files in the plugin path.
1642
+ #
1643
+ # The extension .rb is not included.
1644
+ #
1645
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#140
1646
+ def list; end
1647
+
1648
+ # Returns the Plugin for +id+.
1649
+ #
1650
+ # Example:
1651
+ # yaml_plugin = MyPluginHost[:yaml]
1652
+ #
1653
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#49
1654
+ def load(id, *args, &blk); end
1655
+
1656
+ # Loads all plugins using list and load.
1657
+ #
1658
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#39
1659
+ def load_all; end
1660
+
1661
+ # Loads the map file (see map).
1662
+ #
1663
+ # This is done automatically when plugin_path is called.
1664
+ #
1665
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#159
1666
+ def load_plugin_map; end
1667
+
1668
+ # Map a plugin_id to another.
1669
+ #
1670
+ # Usage: Put this in a file plugin_path/_map.rb.
1671
+ #
1672
+ # class MyColorHost < PluginHost
1673
+ # map :navy => :dark_blue,
1674
+ # :maroon => :brown,
1675
+ # :luna => :moon
1676
+ # end
1677
+ #
1678
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#95
1679
+ def map(hash); end
1680
+
1681
+ # A Hash of plugion_id => Plugin pairs.
1682
+ #
1683
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#133
1684
+ def plugin_hash; end
1685
+
1686
+ # The path where the plugins can be found.
1687
+ #
1688
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#79
1689
+ def plugin_path(*args); end
1690
+
1691
+ # Every plugin must register itself for +id+ by calling register_for,
1692
+ # which calls this method.
1693
+ #
1694
+ # See Plugin#register_for.
1695
+ #
1696
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#128
1697
+ def register(plugin, id); end
1698
+
1699
+ protected
1700
+
1701
+ # Return a plugin hash that automatically loads plugins.
1702
+ #
1703
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#172
1704
+ def make_plugin_hash; end
1705
+
1706
+ # Returns the expected path to the plugin file for the given id.
1707
+ #
1708
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#196
1709
+ def path_to(plugin_id); end
1710
+
1711
+ # Converts +id+ to a valid plugin ID String, or returns +nil+.
1712
+ #
1713
+ # Raises +ArgumentError+ for all other objects, or if the
1714
+ # given String includes non-alphanumeric characters (\W).
1715
+ #
1716
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#204
1717
+ def validate_id(id); end
1718
+
1719
+ class << self
1720
+ # Adds the module/class to the PLUGIN_HOSTS list.
1721
+ #
1722
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#72
1723
+ def extended(mod); end
1724
+ end
1725
+ end
1726
+
1727
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#33
1728
+ class CodeRay::PluginHost::HostNotFound < ::LoadError; end
1729
+
1730
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#35
1731
+ CodeRay::PluginHost::PLUGIN_HOSTS = T.let(T.unsafe(nil), Array)
1732
+
1733
+ # dummy hash
1734
+ #
1735
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#36
1736
+ CodeRay::PluginHost::PLUGIN_HOSTS_BY_ID = T.let(T.unsafe(nil), Hash)
1737
+
1738
+ # Raised if Encoders::[] fails because:
1739
+ # * a file could not be found
1740
+ # * the requested Plugin is not registered
1741
+ #
1742
+ # source://coderay//lib/coderay/helpers/plugin_host.rb#32
1743
+ class CodeRay::PluginHost::PluginNotFound < ::LoadError; end
1744
+
1745
+ # = Scanners
1746
+ #
1747
+ # This module holds the Scanner class and its subclasses.
1748
+ # For example, the Ruby scanner is named CodeRay::Scanners::Ruby
1749
+ # can be found in coderay/scanners/ruby.
1750
+ #
1751
+ # Scanner also provides methods and constants for the register
1752
+ # mechanism and the [] method that returns the Scanner class
1753
+ # belonging to the given lang.
1754
+ #
1755
+ # See PluginHost.
1756
+ #
1757
+ # source://coderay//lib/coderay/scanners.rb#18
1758
+ module CodeRay::Scanners
1759
+ extend ::CodeRay::PluginHost
1760
+ end
1761
+
1762
+ # Scanner for C.
1763
+ #
1764
+ # source://coderay//lib/coderay/scanners/c.rb#5
1765
+ class CodeRay::Scanners::C < ::CodeRay::Scanners::Scanner
1766
+ protected
1767
+
1768
+ # source://coderay//lib/coderay/scanners/c.rb#44
1769
+ def scan_tokens(encoder, options); end
1770
+ end
1771
+
1772
+ # source://coderay//lib/coderay/scanners/c.rb#27
1773
+ CodeRay::Scanners::C::DIRECTIVES = T.let(T.unsafe(nil), Array)
1774
+
1775
+ # source://coderay//lib/coderay/scanners/c.rb#39
1776
+ CodeRay::Scanners::C::ESCAPE = T.let(T.unsafe(nil), Regexp)
1777
+
1778
+ # source://coderay//lib/coderay/scanners/c.rb#33
1779
+ CodeRay::Scanners::C::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList)
1780
+
1781
+ # source://coderay//lib/coderay/scanners/c.rb#10
1782
+ CodeRay::Scanners::C::KEYWORDS = T.let(T.unsafe(nil), Array)
1783
+
1784
+ # source://coderay//lib/coderay/scanners/c.rb#23
1785
+ CodeRay::Scanners::C::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array)
1786
+
1787
+ # source://coderay//lib/coderay/scanners/c.rb#17
1788
+ CodeRay::Scanners::C::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array)
1789
+
1790
+ # source://coderay//lib/coderay/scanners/c.rb#40
1791
+ CodeRay::Scanners::C::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp)
1792
+
1793
+ # Scanner for C++.
1794
+ #
1795
+ # Aliases: +cplusplus+, c++
1796
+ CodeRay::Scanners::CPlusPlus = CodeRay::Scanners::Text
1797
+
1798
+ # source://coderay//lib/coderay/scanners/css.rb#4
1799
+ class CodeRay::Scanners::CSS < ::CodeRay::Scanners::Scanner
1800
+ protected
1801
+
1802
+ # source://coderay//lib/coderay/scanners/css.rb#55
1803
+ def scan_tokens(encoder, options); end
1804
+
1805
+ # source://coderay//lib/coderay/scanners/css.rb#50
1806
+ def setup; end
1807
+ end
1808
+
1809
+ # source://coderay//lib/coderay/scanners/css.rb#8
1810
+ CodeRay::Scanners::CSS::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array)
1811
+
1812
+ # source://coderay//lib/coderay/scanners/css.rb#16
1813
+ module CodeRay::Scanners::CSS::RE; end
1814
+
1815
+ # source://coderay//lib/coderay/scanners/css.rb#31
1816
+ CodeRay::Scanners::CSS::RE::AtKeyword = T.let(T.unsafe(nil), Regexp)
1817
+
1818
+ # source://coderay//lib/coderay/scanners/css.rb#45
1819
+ CodeRay::Scanners::CSS::RE::AttributeSelector = T.let(T.unsafe(nil), Regexp)
1820
+
1821
+ # source://coderay//lib/coderay/scanners/css.rb#43
1822
+ CodeRay::Scanners::CSS::RE::Class = T.let(T.unsafe(nil), Regexp)
1823
+
1824
+ # source://coderay//lib/coderay/scanners/css.rb#38
1825
+ CodeRay::Scanners::CSS::RE::Dimension = T.let(T.unsafe(nil), Regexp)
1826
+
1827
+ # source://coderay//lib/coderay/scanners/css.rb#19
1828
+ CodeRay::Scanners::CSS::RE::Escape = T.let(T.unsafe(nil), Regexp)
1829
+
1830
+ # source://coderay//lib/coderay/scanners/css.rb#40
1831
+ CodeRay::Scanners::CSS::RE::Function = T.let(T.unsafe(nil), Regexp)
1832
+
1833
+ # source://coderay//lib/coderay/scanners/css.rb#17
1834
+ CodeRay::Scanners::CSS::RE::Hex = T.let(T.unsafe(nil), Regexp)
1835
+
1836
+ # source://coderay//lib/coderay/scanners/css.rb#26
1837
+ CodeRay::Scanners::CSS::RE::HexColor = T.let(T.unsafe(nil), Regexp)
1838
+
1839
+ # source://coderay//lib/coderay/scanners/css.rb#42
1840
+ CodeRay::Scanners::CSS::RE::Id = T.let(T.unsafe(nil), Regexp)
1841
+
1842
+ # source://coderay//lib/coderay/scanners/css.rb#30
1843
+ CodeRay::Scanners::CSS::RE::Ident = T.let(T.unsafe(nil), Regexp)
1844
+
1845
+ # source://coderay//lib/coderay/scanners/css.rb#20
1846
+ CodeRay::Scanners::CSS::RE::NMChar = T.let(T.unsafe(nil), Regexp)
1847
+
1848
+ # source://coderay//lib/coderay/scanners/css.rb#21
1849
+ CodeRay::Scanners::CSS::RE::NMStart = T.let(T.unsafe(nil), Regexp)
1850
+
1851
+ # source://coderay//lib/coderay/scanners/css.rb#29
1852
+ CodeRay::Scanners::CSS::RE::Name = T.let(T.unsafe(nil), Regexp)
1853
+
1854
+ # source://coderay//lib/coderay/scanners/css.rb#28
1855
+ CodeRay::Scanners::CSS::RE::Num = T.let(T.unsafe(nil), Regexp)
1856
+
1857
+ # source://coderay//lib/coderay/scanners/css.rb#32
1858
+ CodeRay::Scanners::CSS::RE::Percentage = T.let(T.unsafe(nil), Regexp)
1859
+
1860
+ # source://coderay//lib/coderay/scanners/css.rb#44
1861
+ CodeRay::Scanners::CSS::RE::PseudoClass = T.let(T.unsafe(nil), Regexp)
1862
+
1863
+ # source://coderay//lib/coderay/scanners/css.rb#24
1864
+ CodeRay::Scanners::CSS::RE::String = T.let(T.unsafe(nil), Regexp)
1865
+
1866
+ # TODO: buggy regexp
1867
+ #
1868
+ # source://coderay//lib/coderay/scanners/css.rb#22
1869
+ CodeRay::Scanners::CSS::RE::String1 = T.let(T.unsafe(nil), Regexp)
1870
+
1871
+ # TODO: buggy regexp
1872
+ #
1873
+ # source://coderay//lib/coderay/scanners/css.rb#23
1874
+ CodeRay::Scanners::CSS::RE::String2 = T.let(T.unsafe(nil), Regexp)
1875
+
1876
+ # differs from standard because it allows uppercase hex too
1877
+ #
1878
+ # source://coderay//lib/coderay/scanners/css.rb#18
1879
+ CodeRay::Scanners::CSS::RE::Unicode = T.let(T.unsafe(nil), Regexp)
1880
+
1881
+ # source://coderay//lib/coderay/scanners/css.rb#36
1882
+ CodeRay::Scanners::CSS::RE::Unit = T.let(T.unsafe(nil), Regexp)
1883
+
1884
+ # source://coderay//lib/coderay/scanners/clojure.rb#6
1885
+ class CodeRay::Scanners::Clojure < ::CodeRay::Scanners::Scanner
1886
+ protected
1887
+
1888
+ # source://coderay//lib/coderay/scanners/clojure.rb#145
1889
+ def scan_tokens(encoder, options); end
1890
+ end
1891
+
1892
+ # source://coderay//lib/coderay/scanners/clojure.rb#95
1893
+ CodeRay::Scanners::Clojure::BASIC_IDENTIFIER = T.let(T.unsafe(nil), Regexp)
1894
+
1895
+ # source://coderay//lib/coderay/scanners/clojure.rb#133
1896
+ CodeRay::Scanners::Clojure::COMPLEX10 = T.let(T.unsafe(nil), Regexp)
1897
+
1898
+ # source://coderay//lib/coderay/scanners/clojure.rb#134
1899
+ CodeRay::Scanners::Clojure::COMPLEX16 = T.let(T.unsafe(nil), Regexp)
1900
+
1901
+ # source://coderay//lib/coderay/scanners/clojure.rb#136
1902
+ CodeRay::Scanners::Clojure::COMPLEX2 = T.let(T.unsafe(nil), Regexp)
1903
+
1904
+ # source://coderay//lib/coderay/scanners/clojure.rb#135
1905
+ CodeRay::Scanners::Clojure::COMPLEX8 = T.let(T.unsafe(nil), Regexp)
1906
+
1907
+ # source://coderay//lib/coderay/scanners/clojure.rb#16
1908
+ CodeRay::Scanners::Clojure::CORE_FORMS = T.let(T.unsafe(nil), Array)
1909
+
1910
+ # source://coderay//lib/coderay/scanners/clojure.rb#120
1911
+ CodeRay::Scanners::Clojure::DECIMAL = T.let(T.unsafe(nil), Regexp)
1912
+
1913
+ # source://coderay//lib/coderay/scanners/clojure.rb#98
1914
+ CodeRay::Scanners::Clojure::DIGIT = T.let(T.unsafe(nil), Regexp)
1915
+
1916
+ # source://coderay//lib/coderay/scanners/clojure.rb#99
1917
+ CodeRay::Scanners::Clojure::DIGIT10 = T.let(T.unsafe(nil), Regexp)
1918
+
1919
+ # source://coderay//lib/coderay/scanners/clojure.rb#100
1920
+ CodeRay::Scanners::Clojure::DIGIT16 = T.let(T.unsafe(nil), Regexp)
1921
+
1922
+ # source://coderay//lib/coderay/scanners/clojure.rb#102
1923
+ CodeRay::Scanners::Clojure::DIGIT2 = T.let(T.unsafe(nil), Regexp)
1924
+
1925
+ # source://coderay//lib/coderay/scanners/clojure.rb#101
1926
+ CodeRay::Scanners::Clojure::DIGIT8 = T.let(T.unsafe(nil), Regexp)
1927
+
1928
+ # source://coderay//lib/coderay/scanners/clojure.rb#107
1929
+ CodeRay::Scanners::Clojure::EXACTNESS = T.let(T.unsafe(nil), Regexp)
1930
+
1931
+ # source://coderay//lib/coderay/scanners/clojure.rb#110
1932
+ CodeRay::Scanners::Clojure::EXP = T.let(T.unsafe(nil), Regexp)
1933
+
1934
+ # source://coderay//lib/coderay/scanners/clojure.rb#109
1935
+ CodeRay::Scanners::Clojure::EXP_MARK = T.let(T.unsafe(nil), Regexp)
1936
+
1937
+ # source://coderay//lib/coderay/scanners/clojure.rb#96
1938
+ CodeRay::Scanners::Clojure::IDENTIFIER = T.let(T.unsafe(nil), Regexp)
1939
+
1940
+ # source://coderay//lib/coderay/scanners/clojure.rb#85
1941
+ CodeRay::Scanners::Clojure::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList)
1942
+
1943
+ # source://coderay//lib/coderay/scanners/clojure.rb#129
1944
+ CodeRay::Scanners::Clojure::IMAG10 = T.let(T.unsafe(nil), Regexp)
1945
+
1946
+ # source://coderay//lib/coderay/scanners/clojure.rb#130
1947
+ CodeRay::Scanners::Clojure::IMAG16 = T.let(T.unsafe(nil), Regexp)
1948
+
1949
+ # source://coderay//lib/coderay/scanners/clojure.rb#132
1950
+ CodeRay::Scanners::Clojure::IMAG2 = T.let(T.unsafe(nil), Regexp)
1951
+
1952
+ # source://coderay//lib/coderay/scanners/clojure.rb#131
1953
+ CodeRay::Scanners::Clojure::IMAG8 = T.let(T.unsafe(nil), Regexp)
1954
+
1955
+ # source://coderay//lib/coderay/scanners/clojure.rb#90
1956
+ CodeRay::Scanners::Clojure::KEYWORD_NEXT_TOKEN_KIND = T.let(T.unsafe(nil), CodeRay::WordList)
1957
+
1958
+ # source://coderay//lib/coderay/scanners/clojure.rb#141
1959
+ CodeRay::Scanners::Clojure::NUM = T.let(T.unsafe(nil), Regexp)
1960
+
1961
+ # source://coderay//lib/coderay/scanners/clojure.rb#137
1962
+ CodeRay::Scanners::Clojure::NUM10 = T.let(T.unsafe(nil), Regexp)
1963
+
1964
+ # source://coderay//lib/coderay/scanners/clojure.rb#138
1965
+ CodeRay::Scanners::Clojure::NUM16 = T.let(T.unsafe(nil), Regexp)
1966
+
1967
+ # source://coderay//lib/coderay/scanners/clojure.rb#140
1968
+ CodeRay::Scanners::Clojure::NUM2 = T.let(T.unsafe(nil), Regexp)
1969
+
1970
+ # source://coderay//lib/coderay/scanners/clojure.rb#139
1971
+ CodeRay::Scanners::Clojure::NUM8 = T.let(T.unsafe(nil), Regexp)
1972
+
1973
+ # source://coderay//lib/coderay/scanners/clojure.rb#78
1974
+ CodeRay::Scanners::Clojure::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array)
1975
+
1976
+ # source://coderay//lib/coderay/scanners/clojure.rb#112
1977
+ CodeRay::Scanners::Clojure::PREFIX10 = T.let(T.unsafe(nil), Regexp)
1978
+
1979
+ # source://coderay//lib/coderay/scanners/clojure.rb#113
1980
+ CodeRay::Scanners::Clojure::PREFIX16 = T.let(T.unsafe(nil), Regexp)
1981
+
1982
+ # source://coderay//lib/coderay/scanners/clojure.rb#115
1983
+ CodeRay::Scanners::Clojure::PREFIX2 = T.let(T.unsafe(nil), Regexp)
1984
+
1985
+ # source://coderay//lib/coderay/scanners/clojure.rb#114
1986
+ CodeRay::Scanners::Clojure::PREFIX8 = T.let(T.unsafe(nil), Regexp)
1987
+
1988
+ # source://coderay//lib/coderay/scanners/clojure.rb#106
1989
+ CodeRay::Scanners::Clojure::RADIX10 = T.let(T.unsafe(nil), Regexp)
1990
+
1991
+ # source://coderay//lib/coderay/scanners/clojure.rb#103
1992
+ CodeRay::Scanners::Clojure::RADIX16 = T.let(T.unsafe(nil), Regexp)
1993
+
1994
+ # source://coderay//lib/coderay/scanners/clojure.rb#105
1995
+ CodeRay::Scanners::Clojure::RADIX2 = T.let(T.unsafe(nil), Regexp)
1996
+
1997
+ # source://coderay//lib/coderay/scanners/clojure.rb#104
1998
+ CodeRay::Scanners::Clojure::RADIX8 = T.let(T.unsafe(nil), Regexp)
1999
+
2000
+ # source://coderay//lib/coderay/scanners/clojure.rb#125
2001
+ CodeRay::Scanners::Clojure::REAL10 = T.let(T.unsafe(nil), Regexp)
2002
+
2003
+ # source://coderay//lib/coderay/scanners/clojure.rb#126
2004
+ CodeRay::Scanners::Clojure::REAL16 = T.let(T.unsafe(nil), Regexp)
2005
+
2006
+ # source://coderay//lib/coderay/scanners/clojure.rb#128
2007
+ CodeRay::Scanners::Clojure::REAL2 = T.let(T.unsafe(nil), Regexp)
2008
+
2009
+ # source://coderay//lib/coderay/scanners/clojure.rb#127
2010
+ CodeRay::Scanners::Clojure::REAL8 = T.let(T.unsafe(nil), Regexp)
2011
+
2012
+ # source://coderay//lib/coderay/scanners/clojure.rb#108
2013
+ CodeRay::Scanners::Clojure::SIGN = T.let(T.unsafe(nil), Regexp)
2014
+
2015
+ # source://coderay//lib/coderay/scanners/clojure.rb#11
2016
+ CodeRay::Scanners::Clojure::SPECIAL_FORMS = T.let(T.unsafe(nil), Array)
2017
+
2018
+ # source://coderay//lib/coderay/scanners/clojure.rb#111
2019
+ CodeRay::Scanners::Clojure::SUFFIX = T.let(T.unsafe(nil), Regexp)
2020
+
2021
+ # source://coderay//lib/coderay/scanners/clojure.rb#97
2022
+ CodeRay::Scanners::Clojure::SYMBOL = T.let(T.unsafe(nil), Regexp)
2023
+
2024
+ # source://coderay//lib/coderay/scanners/clojure.rb#116
2025
+ CodeRay::Scanners::Clojure::UINT10 = T.let(T.unsafe(nil), Regexp)
2026
+
2027
+ # source://coderay//lib/coderay/scanners/clojure.rb#117
2028
+ CodeRay::Scanners::Clojure::UINT16 = T.let(T.unsafe(nil), Regexp)
2029
+
2030
+ # source://coderay//lib/coderay/scanners/clojure.rb#119
2031
+ CodeRay::Scanners::Clojure::UINT2 = T.let(T.unsafe(nil), Regexp)
2032
+
2033
+ # source://coderay//lib/coderay/scanners/clojure.rb#118
2034
+ CodeRay::Scanners::Clojure::UINT8 = T.let(T.unsafe(nil), Regexp)
2035
+
2036
+ # source://coderay//lib/coderay/scanners/clojure.rb#121
2037
+ CodeRay::Scanners::Clojure::UREAL10 = T.let(T.unsafe(nil), Regexp)
2038
+
2039
+ # source://coderay//lib/coderay/scanners/clojure.rb#122
2040
+ CodeRay::Scanners::Clojure::UREAL16 = T.let(T.unsafe(nil), Regexp)
2041
+
2042
+ # source://coderay//lib/coderay/scanners/clojure.rb#124
2043
+ CodeRay::Scanners::Clojure::UREAL2 = T.let(T.unsafe(nil), Regexp)
2044
+
2045
+ # source://coderay//lib/coderay/scanners/clojure.rb#123
2046
+ CodeRay::Scanners::Clojure::UREAL8 = T.let(T.unsafe(nil), Regexp)
2047
+
2048
+ # = Debug Scanner
2049
+ #
2050
+ # Interprets the output of the Encoders::Debug encoder (basically the inverse function).
2051
+ #
2052
+ # source://coderay//lib/coderay/scanners/debug.rb#9
2053
+ class CodeRay::Scanners::Debug < ::CodeRay::Scanners::Scanner
2054
+ protected
2055
+
2056
+ # source://coderay//lib/coderay/scanners/debug.rb#21
2057
+ def scan_tokens(encoder, options); end
2058
+
2059
+ # source://coderay//lib/coderay/scanners/debug.rb#16
2060
+ def setup; end
2061
+ end
2062
+
2063
+ # Scanner for the Delphi language (Object Pascal).
2064
+ #
2065
+ # Alias: +pascal+
2066
+ #
2067
+ # source://coderay//lib/coderay/scanners/delphi.rb#7
2068
+ class CodeRay::Scanners::Delphi < ::CodeRay::Scanners::Scanner
2069
+ protected
2070
+
2071
+ # source://coderay//lib/coderay/scanners/delphi.rb#45
2072
+ def scan_tokens(encoder, options); end
2073
+ end
2074
+
2075
+ # source://coderay//lib/coderay/scanners/delphi.rb#25
2076
+ CodeRay::Scanners::Delphi::DIRECTIVES = T.let(T.unsafe(nil), Array)
2077
+
2078
+ # source://coderay//lib/coderay/scanners/delphi.rb#36
2079
+ CodeRay::Scanners::Delphi::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring)
2080
+
2081
+ # source://coderay//lib/coderay/scanners/delphi.rb#12
2082
+ CodeRay::Scanners::Delphi::KEYWORDS = T.let(T.unsafe(nil), Array)
2083
+
2084
+ # source://coderay//lib/coderay/scanners/delphi.rb#40
2085
+ CodeRay::Scanners::Delphi::NAME_FOLLOWS = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring)
2086
+
2087
+ # Scanner for output of the diff command.
2088
+ #
2089
+ # Alias: +patch+
2090
+ #
2091
+ # source://coderay//lib/coderay/scanners/diff.rb#7
2092
+ class CodeRay::Scanners::Diff < ::CodeRay::Scanners::Scanner
2093
+ protected
2094
+
2095
+ # source://coderay//lib/coderay/scanners/diff.rb#19
2096
+ def scan_tokens(encoder, options); end
2097
+
2098
+ private
2099
+
2100
+ # source://coderay//lib/coderay/scanners/diff.rb#204
2101
+ def diff(a, b); end
2102
+ end
2103
+
2104
+ # source://coderay//lib/coderay/scanners/diff.rb#12
2105
+ CodeRay::Scanners::Diff::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
2106
+
2107
+ # Scanner for HTML ERB templates.
2108
+ #
2109
+ # source://coderay//lib/coderay/scanners/erb.rb#8
2110
+ class CodeRay::Scanners::ERB < ::CodeRay::Scanners::Scanner
2111
+ protected
2112
+
2113
+ # source://coderay//lib/coderay/scanners/erb.rb#38
2114
+ def reset_instance; end
2115
+
2116
+ # source://coderay//lib/coderay/scanners/erb.rb#43
2117
+ def scan_tokens(encoder, options); end
2118
+
2119
+ # source://coderay//lib/coderay/scanners/erb.rb#33
2120
+ def setup; end
2121
+ end
2122
+
2123
+ # source://coderay//lib/coderay/scanners/erb.rb#15
2124
+ CodeRay::Scanners::ERB::ERB_RUBY_BLOCK = T.let(T.unsafe(nil), Regexp)
2125
+
2126
+ # source://coderay//lib/coderay/scanners/erb.rb#13
2127
+ CodeRay::Scanners::ERB::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array)
2128
+
2129
+ # source://coderay//lib/coderay/scanners/erb.rb#27
2130
+ CodeRay::Scanners::ERB::START_OF_ERB = T.let(T.unsafe(nil), Regexp)
2131
+
2132
+ # source://coderay//lib/coderay/scanners/go.rb#4
2133
+ class CodeRay::Scanners::Go < ::CodeRay::Scanners::Scanner
2134
+ protected
2135
+
2136
+ # source://coderay//lib/coderay/scanners/go.rb#50
2137
+ def scan_tokens(encoder, options); end
2138
+ end
2139
+
2140
+ # source://coderay//lib/coderay/scanners/go.rb#45
2141
+ CodeRay::Scanners::Go::ESCAPE = T.let(T.unsafe(nil), Regexp)
2142
+
2143
+ # source://coderay//lib/coderay/scanners/go.rb#39
2144
+ CodeRay::Scanners::Go::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList)
2145
+
2146
+ # http://golang.org/ref/spec#Keywords
2147
+ #
2148
+ # source://coderay//lib/coderay/scanners/go.rb#10
2149
+ CodeRay::Scanners::Go::KEYWORDS = T.let(T.unsafe(nil), Array)
2150
+
2151
+ # source://coderay//lib/coderay/scanners/go.rb#29
2152
+ CodeRay::Scanners::Go::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array)
2153
+
2154
+ # source://coderay//lib/coderay/scanners/go.rb#34
2155
+ CodeRay::Scanners::Go::PREDEFINED_FUNCTIONS = T.let(T.unsafe(nil), Array)
2156
+
2157
+ # http://golang.org/ref/spec#Types
2158
+ #
2159
+ # source://coderay//lib/coderay/scanners/go.rb#19
2160
+ CodeRay::Scanners::Go::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array)
2161
+
2162
+ # source://coderay//lib/coderay/scanners/go.rb#46
2163
+ CodeRay::Scanners::Go::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp)
2164
+
2165
+ # Scanner for Groovy.
2166
+ #
2167
+ # source://coderay//lib/coderay/scanners/groovy.rb#7
2168
+ class CodeRay::Scanners::Groovy < ::CodeRay::Scanners::Java
2169
+ protected
2170
+
2171
+ # source://coderay//lib/coderay/scanners/groovy.rb#43
2172
+ def scan_tokens(encoder, options); end
2173
+
2174
+ # source://coderay//lib/coderay/scanners/groovy.rb#39
2175
+ def setup; end
2176
+ end
2177
+
2178
+ # source://coderay//lib/coderay/scanners/groovy.rb#24
2179
+ CodeRay::Scanners::Groovy::ESCAPE = T.let(T.unsafe(nil), Regexp)
2180
+
2181
+ # TODO: check list of keywords
2182
+ #
2183
+ # source://coderay//lib/coderay/scanners/groovy.rb#12
2184
+ CodeRay::Scanners::Groovy::GROOVY_KEYWORDS = T.let(T.unsafe(nil), Array)
2185
+
2186
+ # source://coderay//lib/coderay/scanners/groovy.rb#18
2187
+ CodeRay::Scanners::Groovy::GROOVY_MAGIC_VARIABLES = T.let(T.unsafe(nil), Array)
2188
+
2189
+ # source://coderay//lib/coderay/scanners/groovy.rb#20
2190
+ CodeRay::Scanners::Groovy::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList)
2191
+
2192
+ # source://coderay//lib/coderay/scanners/groovy.rb#15
2193
+ CodeRay::Scanners::Groovy::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList)
2194
+
2195
+ # source://coderay//lib/coderay/scanners/groovy.rb#26
2196
+ CodeRay::Scanners::Groovy::REGEXP_ESCAPE = T.let(T.unsafe(nil), Regexp)
2197
+
2198
+ # TODO: interpretation inside ', ", /
2199
+ #
2200
+ # source://coderay//lib/coderay/scanners/groovy.rb#29
2201
+ CodeRay::Scanners::Groovy::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash)
2202
+
2203
+ # source://coderay//lib/coderay/scanners/groovy.rb#25
2204
+ CodeRay::Scanners::Groovy::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp)
2205
+
2206
+ # source://coderay//lib/coderay/scanners/haml.rb#8
2207
+ class CodeRay::Scanners::HAML < ::CodeRay::Scanners::Scanner
2208
+ protected
2209
+
2210
+ # source://coderay//lib/coderay/scanners/haml.rb#24
2211
+ def scan_tokens(encoder, options); end
2212
+
2213
+ # source://coderay//lib/coderay/scanners/haml.rb#17
2214
+ def setup; end
2215
+ end
2216
+
2217
+ # source://coderay//lib/coderay/scanners/haml.rb#13
2218
+ CodeRay::Scanners::HAML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array)
2219
+
2220
+ # HTML Scanner
2221
+ #
2222
+ # Alias: +xhtml+
2223
+ #
2224
+ # See also: Scanners::XML
2225
+ #
2226
+ # source://coderay//lib/coderay/scanners/html.rb#9
2227
+ class CodeRay::Scanners::HTML < ::CodeRay::Scanners::Scanner
2228
+ # source://coderay//lib/coderay/scanners/html.rb#62
2229
+ def reset; end
2230
+
2231
+ protected
2232
+
2233
+ # source://coderay//lib/coderay/scanners/html.rb#83
2234
+ def scan_css(encoder, code, state = T.unsafe(nil)); end
2235
+
2236
+ # source://coderay//lib/coderay/scanners/html.rb#76
2237
+ def scan_java_script(encoder, code); end
2238
+
2239
+ # source://coderay//lib/coderay/scanners/html.rb#90
2240
+ def scan_tokens(encoder, options); end
2241
+
2242
+ # source://coderay//lib/coderay/scanners/html.rb#70
2243
+ def setup; end
2244
+ end
2245
+
2246
+ # source://coderay//lib/coderay/scanners/html.rb#39
2247
+ CodeRay::Scanners::HTML::ATTR_NAME = T.let(T.unsafe(nil), Regexp)
2248
+
2249
+ # source://coderay//lib/coderay/scanners/html.rb#42
2250
+ CodeRay::Scanners::HTML::ENTITY = T.let(T.unsafe(nil), Regexp)
2251
+
2252
+ # source://coderay//lib/coderay/scanners/html.rb#20
2253
+ CodeRay::Scanners::HTML::EVENT_ATTRIBUTES = T.let(T.unsafe(nil), Array)
2254
+
2255
+ # source://coderay//lib/coderay/scanners/html.rb#41
2256
+ CodeRay::Scanners::HTML::HEX = T.let(T.unsafe(nil), Regexp)
2257
+
2258
+ # source://coderay//lib/coderay/scanners/html.rb#35
2259
+ CodeRay::Scanners::HTML::IN_ATTRIBUTE = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring)
2260
+
2261
+ # source://coderay//lib/coderay/scanners/html.rb#13
2262
+ CodeRay::Scanners::HTML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array)
2263
+
2264
+ # source://coderay//lib/coderay/scanners/html.rb#57
2265
+ CodeRay::Scanners::HTML::PLAIN_STRING_CONTENT = T.let(T.unsafe(nil), Hash)
2266
+
2267
+ # source://coderay//lib/coderay/scanners/html.rb#40
2268
+ CodeRay::Scanners::HTML::TAG_END = T.let(T.unsafe(nil), Regexp)
2269
+
2270
+ # Scanner for JSON (JavaScript Object Notation).
2271
+ #
2272
+ # source://coderay//lib/coderay/scanners/json.rb#5
2273
+ class CodeRay::Scanners::JSON < ::CodeRay::Scanners::Scanner
2274
+ protected
2275
+
2276
+ # See http://json.org/ for a definition of the JSON lexic/grammar.
2277
+ #
2278
+ # source://coderay//lib/coderay/scanners/json.rb#26
2279
+ def scan_tokens(encoder, options); end
2280
+
2281
+ # source://coderay//lib/coderay/scanners/json.rb#21
2282
+ def setup; end
2283
+ end
2284
+
2285
+ # source://coderay//lib/coderay/scanners/json.rb#15
2286
+ CodeRay::Scanners::JSON::ESCAPE = T.let(T.unsafe(nil), Regexp)
2287
+
2288
+ # source://coderay//lib/coderay/scanners/json.rb#17
2289
+ CodeRay::Scanners::JSON::KEY = T.let(T.unsafe(nil), Regexp)
2290
+
2291
+ # source://coderay//lib/coderay/scanners/json.rb#10
2292
+ CodeRay::Scanners::JSON::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array)
2293
+
2294
+ # source://coderay//lib/coderay/scanners/json.rb#16
2295
+ CodeRay::Scanners::JSON::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp)
2296
+
2297
+ # Scanner for Java.
2298
+ #
2299
+ # source://coderay//lib/coderay/scanners/java.rb#5
2300
+ class CodeRay::Scanners::Java < ::CodeRay::Scanners::Scanner
2301
+ protected
2302
+
2303
+ # source://coderay//lib/coderay/scanners/java.rb#51
2304
+ def scan_tokens(encoder, options); end
2305
+ end
2306
+
2307
+ # source://coderay//lib/coderay/scanners/java/builtin_types.rb#4
2308
+ module CodeRay::Scanners::Java::BuiltinTypes; end
2309
+
2310
+ # source://coderay//lib/coderay/scanners/java/builtin_types.rb#7
2311
+ CodeRay::Scanners::Java::BuiltinTypes::List = T.let(T.unsafe(nil), Array)
2312
+
2313
+ # source://coderay//lib/coderay/scanners/java.rb#19
2314
+ CodeRay::Scanners::Java::CONSTANTS = T.let(T.unsafe(nil), Array)
2315
+
2316
+ # source://coderay//lib/coderay/scanners/java.rb#25
2317
+ CodeRay::Scanners::Java::DIRECTIVES = T.let(T.unsafe(nil), Array)
2318
+
2319
+ # source://coderay//lib/coderay/scanners/java.rb#40
2320
+ CodeRay::Scanners::Java::ESCAPE = T.let(T.unsafe(nil), Regexp)
2321
+
2322
+ # source://coderay//lib/coderay/scanners/java.rb#47
2323
+ CodeRay::Scanners::Java::IDENT = T.let(T.unsafe(nil), Regexp)
2324
+
2325
+ # source://coderay//lib/coderay/scanners/java.rb#30
2326
+ CodeRay::Scanners::Java::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList)
2327
+
2328
+ # http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html
2329
+ #
2330
+ # source://coderay//lib/coderay/scanners/java.rb#12
2331
+ CodeRay::Scanners::Java::KEYWORDS = T.let(T.unsafe(nil), Array)
2332
+
2333
+ # source://coderay//lib/coderay/scanners/java.rb#20
2334
+ CodeRay::Scanners::Java::MAGIC_VARIABLES = T.let(T.unsafe(nil), Array)
2335
+
2336
+ # source://coderay//lib/coderay/scanners/java.rb#18
2337
+ CodeRay::Scanners::Java::RESERVED = T.let(T.unsafe(nil), Array)
2338
+
2339
+ # source://coderay//lib/coderay/scanners/java.rb#42
2340
+ CodeRay::Scanners::Java::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash)
2341
+
2342
+ # source://coderay//lib/coderay/scanners/java.rb#21
2343
+ CodeRay::Scanners::Java::TYPES = T.let(T.unsafe(nil), Array)
2344
+
2345
+ # source://coderay//lib/coderay/scanners/java.rb#41
2346
+ CodeRay::Scanners::Java::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp)
2347
+
2348
+ # Scanner for JavaScript.
2349
+ #
2350
+ # Aliases: +ecmascript+, +ecma_script+, +javascript+
2351
+ #
2352
+ # source://coderay//lib/coderay/scanners/java_script.rb#7
2353
+ class CodeRay::Scanners::JavaScript < ::CodeRay::Scanners::Scanner
2354
+ protected
2355
+
2356
+ # source://coderay//lib/coderay/scanners/java_script.rb#224
2357
+ def reset_instance; end
2358
+
2359
+ # source://coderay//lib/coderay/scanners/java_script.rb#61
2360
+ def scan_tokens(encoder, options); end
2361
+
2362
+ # source://coderay//lib/coderay/scanners/java_script.rb#57
2363
+ def setup; end
2364
+
2365
+ # source://coderay//lib/coderay/scanners/java_script.rb#229
2366
+ def xml_scanner; end
2367
+ end
2368
+
2369
+ # source://coderay//lib/coderay/scanners/java_script.rb#42
2370
+ CodeRay::Scanners::JavaScript::ESCAPE = T.let(T.unsafe(nil), Regexp)
2371
+
2372
+ # source://coderay//lib/coderay/scanners/java_script.rb#36
2373
+ CodeRay::Scanners::JavaScript::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList)
2374
+
2375
+ # The actual JavaScript keywords.
2376
+ #
2377
+ # source://coderay//lib/coderay/scanners/java_script.rb#13
2378
+ CodeRay::Scanners::JavaScript::KEYWORDS = T.let(T.unsafe(nil), Array)
2379
+
2380
+ # source://coderay//lib/coderay/scanners/java_script.rb#24
2381
+ CodeRay::Scanners::JavaScript::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList)
2382
+
2383
+ # source://coderay//lib/coderay/scanners/java_script.rb#50
2384
+ CodeRay::Scanners::JavaScript::KEY_CHECK_PATTERN = T.let(T.unsafe(nil), Hash)
2385
+
2386
+ # source://coderay//lib/coderay/scanners/java_script.rb#22
2387
+ CodeRay::Scanners::JavaScript::MAGIC_VARIABLES = T.let(T.unsafe(nil), Array)
2388
+
2389
+ # source://coderay//lib/coderay/scanners/java_script.rb#18
2390
+ CodeRay::Scanners::JavaScript::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array)
2391
+
2392
+ # source://coderay//lib/coderay/scanners/java_script.rb#44
2393
+ CodeRay::Scanners::JavaScript::REGEXP_ESCAPE = T.let(T.unsafe(nil), Regexp)
2394
+
2395
+ # Reserved for future use.
2396
+ #
2397
+ # source://coderay//lib/coderay/scanners/java_script.rb#29
2398
+ CodeRay::Scanners::JavaScript::RESERVED_WORDS = T.let(T.unsafe(nil), Array)
2399
+
2400
+ # source://coderay//lib/coderay/scanners/java_script.rb#45
2401
+ CodeRay::Scanners::JavaScript::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash)
2402
+
2403
+ # source://coderay//lib/coderay/scanners/java_script.rb#43
2404
+ CodeRay::Scanners::JavaScript::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp)
2405
+
2406
+ # Scanner for the Lua[http://lua.org] programming lanuage.
2407
+ #
2408
+ # The language’s complete syntax is defined in
2409
+ # {the Lua manual}[http://www.lua.org/manual/5.2/manual.html],
2410
+ # which is what this scanner tries to conform to.
2411
+ #
2412
+ # source://coderay//lib/coderay/scanners/lua.rb#11
2413
+ class CodeRay::Scanners::Lua < ::CodeRay::Scanners::Scanner
2414
+ protected
2415
+
2416
+ # CodeRay entry hook. Starts parsing.
2417
+ #
2418
+ # source://coderay//lib/coderay/scanners/lua.rb#60
2419
+ def scan_tokens(encoder, options); end
2420
+
2421
+ # Scanner initialization.
2422
+ #
2423
+ # source://coderay//lib/coderay/scanners/lua.rb#54
2424
+ def setup; end
2425
+ end
2426
+
2427
+ # Automatic token kind selection for normal words.
2428
+ #
2429
+ # source://coderay//lib/coderay/scanners/lua.rb#46
2430
+ CodeRay::Scanners::Lua::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList)
2431
+
2432
+ # Keywords used in Lua.
2433
+ #
2434
+ # source://coderay//lib/coderay/scanners/lua.rb#18
2435
+ CodeRay::Scanners::Lua::KEYWORDS = T.let(T.unsafe(nil), Array)
2436
+
2437
+ # Constants set by the Lua core.
2438
+ #
2439
+ # source://coderay//lib/coderay/scanners/lua.rb#25
2440
+ CodeRay::Scanners::Lua::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array)
2441
+
2442
+ # The expressions contained in this array are parts of Lua’s `basic'
2443
+ # library. Although it’s not entirely necessary to load that library,
2444
+ # it is highly recommended and one would have to provide own implementations
2445
+ # of some of these expressions if one does not do so. They however aren’t
2446
+ # keywords, neither are they constants, but nearly predefined, so they
2447
+ # get tagged as `predefined' rather than anything else.
2448
+ #
2449
+ # This list excludes values of form `_UPPERCASE' because the Lua manual
2450
+ # requires such identifiers to be reserved by Lua anyway and they are
2451
+ # highlighted directly accordingly, without the need for specific
2452
+ # identifiers to be listed here.
2453
+ #
2454
+ # source://coderay//lib/coderay/scanners/lua.rb#38
2455
+ CodeRay::Scanners::Lua::PREDEFINED_EXPRESSIONS = T.let(T.unsafe(nil), Array)
2456
+
2457
+ # Scanner for PHP.
2458
+ #
2459
+ # Original by Stefan Walk.
2460
+ #
2461
+ # source://coderay//lib/coderay/scanners/php.rb#10
2462
+ class CodeRay::Scanners::PHP < ::CodeRay::Scanners::Scanner
2463
+ protected
2464
+
2465
+ # source://coderay//lib/coderay/scanners/php.rb#23
2466
+ def reset_instance; end
2467
+
2468
+ # source://coderay//lib/coderay/scanners/php.rb#234
2469
+ def scan_tokens(encoder, options); end
2470
+
2471
+ # source://coderay//lib/coderay/scanners/php.rb#19
2472
+ def setup; end
2473
+ end
2474
+
2475
+ # source://coderay//lib/coderay/scanners/php.rb#15
2476
+ CodeRay::Scanners::PHP::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array)
2477
+
2478
+ # source://coderay//lib/coderay/scanners/php.rb#197
2479
+ module CodeRay::Scanners::PHP::RE; end
2480
+
2481
+ # source://coderay//lib/coderay/scanners/php.rb#211
2482
+ CodeRay::Scanners::PHP::RE::HTML_INDICATOR = T.let(T.unsafe(nil), Regexp)
2483
+
2484
+ # source://coderay//lib/coderay/scanners/php.rb#213
2485
+ CodeRay::Scanners::PHP::RE::IDENTIFIER = T.let(T.unsafe(nil), Regexp)
2486
+
2487
+ # source://coderay//lib/coderay/scanners/php.rb#216
2488
+ CodeRay::Scanners::PHP::RE::OPERATOR = T.let(T.unsafe(nil), Regexp)
2489
+
2490
+ # source://coderay//lib/coderay/scanners/php.rb#206
2491
+ CodeRay::Scanners::PHP::RE::PHP_END = T.let(T.unsafe(nil), Regexp)
2492
+
2493
+ # source://coderay//lib/coderay/scanners/php.rb#199
2494
+ CodeRay::Scanners::PHP::RE::PHP_START = T.let(T.unsafe(nil), Regexp)
2495
+
2496
+ # source://coderay//lib/coderay/scanners/php.rb#214
2497
+ CodeRay::Scanners::PHP::RE::VARIABLE = T.let(T.unsafe(nil), Regexp)
2498
+
2499
+ # source://coderay//lib/coderay/scanners/php.rb#28
2500
+ module CodeRay::Scanners::PHP::Words; end
2501
+
2502
+ # according to http://php.net/quickref.php on 2009-04-21;
2503
+ # all functions with _ excluded (module functions) and selected additional functions
2504
+ #
2505
+ # source://coderay//lib/coderay/scanners/php.rb#50
2506
+ CodeRay::Scanners::PHP::Words::BUILTIN_FUNCTIONS = T.let(T.unsafe(nil), Array)
2507
+
2508
+ # source://coderay//lib/coderay/scanners/php.rb#46
2509
+ CodeRay::Scanners::PHP::Words::CLASSES = T.let(T.unsafe(nil), Array)
2510
+
2511
+ # source://coderay//lib/coderay/scanners/php.rb#145
2512
+ CodeRay::Scanners::PHP::Words::CONSTANTS = T.let(T.unsafe(nil), Array)
2513
+
2514
+ # TODO: more built-in PHP functions?
2515
+ #
2516
+ # source://coderay//lib/coderay/scanners/php.rb#140
2517
+ CodeRay::Scanners::PHP::Words::EXCEPTIONS = T.let(T.unsafe(nil), Array)
2518
+
2519
+ # source://coderay//lib/coderay/scanners/php.rb#184
2520
+ CodeRay::Scanners::PHP::Words::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring)
2521
+
2522
+ # according to http://www.php.net/manual/en/reserved.keywords.php
2523
+ #
2524
+ # source://coderay//lib/coderay/scanners/php.rb#31
2525
+ CodeRay::Scanners::PHP::Words::KEYWORDS = T.let(T.unsafe(nil), Array)
2526
+
2527
+ # source://coderay//lib/coderay/scanners/php.rb#41
2528
+ CodeRay::Scanners::PHP::Words::LANGUAGE_CONSTRUCTS = T.let(T.unsafe(nil), Array)
2529
+
2530
+ # source://coderay//lib/coderay/scanners/php.rb#178
2531
+ CodeRay::Scanners::PHP::Words::PREDEFINED = T.let(T.unsafe(nil), Array)
2532
+
2533
+ # source://coderay//lib/coderay/scanners/php.rb#39
2534
+ CodeRay::Scanners::PHP::Words::TYPES = T.let(T.unsafe(nil), Array)
2535
+
2536
+ # source://coderay//lib/coderay/scanners/php.rb#193
2537
+ CodeRay::Scanners::PHP::Words::VARIABLE_KIND = T.let(T.unsafe(nil), CodeRay::WordList)
2538
+
2539
+ # Scanner for Python. Supports Python 3.
2540
+ #
2541
+ # Based on pygments' PythonLexer, see
2542
+ # http://dev.pocoo.org/projects/pygments/browser/pygments/lexers/agile.py.
2543
+ #
2544
+ # source://coderay//lib/coderay/scanners/python.rb#8
2545
+ class CodeRay::Scanners::Python < ::CodeRay::Scanners::Scanner
2546
+ protected
2547
+
2548
+ # source://coderay//lib/coderay/scanners/python.rb#103
2549
+ def scan_tokens(encoder, options); end
2550
+ end
2551
+
2552
+ # source://coderay//lib/coderay/scanners/python.rb#86
2553
+ CodeRay::Scanners::Python::DEF_NEW_STATE = T.let(T.unsafe(nil), CodeRay::WordList)
2554
+
2555
+ # source://coderay//lib/coderay/scanners/python.rb#91
2556
+ CodeRay::Scanners::Python::DESCRIPTOR = T.let(T.unsafe(nil), Regexp)
2557
+
2558
+ # source://coderay//lib/coderay/scanners/python.rb#97
2559
+ CodeRay::Scanners::Python::DOCSTRING_COMING = T.let(T.unsafe(nil), Regexp)
2560
+
2561
+ # source://coderay//lib/coderay/scanners/python.rb#65
2562
+ CodeRay::Scanners::Python::ESCAPE = T.let(T.unsafe(nil), Regexp)
2563
+
2564
+ # source://coderay//lib/coderay/scanners/python.rb#57
2565
+ CodeRay::Scanners::Python::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList)
2566
+
2567
+ # source://coderay//lib/coderay/scanners/python.rb#13
2568
+ CodeRay::Scanners::Python::KEYWORDS = T.let(T.unsafe(nil), Array)
2569
+
2570
+ # source://coderay//lib/coderay/scanners/python.rb#64
2571
+ CodeRay::Scanners::Python::NAME = T.let(T.unsafe(nil), Regexp)
2572
+
2573
+ # source://coderay//lib/coderay/scanners/python.rb#21
2574
+ CodeRay::Scanners::Python::OLD_KEYWORDS = T.let(T.unsafe(nil), Array)
2575
+
2576
+ # source://coderay//lib/coderay/scanners/python.rb#68
2577
+ CodeRay::Scanners::Python::OPERATOR = T.let(T.unsafe(nil), Regexp)
2578
+
2579
+ # source://coderay//lib/coderay/scanners/python.rb#37
2580
+ CodeRay::Scanners::Python::PREDEFINED_EXCEPTIONS = T.let(T.unsafe(nil), Array)
2581
+
2582
+ # source://coderay//lib/coderay/scanners/python.rb#25
2583
+ CodeRay::Scanners::Python::PREDEFINED_METHODS_AND_TYPES = T.let(T.unsafe(nil), Array)
2584
+
2585
+ # source://coderay//lib/coderay/scanners/python.rb#52
2586
+ CodeRay::Scanners::Python::PREDEFINED_VARIABLES_AND_CONSTANTS = T.let(T.unsafe(nil), Array)
2587
+
2588
+ # source://coderay//lib/coderay/scanners/python.rb#82
2589
+ CodeRay::Scanners::Python::STRING_CONTENT_REGEXP = T.let(T.unsafe(nil), Hash)
2590
+
2591
+ # source://coderay//lib/coderay/scanners/python.rb#78
2592
+ CodeRay::Scanners::Python::STRING_DELIMITER_REGEXP = T.let(T.unsafe(nil), Hash)
2593
+
2594
+ # source://coderay//lib/coderay/scanners/python.rb#66
2595
+ CodeRay::Scanners::Python::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp)
2596
+
2597
+ # = Raydebug Scanner
2598
+ #
2599
+ # Highlights the output of the Encoders::Debug encoder.
2600
+ #
2601
+ # source://coderay//lib/coderay/scanners/raydebug.rb#9
2602
+ class CodeRay::Scanners::Raydebug < ::CodeRay::Scanners::Scanner
2603
+ protected
2604
+
2605
+ # source://coderay//lib/coderay/scanners/raydebug.rb#22
2606
+ def scan_tokens(encoder, options); end
2607
+
2608
+ # source://coderay//lib/coderay/scanners/raydebug.rb#17
2609
+ def setup; end
2610
+ end
2611
+
2612
+ # This scanner is really complex, since Ruby _is_ a complex language!
2613
+ #
2614
+ # It tries to highlight 100% of all common code,
2615
+ # and 90% of strange codes.
2616
+ #
2617
+ # It is optimized for HTML highlighting, and is not very useful for
2618
+ # parsing or pretty printing.
2619
+ #
2620
+ # source://coderay//lib/coderay/scanners/ruby.rb#11
2621
+ class CodeRay::Scanners::Ruby < ::CodeRay::Scanners::Scanner
2622
+ # source://coderay//lib/coderay/scanners/ruby.rb#19
2623
+ def interpreted_string_state; end
2624
+
2625
+ protected
2626
+
2627
+ # source://coderay//lib/coderay/scanners/ruby.rb#29
2628
+ def scan_tokens(encoder, options); end
2629
+
2630
+ # source://coderay//lib/coderay/scanners/ruby.rb#25
2631
+ def setup; end
2632
+ end
2633
+
2634
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#5
2635
+ module CodeRay::Scanners::Ruby::Patterns; end
2636
+
2637
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#72
2638
+ CodeRay::Scanners::Ruby::Patterns::BINARY = T.let(T.unsafe(nil), Regexp)
2639
+
2640
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#106
2641
+ CodeRay::Scanners::Ruby::Patterns::CHARACTER = T.let(T.unsafe(nil), Regexp)
2642
+
2643
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#55
2644
+ CodeRay::Scanners::Ruby::Patterns::CLASS_VARIABLE = T.let(T.unsafe(nil), Regexp)
2645
+
2646
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#96
2647
+ CodeRay::Scanners::Ruby::Patterns::CONTROL_META_ESCAPE = T.let(T.unsafe(nil), Regexp)
2648
+
2649
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#132
2650
+ CodeRay::Scanners::Ruby::Patterns::DATA = T.let(T.unsafe(nil), Regexp)
2651
+
2652
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#69
2653
+ CodeRay::Scanners::Ruby::Patterns::DECIMAL = T.let(T.unsafe(nil), Regexp)
2654
+
2655
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#102
2656
+ CodeRay::Scanners::Ruby::Patterns::ESCAPE = T.let(T.unsafe(nil), Regexp)
2657
+
2658
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#74
2659
+ CodeRay::Scanners::Ruby::Patterns::EXPONENT = T.let(T.unsafe(nil), Regexp)
2660
+
2661
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#168
2662
+ CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_INTERPRETED = T.let(T.unsafe(nil), Hash)
2663
+
2664
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#161
2665
+ CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_KIND = T.let(T.unsafe(nil), Hash)
2666
+
2667
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#160
2668
+ CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_START = T.let(T.unsafe(nil), Regexp)
2669
+
2670
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#76
2671
+ CodeRay::Scanners::Ruby::Patterns::FLOAT_OR_INT = T.let(T.unsafe(nil), Regexp)
2672
+
2673
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#75
2674
+ CodeRay::Scanners::Ruby::Patterns::FLOAT_SUFFIX = T.let(T.unsafe(nil), Regexp)
2675
+
2676
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#57
2677
+ CodeRay::Scanners::Ruby::Patterns::GLOBAL_VARIABLE = T.let(T.unsafe(nil), Regexp)
2678
+
2679
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#116
2680
+ CodeRay::Scanners::Ruby::Patterns::HEREDOC_OPEN = T.let(T.unsafe(nil), Regexp)
2681
+
2682
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#71
2683
+ CodeRay::Scanners::Ruby::Patterns::HEXADECIMAL = T.let(T.unsafe(nil), Regexp)
2684
+
2685
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#38
2686
+ CodeRay::Scanners::Ruby::Patterns::IDENT = T.let(T.unsafe(nil), Regexp)
2687
+
2688
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#28
2689
+ CodeRay::Scanners::Ruby::Patterns::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList)
2690
+
2691
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#54
2692
+ CodeRay::Scanners::Ruby::Patterns::INSTANCE_VARIABLE = T.let(T.unsafe(nil), Regexp)
2693
+
2694
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#7
2695
+ CodeRay::Scanners::Ruby::Patterns::KEYWORDS = T.let(T.unsafe(nil), Array)
2696
+
2697
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#151
2698
+ CodeRay::Scanners::Ruby::Patterns::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList)
2699
+
2700
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#32
2701
+ CodeRay::Scanners::Ruby::Patterns::KEYWORD_NEW_STATE = T.let(T.unsafe(nil), CodeRay::WordList)
2702
+
2703
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#53
2704
+ CodeRay::Scanners::Ruby::Patterns::METHOD_AFTER_DOT = T.let(T.unsafe(nil), Regexp)
2705
+
2706
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#40
2707
+ CodeRay::Scanners::Ruby::Patterns::METHOD_NAME = T.let(T.unsafe(nil), Regexp)
2708
+
2709
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#52
2710
+ CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_EX = T.let(T.unsafe(nil), Regexp)
2711
+
2712
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#41
2713
+ CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_OPERATOR = T.let(T.unsafe(nil), Regexp)
2714
+
2715
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#87
2716
+ CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_OR_SYMBOL = T.let(T.unsafe(nil), Regexp)
2717
+
2718
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#51
2719
+ CodeRay::Scanners::Ruby::Patterns::METHOD_SUFFIX = T.let(T.unsafe(nil), Regexp)
2720
+
2721
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#77
2722
+ CodeRay::Scanners::Ruby::Patterns::NUMERIC = T.let(T.unsafe(nil), Regexp)
2723
+
2724
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#56
2725
+ CodeRay::Scanners::Ruby::Patterns::OBJECT_VARIABLE = T.let(T.unsafe(nil), Regexp)
2726
+
2727
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#70
2728
+ CodeRay::Scanners::Ruby::Patterns::OCTAL = T.let(T.unsafe(nil), Regexp)
2729
+
2730
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#17
2731
+ CodeRay::Scanners::Ruby::Patterns::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array)
2732
+
2733
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#58
2734
+ CodeRay::Scanners::Ruby::Patterns::PREFIX_VARIABLE = T.let(T.unsafe(nil), Regexp)
2735
+
2736
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#61
2737
+ CodeRay::Scanners::Ruby::Patterns::QUOTE_TO_TYPE = T.let(T.unsafe(nil), Hash)
2738
+
2739
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#67
2740
+ CodeRay::Scanners::Ruby::Patterns::REGEXP_MODIFIERS = T.let(T.unsafe(nil), Regexp)
2741
+
2742
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#126
2743
+ CodeRay::Scanners::Ruby::Patterns::RUBYDOC = T.let(T.unsafe(nil), Regexp)
2744
+
2745
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#138
2746
+ CodeRay::Scanners::Ruby::Patterns::RUBYDOC_OR_DATA = T.let(T.unsafe(nil), Regexp)
2747
+
2748
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#89
2749
+ CodeRay::Scanners::Ruby::Patterns::SIMPLE_ESCAPE = T.let(T.unsafe(nil), Regexp)
2750
+
2751
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#79
2752
+ CodeRay::Scanners::Ruby::Patterns::SYMBOL = T.let(T.unsafe(nil), Regexp)
2753
+
2754
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#142
2755
+ CodeRay::Scanners::Ruby::Patterns::VALUE_FOLLOWS = T.let(T.unsafe(nil), Regexp)
2756
+
2757
+ # source://coderay//lib/coderay/scanners/ruby/patterns.rb#59
2758
+ CodeRay::Scanners::Ruby::Patterns::VARIABLE = T.let(T.unsafe(nil), Regexp)
2759
+
2760
+ # source://coderay//lib/coderay/scanners/ruby/string_state.rb#8
2761
+ class CodeRay::Scanners::Ruby::StringState < ::Struct
2762
+ # @return [StringState] a new instance of StringState
2763
+ #
2764
+ # source://coderay//lib/coderay/scanners/ruby/string_state.rb#48
2765
+ def initialize(kind, interpreted, delim, heredoc = T.unsafe(nil)); end
2766
+
2767
+ # source://coderay//lib/coderay/scanners/ruby/string_state.rb#63
2768
+ def heredoc_pattern(delim, interpreted, indented); end
2769
+
2770
+ class << self
2771
+ # source://coderay//lib/coderay/scanners/ruby/string_state.rb#40
2772
+ def simple_key_pattern(delim); end
2773
+ end
2774
+ end
2775
+
2776
+ # source://coderay//lib/coderay/scanners/ruby/string_state.rb#10
2777
+ CodeRay::Scanners::Ruby::StringState::CLOSING_PAREN = T.let(T.unsafe(nil), Hash)
2778
+
2779
+ # source://coderay//lib/coderay/scanners/ruby/string_state.rb#17
2780
+ CodeRay::Scanners::Ruby::StringState::STRING_PATTERN = T.let(T.unsafe(nil), Hash)
2781
+
2782
+ # by Josh Goebel
2783
+ #
2784
+ # source://coderay//lib/coderay/scanners/sql.rb#5
2785
+ class CodeRay::Scanners::SQL < ::CodeRay::Scanners::Scanner
2786
+ # source://coderay//lib/coderay/scanners/sql.rb#66
2787
+ def scan_tokens(encoder, options); end
2788
+ end
2789
+
2790
+ # source://coderay//lib/coderay/scanners/sql.rb#23
2791
+ CodeRay::Scanners::SQL::COMMANDS = T.let(T.unsafe(nil), Array)
2792
+
2793
+ # source://coderay//lib/coderay/scanners/sql.rb#38
2794
+ CodeRay::Scanners::SQL::DIRECTIVES = T.let(T.unsafe(nil), Array)
2795
+
2796
+ # source://coderay//lib/coderay/scanners/sql.rb#55
2797
+ CodeRay::Scanners::SQL::ESCAPE = T.let(T.unsafe(nil), Regexp)
2798
+
2799
+ # source://coderay//lib/coderay/scanners/sql.rb#46
2800
+ CodeRay::Scanners::SQL::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring)
2801
+
2802
+ # source://coderay//lib/coderay/scanners/sql.rb#9
2803
+ CodeRay::Scanners::SQL::KEYWORDS = T.let(T.unsafe(nil), Array)
2804
+
2805
+ # source://coderay//lib/coderay/scanners/sql.rb#18
2806
+ CodeRay::Scanners::SQL::OBJECTS = T.let(T.unsafe(nil), Array)
2807
+
2808
+ # source://coderay//lib/coderay/scanners/sql.rb#44
2809
+ CodeRay::Scanners::SQL::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array)
2810
+
2811
+ # source://coderay//lib/coderay/scanners/sql.rb#36
2812
+ CodeRay::Scanners::SQL::PREDEFINED_FUNCTIONS = T.let(T.unsafe(nil), Array)
2813
+
2814
+ # source://coderay//lib/coderay/scanners/sql.rb#28
2815
+ CodeRay::Scanners::SQL::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array)
2816
+
2817
+ # source://coderay//lib/coderay/scanners/sql.rb#60
2818
+ CodeRay::Scanners::SQL::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash)
2819
+
2820
+ # source://coderay//lib/coderay/scanners/sql.rb#58
2821
+ CodeRay::Scanners::SQL::STRING_PREFIXES = T.let(T.unsafe(nil), Regexp)
2822
+
2823
+ # source://coderay//lib/coderay/scanners/sql.rb#56
2824
+ CodeRay::Scanners::SQL::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp)
2825
+
2826
+ # A scanner for Sass.
2827
+ #
2828
+ # source://coderay//lib/coderay/scanners/sass.rb#5
2829
+ class CodeRay::Scanners::Sass < ::CodeRay::Scanners::CSS
2830
+ protected
2831
+
2832
+ # source://coderay//lib/coderay/scanners/sass.rb#16
2833
+ def scan_tokens(encoder, options); end
2834
+
2835
+ # source://coderay//lib/coderay/scanners/sass.rb#12
2836
+ def setup; end
2837
+ end
2838
+
2839
+ # = Scanner
2840
+ #
2841
+ # The base class for all Scanners.
2842
+ #
2843
+ # It is a subclass of Ruby's great +StringScanner+, which
2844
+ # makes it easy to access the scanning methods inside.
2845
+ #
2846
+ # It is also +Enumerable+, so you can use it like an Array of
2847
+ # Tokens:
2848
+ #
2849
+ # require 'coderay'
2850
+ #
2851
+ # c_scanner = CodeRay::Scanners[:c].new "if (*p == '{') nest++;"
2852
+ #
2853
+ # for text, kind in c_scanner
2854
+ # puts text if kind == :operator
2855
+ # end
2856
+ #
2857
+ # # prints: (*==)++;
2858
+ #
2859
+ # OK, this is a very simple example :)
2860
+ # You can also use +map+, +any?+, +find+ and even +sort_by+,
2861
+ # if you want.
2862
+ #
2863
+ # source://coderay//lib/coderay/scanners/scanner.rb#29
2864
+ class CodeRay::Scanners::Scanner < ::StringScanner
2865
+ include ::Enumerable
2866
+ extend ::CodeRay::Plugin
2867
+
2868
+ # Create a new Scanner.
2869
+ #
2870
+ # * +code+ is the input String and is handled by the superclass
2871
+ # StringScanner.
2872
+ # * +options+ is a Hash with Symbols as keys.
2873
+ # It is merged with the default options of the class (you can
2874
+ # overwrite default options here.)
2875
+ #
2876
+ # Else, a Tokens object is used.
2877
+ #
2878
+ # @return [Scanner] a new instance of Scanner
2879
+ #
2880
+ # source://coderay//lib/coderay/scanners/scanner.rb#125
2881
+ def initialize(code = T.unsafe(nil), options = T.unsafe(nil)); end
2882
+
2883
+ # The string in binary encoding.
2884
+ #
2885
+ # To be used with #pos, which is the index of the byte the scanner
2886
+ # will scan next.
2887
+ #
2888
+ # source://coderay//lib/coderay/scanners/scanner.rb#218
2889
+ def binary_string; end
2890
+
2891
+ # The current column position of the scanner, starting with 1.
2892
+ # See also: #line.
2893
+ #
2894
+ # source://coderay//lib/coderay/scanners/scanner.rb#209
2895
+ def column(pos = T.unsafe(nil)); end
2896
+
2897
+ # Traverse the tokens.
2898
+ #
2899
+ # source://coderay//lib/coderay/scanners/scanner.rb#192
2900
+ def each(&block); end
2901
+
2902
+ # the default file extension for this scanner
2903
+ #
2904
+ # source://coderay//lib/coderay/scanners/scanner.rb#160
2905
+ def file_extension; end
2906
+
2907
+ # the Plugin ID for this scanner
2908
+ #
2909
+ # source://coderay//lib/coderay/scanners/scanner.rb#155
2910
+ def lang; end
2911
+
2912
+ # The current line position of the scanner, starting with 1.
2913
+ # See also: #column.
2914
+ #
2915
+ # Beware, this is implemented inefficiently. It should be used
2916
+ # for debugging only.
2917
+ #
2918
+ # source://coderay//lib/coderay/scanners/scanner.rb#202
2919
+ def line(pos = T.unsafe(nil)); end
2920
+
2921
+ # Sets back the scanner. Subclasses should redefine the reset_instance
2922
+ # method instead of this one.
2923
+ #
2924
+ # source://coderay//lib/coderay/scanners/scanner.rb#142
2925
+ def reset; end
2926
+
2927
+ # Returns the value of attribute state.
2928
+ #
2929
+ # source://coderay//lib/coderay/scanners/scanner.rb#44
2930
+ def state; end
2931
+
2932
+ # Sets the attribute state
2933
+ #
2934
+ # @param value the value to set the attribute state to.
2935
+ #
2936
+ # source://coderay//lib/coderay/scanners/scanner.rb#44
2937
+ def state=(_arg0); end
2938
+
2939
+ # Set a new string to be scanned.
2940
+ #
2941
+ # source://coderay//lib/coderay/scanners/scanner.rb#148
2942
+ def string=(code); end
2943
+
2944
+ # Scan the code and returns all tokens in a Tokens object.
2945
+ #
2946
+ # source://coderay//lib/coderay/scanners/scanner.rb#165
2947
+ def tokenize(source = T.unsafe(nil), options = T.unsafe(nil)); end
2948
+
2949
+ # Cache the result of tokenize.
2950
+ #
2951
+ # source://coderay//lib/coderay/scanners/scanner.rb#187
2952
+ def tokens; end
2953
+
2954
+ protected
2955
+
2956
+ # Scanner error with additional status information
2957
+ #
2958
+ # @raise [ScanError]
2959
+ #
2960
+ # source://coderay//lib/coderay/scanners/scanner.rb#314
2961
+ def raise_inspect(message, tokens, state = T.unsafe(nil), ambit = T.unsafe(nil), backtrace = T.unsafe(nil)); end
2962
+
2963
+ # source://coderay//lib/coderay/scanners/scanner.rb#289
2964
+ def raise_inspect_arguments(message, tokens, state, ambit); end
2965
+
2966
+ # Resets the scanner.
2967
+ #
2968
+ # source://coderay//lib/coderay/scanners/scanner.rb#265
2969
+ def reset_instance; end
2970
+
2971
+ # Shorthand for scan_until(/\z/).
2972
+ # This method also avoids a JRuby 1.9 mode bug.
2973
+ #
2974
+ # source://coderay//lib/coderay/scanners/scanner.rb#328
2975
+ def scan_rest; end
2976
+
2977
+ # This is the central method, and commonly the only one a
2978
+ # subclass implements.
2979
+ #
2980
+ # Subclasses must implement this method; it must return +tokens+
2981
+ # and must only use Tokens#<< for storing scanned tokens!
2982
+ #
2983
+ # @raise [NotImplementedError]
2984
+ #
2985
+ # source://coderay//lib/coderay/scanners/scanner.rb#260
2986
+ def scan_tokens(tokens, options); end
2987
+
2988
+ # source://coderay//lib/coderay/scanners/scanner.rb#305
2989
+ def scanner_state_info(state); end
2990
+
2991
+ # source://coderay//lib/coderay/scanners/scanner.rb#239
2992
+ def set_string_from_source(source); end
2993
+
2994
+ # source://coderay//lib/coderay/scanners/scanner.rb#250
2995
+ def set_tokens_from_options(options); end
2996
+
2997
+ # Can be implemented by subclasses to do some initialization
2998
+ # that has to be done once per instance.
2999
+ #
3000
+ # Use reset for initialization that has to be done once per
3001
+ # scan.
3002
+ #
3003
+ # source://coderay//lib/coderay/scanners/scanner.rb#236
3004
+ def setup; end
3005
+
3006
+ # source://coderay//lib/coderay/scanners/scanner.rb#322
3007
+ def tokens_last(tokens, n); end
3008
+
3009
+ # source://coderay//lib/coderay/scanners/scanner.rb#318
3010
+ def tokens_size(tokens); end
3011
+
3012
+ class << self
3013
+ # The encoding used internally by this scanner.
3014
+ #
3015
+ # source://coderay//lib/coderay/scanners/scanner.rb#71
3016
+ def encoding(name = T.unsafe(nil)); end
3017
+
3018
+ # The typical filename suffix for this scanner's language.
3019
+ #
3020
+ # source://coderay//lib/coderay/scanners/scanner.rb#66
3021
+ def file_extension(extension = T.unsafe(nil)); end
3022
+
3023
+ # The lang of this Scanner class, which is equal to its Plugin ID.
3024
+ #
3025
+ # source://coderay//lib/coderay/scanners/scanner.rb#76
3026
+ def lang; end
3027
+
3028
+ # Normalizes the given code into a string with UNIX newlines, in the
3029
+ # scanner's internal encoding, with invalid and undefined charachters
3030
+ # replaced by placeholders. Always returns a new object.
3031
+ #
3032
+ # source://coderay//lib/coderay/scanners/scanner.rb#51
3033
+ def normalize(code); end
3034
+
3035
+ protected
3036
+
3037
+ # source://coderay//lib/coderay/scanners/scanner.rb#82
3038
+ def encode_with_encoding(code, target_encoding); end
3039
+
3040
+ # source://coderay//lib/coderay/scanners/scanner.rb#100
3041
+ def guess_encoding(s); end
3042
+
3043
+ # source://coderay//lib/coderay/scanners/scanner.rb#96
3044
+ def to_unix(code); end
3045
+ end
3046
+ end
3047
+
3048
+ # The default options for all scanner classes.
3049
+ #
3050
+ # Define @default_options for subclasses.
3051
+ #
3052
+ # source://coderay//lib/coderay/scanners/scanner.rb#40
3053
+ CodeRay::Scanners::Scanner::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
3054
+
3055
+ # source://coderay//lib/coderay/scanners/scanner.rb#42
3056
+ CodeRay::Scanners::Scanner::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array)
3057
+
3058
+ # source://coderay//lib/coderay/helpers/plugin.rb#41
3059
+ CodeRay::Scanners::Scanner::PLUGIN_HOST = CodeRay::Scanners
3060
+
3061
+ # source://coderay//lib/coderay/scanners/scanner.rb#299
3062
+ CodeRay::Scanners::Scanner::SCANNER_STATE_INFO = T.let(T.unsafe(nil), String)
3063
+
3064
+ # source://coderay//lib/coderay/scanners/scanner.rb#271
3065
+ CodeRay::Scanners::Scanner::SCAN_ERROR_MESSAGE = T.let(T.unsafe(nil), String)
3066
+
3067
+ # Raised if a Scanner fails while scanning
3068
+ #
3069
+ # source://coderay//lib/coderay/scanners/scanner.rb#35
3070
+ class CodeRay::Scanners::Scanner::ScanError < ::StandardError; end
3071
+
3072
+ # source://coderay//lib/coderay/scanners/taskpaper.rb#4
3073
+ class CodeRay::Scanners::Taskpaper < ::CodeRay::Scanners::Scanner
3074
+ protected
3075
+
3076
+ # source://coderay//lib/coderay/scanners/taskpaper.rb#11
3077
+ def scan_tokens(encoder, options); end
3078
+ end
3079
+
3080
+ # Scanner for plain text.
3081
+ #
3082
+ # Yields just one token of the kind :plain.
3083
+ #
3084
+ # Alias: +plaintext+, +plain+
3085
+ #
3086
+ # source://coderay//lib/coderay/scanners/text.rb#9
3087
+ class CodeRay::Scanners::Text < ::CodeRay::Scanners::Scanner
3088
+ protected
3089
+
3090
+ # source://coderay//lib/coderay/scanners/text.rb#18
3091
+ def scan_tokens(encoder, options); end
3092
+ end
3093
+
3094
+ # source://coderay//lib/coderay/scanners/text.rb#14
3095
+ CodeRay::Scanners::Text::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array)
3096
+
3097
+ # Scanner for XML.
3098
+ #
3099
+ # Currently this is the same scanner as Scanners::HTML.
3100
+ #
3101
+ # source://coderay//lib/coderay/scanners/xml.rb#9
3102
+ class CodeRay::Scanners::XML < ::CodeRay::Scanners::HTML; end
3103
+
3104
+ # Scanner for YAML.
3105
+ #
3106
+ # Based on the YAML scanner from Syntax by Jamis Buck.
3107
+ #
3108
+ # source://coderay//lib/coderay/scanners/yaml.rb#7
3109
+ class CodeRay::Scanners::YAML < ::CodeRay::Scanners::Scanner
3110
+ protected
3111
+
3112
+ # source://coderay//lib/coderay/scanners/yaml.rb#16
3113
+ def scan_tokens(encoder, options); end
3114
+ end
3115
+
3116
+ # source://coderay//lib/coderay/scanners/yaml.rb#12
3117
+ CodeRay::Scanners::YAML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Symbol)
3118
+
3119
+ # This module holds the Style class and its subclasses.
3120
+ #
3121
+ # See Plugin.
3122
+ #
3123
+ # source://coderay//lib/coderay/styles.rb#6
3124
+ module CodeRay::Styles
3125
+ extend ::CodeRay::PluginHost
3126
+ end
3127
+
3128
+ # A colorful theme using CSS 3 colors (with alpha channel).
3129
+ #
3130
+ # source://coderay//lib/coderay/styles/alpha.rb#5
3131
+ class CodeRay::Styles::Alpha < ::CodeRay::Styles::Style; end
3132
+
3133
+ # source://coderay//lib/coderay/styles/alpha.rb#14
3134
+ CodeRay::Styles::Alpha::CSS_MAIN_STYLES = T.let(T.unsafe(nil), String)
3135
+
3136
+ # source://coderay//lib/coderay/styles/alpha.rb#53
3137
+ CodeRay::Styles::Alpha::TOKEN_COLORS = T.let(T.unsafe(nil), String)
3138
+
3139
+ # Base class for styles.
3140
+ #
3141
+ # Styles are used by Encoders::HTML to colorize tokens.
3142
+ #
3143
+ # source://coderay//lib/coderay/styles/style.rb#8
3144
+ class CodeRay::Styles::Style
3145
+ extend ::CodeRay::Plugin
3146
+ end
3147
+
3148
+ # source://coderay//lib/coderay/styles/style.rb#12
3149
+ CodeRay::Styles::Style::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
3150
+
3151
+ # source://coderay//lib/coderay/helpers/plugin.rb#41
3152
+ CodeRay::Styles::Style::PLUGIN_HOST = CodeRay::Styles
3153
+
3154
+ # A Hash of all known token kinds and their associated CSS classes.
3155
+ #
3156
+ # source://coderay//lib/coderay/token_kinds.rb#4
3157
+ CodeRay::TokenKinds = T.let(T.unsafe(nil), Hash)
3158
+
3159
+ # The Tokens class represents a list of tokens returned from
3160
+ # a Scanner. It's actually just an Array with a few helper methods.
3161
+ #
3162
+ # A token itself is not a special object, just two elements in an Array:
3163
+ # * the _token_ _text_ (the original source of the token in a String) or
3164
+ # a _token_ _action_ (begin_group, end_group, begin_line, end_line)
3165
+ # * the _token_ _kind_ (a Symbol representing the type of the token)
3166
+ #
3167
+ # It looks like this:
3168
+ #
3169
+ # ..., '# It looks like this', :comment, ...
3170
+ # ..., '3.1415926', :float, ...
3171
+ # ..., '$^', :error, ...
3172
+ #
3173
+ # Some scanners also yield sub-tokens, represented by special
3174
+ # token actions, for example :begin_group and :end_group.
3175
+ #
3176
+ # The Ruby scanner, for example, splits "a string" into:
3177
+ #
3178
+ # [
3179
+ # :begin_group, :string,
3180
+ # '"', :delimiter,
3181
+ # 'a string', :content,
3182
+ # '"', :delimiter,
3183
+ # :end_group, :string
3184
+ # ]
3185
+ #
3186
+ # Tokens can be used to save the output of a Scanners in a simple
3187
+ # Ruby object that can be send to an Encoder later:
3188
+ #
3189
+ # tokens = CodeRay.scan('price = 2.59', :ruby).tokens
3190
+ # tokens.encode(:html)
3191
+ # tokens.html
3192
+ # CodeRay.encoder(:html).encode_tokens(tokens)
3193
+ #
3194
+ # Tokens gives you the power to handle pre-scanned code very easily:
3195
+ # You can serialize it to a JSON string and store it in a database, pass it
3196
+ # around to encode it more than once, send it to other algorithms...
3197
+ #
3198
+ # source://coderay//lib/coderay/tokens.rb#43
3199
+ class CodeRay::Tokens < ::Array
3200
+ # source://coderay//lib/coderay/tokens.rb#156
3201
+ def begin_group(kind); end
3202
+
3203
+ # source://coderay//lib/coderay/tokens.rb#158
3204
+ def begin_line(kind); end
3205
+
3206
+ # Return the actual number of tokens.
3207
+ #
3208
+ # source://coderay//lib/coderay/tokens.rb#151
3209
+ def count; end
3210
+
3211
+ # Encode the tokens using encoder.
3212
+ #
3213
+ # encoder can be
3214
+ # * a plugin name like :html oder 'statistic'
3215
+ # * an Encoder object
3216
+ #
3217
+ # options are passed to the encoder.
3218
+ #
3219
+ # source://coderay//lib/coderay/tokens.rb#56
3220
+ def encode(encoder, options = T.unsafe(nil)); end
3221
+
3222
+ # source://coderay//lib/coderay/tokens.rb#157
3223
+ def end_group(kind); end
3224
+
3225
+ # source://coderay//lib/coderay/tokens.rb#159
3226
+ def end_line(kind); end
3227
+
3228
+ # Redirects unknown methods to encoder calls.
3229
+ #
3230
+ # For example, if you call +tokens.html+, the HTML encoder
3231
+ # is used to highlight the tokens.
3232
+ #
3233
+ # source://coderay//lib/coderay/tokens.rb#70
3234
+ def method_missing(meth, options = T.unsafe(nil)); end
3235
+
3236
+ # The Scanner instance that created the tokens.
3237
+ #
3238
+ # source://coderay//lib/coderay/tokens.rb#47
3239
+ def scanner; end
3240
+
3241
+ # The Scanner instance that created the tokens.
3242
+ #
3243
+ # source://coderay//lib/coderay/tokens.rb#47
3244
+ def scanner=(_arg0); end
3245
+
3246
+ # Split the tokens into parts of the given +sizes+.
3247
+ #
3248
+ # The result will be an Array of Tokens objects. The parts have
3249
+ # the text size specified by the parameter. In addition, each
3250
+ # part closes all opened tokens. This is useful to insert tokens
3251
+ # betweem them.
3252
+ #
3253
+ # This method is used by @Scanner#tokenize@ when called with an Array
3254
+ # of source strings. The Diff encoder uses it for inline highlighting.
3255
+ #
3256
+ # source://coderay//lib/coderay/tokens.rb#85
3257
+ def split_into_parts(*sizes); end
3258
+
3259
+ def text_token(*_arg0); end
3260
+
3261
+ # Turn tokens into a string by concatenating them.
3262
+ #
3263
+ # source://coderay//lib/coderay/tokens.rb#62
3264
+ def to_s; end
3265
+
3266
+ def tokens(*_arg0); end
3267
+ end
3268
+
3269
+ # The result of a scan operation is a TokensProxy, but should act like Tokens.
3270
+ #
3271
+ # This proxy makes it possible to use the classic CodeRay.scan.encode API
3272
+ # while still providing the benefits of direct streaming.
3273
+ #
3274
+ # source://coderay//lib/coderay/tokens_proxy.rb#7
3275
+ class CodeRay::TokensProxy
3276
+ # Create a new TokensProxy with the arguments of CodeRay.scan.
3277
+ #
3278
+ # @return [TokensProxy] a new instance of TokensProxy
3279
+ #
3280
+ # source://coderay//lib/coderay/tokens_proxy.rb#12
3281
+ def initialize(input, lang, options = T.unsafe(nil), block = T.unsafe(nil)); end
3282
+
3283
+ # Returns the value of attribute block.
3284
+ #
3285
+ # source://coderay//lib/coderay/tokens_proxy.rb#9
3286
+ def block; end
3287
+
3288
+ # Sets the attribute block
3289
+ #
3290
+ # @param value the value to set the attribute block to.
3291
+ #
3292
+ # source://coderay//lib/coderay/tokens_proxy.rb#9
3293
+ def block=(_arg0); end
3294
+
3295
+ # Overwrite Struct#each.
3296
+ #
3297
+ # source://coderay//lib/coderay/tokens_proxy.rb#48
3298
+ def each(*args, &blk); end
3299
+
3300
+ # Call CodeRay.encode if +encoder+ is a Symbol;
3301
+ # otherwise, convert the receiver to tokens and call encoder.encode_tokens.
3302
+ #
3303
+ # source://coderay//lib/coderay/tokens_proxy.rb#21
3304
+ def encode(encoder, options = T.unsafe(nil)); end
3305
+
3306
+ # Returns the value of attribute input.
3307
+ #
3308
+ # source://coderay//lib/coderay/tokens_proxy.rb#9
3309
+ def input; end
3310
+
3311
+ # Sets the attribute input
3312
+ #
3313
+ # @param value the value to set the attribute input to.
3314
+ #
3315
+ # source://coderay//lib/coderay/tokens_proxy.rb#9
3316
+ def input=(_arg0); end
3317
+
3318
+ # Returns the value of attribute lang.
3319
+ #
3320
+ # source://coderay//lib/coderay/tokens_proxy.rb#9
3321
+ def lang; end
3322
+
3323
+ # Sets the attribute lang
3324
+ #
3325
+ # @param value the value to set the attribute lang to.
3326
+ #
3327
+ # source://coderay//lib/coderay/tokens_proxy.rb#9
3328
+ def lang=(_arg0); end
3329
+
3330
+ # Tries to call encode;
3331
+ # delegates to tokens otherwise.
3332
+ #
3333
+ # source://coderay//lib/coderay/tokens_proxy.rb#31
3334
+ def method_missing(method, *args, &blk); end
3335
+
3336
+ # Returns the value of attribute options.
3337
+ #
3338
+ # source://coderay//lib/coderay/tokens_proxy.rb#9
3339
+ def options; end
3340
+
3341
+ # Sets the attribute options
3342
+ #
3343
+ # @param value the value to set the attribute options to.
3344
+ #
3345
+ # source://coderay//lib/coderay/tokens_proxy.rb#9
3346
+ def options=(_arg0); end
3347
+
3348
+ # A (cached) scanner instance to use for the scan task.
3349
+ #
3350
+ # source://coderay//lib/coderay/tokens_proxy.rb#43
3351
+ def scanner; end
3352
+
3353
+ # The (cached) result of the tokenized input; a Tokens instance.
3354
+ #
3355
+ # source://coderay//lib/coderay/tokens_proxy.rb#38
3356
+ def tokens; end
3357
+ end
3358
+
3359
+ # source://coderay//lib/coderay/version.rb#2
3360
+ CodeRay::VERSION = T.let(T.unsafe(nil), String)
3361
+
3362
+ # = WordList
3363
+ #
3364
+ # <b>A Hash subclass designed for mapping word lists to token types.</b>
3365
+ #
3366
+ # A WordList is a Hash with some additional features.
3367
+ # It is intended to be used for keyword recognition.
3368
+ #
3369
+ # WordList is optimized to be used in Scanners,
3370
+ # typically to decide whether a given ident is a special token.
3371
+ #
3372
+ # For case insensitive words use WordList::CaseIgnoring.
3373
+ #
3374
+ # Example:
3375
+ #
3376
+ # # define word arrays
3377
+ # RESERVED_WORDS = %w[
3378
+ # asm break case continue default do else
3379
+ # ]
3380
+ #
3381
+ # PREDEFINED_TYPES = %w[
3382
+ # int long short char void
3383
+ # ]
3384
+ #
3385
+ # # make a WordList
3386
+ # IDENT_KIND = WordList.new(:ident).
3387
+ # add(RESERVED_WORDS, :reserved).
3388
+ # add(PREDEFINED_TYPES, :predefined_type)
3389
+ #
3390
+ # ...
3391
+ #
3392
+ # def scan_tokens tokens, options
3393
+ # ...
3394
+ #
3395
+ # elsif scan(/[A-Za-z_][A-Za-z_0-9]*/)
3396
+ # # use it
3397
+ # kind = IDENT_KIND[match]
3398
+ # ...
3399
+ #
3400
+ # source://coderay//lib/coderay/helpers/word_list.rb#40
3401
+ class CodeRay::WordList < ::Hash
3402
+ # Create a new WordList with +default+ as default value.
3403
+ #
3404
+ # @return [WordList] a new instance of WordList
3405
+ #
3406
+ # source://coderay//lib/coderay/helpers/word_list.rb#43
3407
+ def initialize(default = T.unsafe(nil)); end
3408
+
3409
+ # Add words to the list and associate them with +value+.
3410
+ #
3411
+ # Returns +self+, so you can concat add calls.
3412
+ #
3413
+ # source://coderay//lib/coderay/helpers/word_list.rb#50
3414
+ def add(words, value = T.unsafe(nil)); end
3415
+ end
3416
+
3417
+ # A CaseIgnoring WordList is like a WordList, only that
3418
+ # keys are compared case-insensitively (normalizing keys using +downcase+).
3419
+ #
3420
+ # source://coderay//lib/coderay/helpers/word_list.rb#60
3421
+ class CodeRay::WordList::CaseIgnoring < ::CodeRay::WordList
3422
+ # source://coderay//lib/coderay/helpers/word_list.rb#62
3423
+ def [](key); end
3424
+
3425
+ # source://coderay//lib/coderay/helpers/word_list.rb#66
3426
+ def []=(key, value); end
3427
+ end