shotgrid_api_ruby 0.2.0.4 → 0.2.0.6

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