js-routes 2.2.9 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -3
- data/Readme.md +16 -15
- data/lib/js_routes/configuration.rb +7 -5
- data/lib/js_routes/generators/base.rb +6 -1
- data/lib/js_routes/generators/middleware.rb +2 -3
- data/lib/js_routes/generators/webpacker.rb +2 -1
- data/lib/js_routes/instance.rb +21 -6
- data/lib/js_routes/middleware.rb +5 -4
- data/lib/js_routes/route.rb +7 -3
- data/lib/js_routes/types.rb +10 -0
- data/lib/js_routes/utils.rb +18 -0
- data/lib/js_routes/version.rb +1 -1
- data/lib/js_routes.rb +12 -4
- data/lib/routes.d.ts +7 -6
- data/lib/routes.js +19 -18
- data/lib/routes.ts +33 -27
- data/lib/tasks/js_routes.rake +4 -2
- metadata +12 -145
- data/.document +0 -5
- data/.eslintrc.js +0 -15
- data/.github/workflows/ci.yml +0 -36
- data/.gitignore +0 -65
- data/.nvmrc +0 -1
- data/.rspec +0 -1
- data/Appraisals +0 -17
- data/Gemfile +0 -9
- data/Rakefile +0 -37
- data/VERSION_2_UPGRADE.md +0 -66
- data/bin/tapioca +0 -27
- data/gemfiles/rails50_sprockets_3.gemfile +0 -8
- data/gemfiles/rails51_sprockets_3.gemfile +0 -8
- data/gemfiles/rails52_sprockets_3.gemfile +0 -8
- data/gemfiles/rails70_sprockets_4.gemfile +0 -8
- data/js-routes.gemspec +0 -42
- data/package.json +0 -38
- data/sorbet/config +0 -4
- data/sorbet/rbi/annotations/.gitattributes +0 -1
- data/sorbet/rbi/annotations/actionpack.rbi +0 -428
- data/sorbet/rbi/annotations/actionview.rbi +0 -75
- data/sorbet/rbi/annotations/activesupport.rbi +0 -421
- data/sorbet/rbi/annotations/railties.rbi +0 -61
- data/sorbet/rbi/gems/.gitattributes +0 -1
- data/sorbet/rbi/gems/actionpack@7.0.4.1.rbi +0 -303
- data/sorbet/rbi/gems/actionview@7.0.4.1.rbi +0 -8
- data/sorbet/rbi/gems/activesupport@7.0.4.1.rbi +0 -16424
- data/sorbet/rbi/gems/appraisal@2.4.1.rbi +0 -584
- data/sorbet/rbi/gems/builder@3.2.4.rbi +0 -8
- data/sorbet/rbi/gems/bump@0.10.0.rbi +0 -168
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -3606
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3426
- data/sorbet/rbi/gems/concurrent-ruby@1.2.0.rbi +0 -11570
- data/sorbet/rbi/gems/crass@1.0.6.rbi +0 -8
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +0 -1083
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +0 -145
- data/sorbet/rbi/gems/i18n@1.12.0.rbi +0 -2296
- data/sorbet/rbi/gems/libv8-node@16.10.0.0.rbi +0 -8
- data/sorbet/rbi/gems/loofah@2.19.1.rbi +0 -8
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -272
- data/sorbet/rbi/gems/mini_racer@0.6.3.rbi +0 -224
- data/sorbet/rbi/gems/minitest@5.17.0.rbi +0 -1457
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -158
- data/sorbet/rbi/gems/nokogiri@1.14.0.rbi +0 -8
- data/sorbet/rbi/gems/parallel@1.24.0.rbi +0 -280
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +0 -951
- data/sorbet/rbi/gems/prism@0.24.0.rbi +0 -29744
- data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +0 -1150
- data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10075
- data/sorbet/rbi/gems/racc@1.6.2.rbi +0 -150
- data/sorbet/rbi/gems/rack-test@2.0.2.rbi +0 -8
- data/sorbet/rbi/gems/rack@2.2.6.2.rbi +0 -5585
- data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +0 -8
- data/sorbet/rbi/gems/rails-html-sanitizer@1.5.0.rbi +0 -8
- data/sorbet/rbi/gems/railties@7.0.4.1.rbi +0 -1959
- data/sorbet/rbi/gems/rake@13.0.6.rbi +0 -3072
- data/sorbet/rbi/gems/rbi@0.1.9.rbi +0 -3006
- data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +0 -10868
- data/sorbet/rbi/gems/rspec-expectations@3.12.2.rbi +0 -8100
- data/sorbet/rbi/gems/rspec-mocks@3.12.3.rbi +0 -5299
- data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +0 -1611
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +0 -82
- data/sorbet/rbi/gems/spoom@1.2.4.rbi +0 -3777
- data/sorbet/rbi/gems/sprockets-rails@3.4.2.rbi +0 -14
- data/sorbet/rbi/gems/sprockets@4.2.0.rbi +0 -8
- data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +0 -23136
- data/sorbet/rbi/gems/tapioca@0.12.0.rbi +0 -3510
- data/sorbet/rbi/gems/thor@1.2.1.rbi +0 -3956
- data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +0 -5914
- data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +0 -428
- data/sorbet/rbi/gems/yard@0.9.34.rbi +0 -18332
- data/sorbet/rbi/gems/zeitwerk@2.6.8.rbi +0 -8
- data/sorbet/rbi/todo.rbi +0 -31
- data/sorbet/tapioca/config.yml +0 -13
- data/sorbet/tapioca/require.rb +0 -4
- data/spec/dummy/app/assets/config/manifest.js +0 -2
- data/spec/dummy/app/assets/javascripts/.gitkeep +0 -0
- data/spec/dummy/config/routes.rb +0 -55
- data/spec/js_routes/default_serializer_spec.rb +0 -31
- data/spec/js_routes/module_types/amd_spec.rb +0 -35
- data/spec/js_routes/module_types/cjs_spec.rb +0 -15
- data/spec/js_routes/module_types/dts/routes.spec.d.ts +0 -115
- data/spec/js_routes/module_types/dts/test.spec.ts +0 -56
- data/spec/js_routes/module_types/dts_spec.rb +0 -126
- data/spec/js_routes/module_types/esm_spec.rb +0 -45
- data/spec/js_routes/module_types/nil_spec.rb +0 -87
- data/spec/js_routes/module_types/umd_spec.rb +0 -85
- data/spec/js_routes/options_spec.rb +0 -508
- data/spec/js_routes/rails_routes_compatibility_spec.rb +0 -473
- data/spec/js_routes/route_specification_spec.rb +0 -37
- data/spec/js_routes/zzz_sprockets_spec.rb +0 -152
- data/spec/spec_helper.rb +0 -135
- data/spec/support/routes.rb +0 -81
- data/spec/tsconfig.json +0 -4
- data/tsconfig.json +0 -28
- data/yarn.lock +0 -2457
@@ -1,3426 +0,0 @@
|
|
1
|
-
# typed: true
|
2
|
-
|
3
|
-
# DO NOT EDIT MANUALLY
|
4
|
-
# This is an autogenerated file for types exported from the `coderay` gem.
|
5
|
-
# Please instead update this file by running `bin/tapioca gem coderay`.
|
6
|
-
|
7
|
-
# = 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">"Hello, world!"</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
|
131
|
-
module CodeRay
|
132
|
-
class << self
|
133
|
-
# Assuming the path is a subpath of lib/coderay/
|
134
|
-
#
|
135
|
-
# source://coderay//lib/coderay.rb#133
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
253
|
-
def scanner(lang, options = T.unsafe(nil), &block); end
|
254
|
-
end
|
255
|
-
end
|
256
|
-
|
257
|
-
# source://coderay//lib/coderay.rb#130
|
258
|
-
CodeRay::CODERAY_PATH = T.let(T.unsafe(nil), String)
|
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
|
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
|
297
|
-
def initialize(lang = T.unsafe(nil), format = T.unsafe(nil), options = T.unsafe(nil)); end
|
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
|
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
|
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
|
319
|
-
def encoder; end
|
320
|
-
|
321
|
-
# Returns the value of attribute format.
|
322
|
-
#
|
323
|
-
# source://coderay//lib/coderay/duo.rb#19
|
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
|
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
|
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
|
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
|
348
|
-
def lang=(_arg0); end
|
349
|
-
|
350
|
-
# Returns the value of attribute options.
|
351
|
-
#
|
352
|
-
# source://coderay//lib/coderay/duo.rb#19
|
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
|
360
|
-
def options=(_arg0); end
|
361
|
-
|
362
|
-
# The scanner of the duo. Only created once.
|
363
|
-
#
|
364
|
-
# source://coderay//lib/coderay/duo.rb#54
|
365
|
-
def scanner; end
|
366
|
-
|
367
|
-
class << self
|
368
|
-
# To allow calls like Duo[:ruby, :html].highlight.
|
369
|
-
def [](*_arg0); end
|
370
|
-
end
|
371
|
-
end
|
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
|
382
|
-
module CodeRay::Encoders
|
383
|
-
extend ::CodeRay::PluginHost
|
384
|
-
end
|
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
|
397
|
-
class CodeRay::Encoders::CommentFilter < ::CodeRay::Encoders::TokenKindFilter; end
|
398
|
-
|
399
|
-
# source://coderay//lib/coderay/encoders/comment_filter.rb#19
|
400
|
-
CodeRay::Encoders::CommentFilter::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
|
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
|
407
|
-
class CodeRay::Encoders::Count < ::CodeRay::Encoders::Encoder
|
408
|
-
# source://coderay//lib/coderay/encoders/count.rb#29
|
409
|
-
def begin_group(kind); end
|
410
|
-
|
411
|
-
# source://coderay//lib/coderay/encoders/count.rb#29
|
412
|
-
def begin_line(kind); end
|
413
|
-
|
414
|
-
# source://coderay//lib/coderay/encoders/count.rb#29
|
415
|
-
def end_group(kind); end
|
416
|
-
|
417
|
-
# source://coderay//lib/coderay/encoders/count.rb#29
|
418
|
-
def end_line(kind); end
|
419
|
-
|
420
|
-
# source://coderay//lib/coderay/encoders/count.rb#25
|
421
|
-
def text_token(text, kind); end
|
422
|
-
|
423
|
-
protected
|
424
|
-
|
425
|
-
# source://coderay//lib/coderay/encoders/count.rb#19
|
426
|
-
def finish(options); end
|
427
|
-
|
428
|
-
# source://coderay//lib/coderay/encoders/count.rb#13
|
429
|
-
def setup(options); end
|
430
|
-
end
|
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
|
444
|
-
class CodeRay::Encoders::Debug < ::CodeRay::Encoders::Encoder
|
445
|
-
# source://coderay//lib/coderay/encoders/debug.rb#30
|
446
|
-
def begin_group(kind); end
|
447
|
-
|
448
|
-
# source://coderay//lib/coderay/encoders/debug.rb#38
|
449
|
-
def begin_line(kind); end
|
450
|
-
|
451
|
-
# source://coderay//lib/coderay/encoders/debug.rb#34
|
452
|
-
def end_group(kind); end
|
453
|
-
|
454
|
-
# source://coderay//lib/coderay/encoders/debug.rb#42
|
455
|
-
def end_line(kind); end
|
456
|
-
|
457
|
-
# source://coderay//lib/coderay/encoders/debug.rb#20
|
458
|
-
def text_token(text, kind); end
|
459
|
-
end
|
460
|
-
|
461
|
-
# source://coderay//lib/coderay/encoders/debug.rb#18
|
462
|
-
CodeRay::Encoders::Debug::FILE_EXTENSION = T.let(T.unsafe(nil), String)
|
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
|
476
|
-
class CodeRay::Encoders::DebugLint < ::CodeRay::Encoders::Debug
|
477
|
-
# source://coderay//lib/coderay/encoders/debug_lint.rb#26
|
478
|
-
def begin_group(kind); end
|
479
|
-
|
480
|
-
# source://coderay//lib/coderay/encoders/debug_lint.rb#37
|
481
|
-
def begin_line(kind); end
|
482
|
-
|
483
|
-
# @raise [Lint::IncorrectTokenGroupNesting]
|
484
|
-
#
|
485
|
-
# source://coderay//lib/coderay/encoders/debug_lint.rb#31
|
486
|
-
def end_group(kind); end
|
487
|
-
|
488
|
-
# @raise [Lint::IncorrectTokenGroupNesting]
|
489
|
-
#
|
490
|
-
# source://coderay//lib/coderay/encoders/debug_lint.rb#42
|
491
|
-
def end_line(kind); end
|
492
|
-
|
493
|
-
# @raise [Lint::EmptyToken]
|
494
|
-
#
|
495
|
-
# source://coderay//lib/coderay/encoders/debug_lint.rb#20
|
496
|
-
def text_token(text, kind); end
|
497
|
-
|
498
|
-
protected
|
499
|
-
|
500
|
-
# source://coderay//lib/coderay/encoders/debug_lint.rb#55
|
501
|
-
def finish(options); end
|
502
|
-
|
503
|
-
# source://coderay//lib/coderay/encoders/debug_lint.rb#50
|
504
|
-
def setup(options); end
|
505
|
-
end
|
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
|
512
|
-
class CodeRay::Encoders::Div < ::CodeRay::Encoders::HTML; end
|
513
|
-
|
514
|
-
# source://coderay//lib/coderay/encoders/div.rb#15
|
515
|
-
CodeRay::Encoders::Div::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
|
516
|
-
|
517
|
-
# source://coderay//lib/coderay/encoders/div.rb#11
|
518
|
-
CodeRay::Encoders::Div::FILE_EXTENSION = T.let(T.unsafe(nil), String)
|
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
|
534
|
-
class CodeRay::Encoders::Encoder
|
535
|
-
extend ::CodeRay::Plugin
|
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
|
551
|
-
def initialize(options = T.unsafe(nil)); end
|
552
|
-
|
553
|
-
# source://coderay//lib/coderay/encoders/encoder.rb#87
|
554
|
-
def <<(token); end
|
555
|
-
|
556
|
-
# Starts a token group with the given +kind+.
|
557
|
-
#
|
558
|
-
# source://coderay//lib/coderay/encoders/encoder.rb#123
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
601
|
-
def options; end
|
602
|
-
|
603
|
-
# The options you gave the Encoder at creating.
|
604
|
-
#
|
605
|
-
# source://coderay//lib/coderay/encoders/encoder.rb#43
|
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
|
611
|
-
def scanner; end
|
612
|
-
|
613
|
-
# The options you gave the Encoder at creating.
|
614
|
-
#
|
615
|
-
# source://coderay//lib/coderay/encoders/encoder.rb#43
|
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
|
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
|
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
|
638
|
-
def tokens(tokens, options = T.unsafe(nil)); end
|
639
|
-
|
640
|
-
protected
|
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
|
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
|
654
|
-
def finish(options); end
|
655
|
-
|
656
|
-
# source://coderay//lib/coderay/encoders/encoder.rb#148
|
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
|
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
|
670
|
-
def setup(options); end
|
671
|
-
|
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
|
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
|
682
|
-
def file_extension; end
|
683
|
-
end
|
684
|
-
end
|
685
|
-
|
686
|
-
# Subclasses are to store their default options in this constant.
|
687
|
-
#
|
688
|
-
# source://coderay//lib/coderay/encoders/encoder.rb#40
|
689
|
-
CodeRay::Encoders::Encoder::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
|
690
|
-
|
691
|
-
# source://coderay//lib/coderay/helpers/plugin.rb#41
|
692
|
-
CodeRay::Encoders::Encoder::PLUGIN_HOST = CodeRay::Encoders
|
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
|
710
|
-
class CodeRay::Encoders::Filter < ::CodeRay::Encoders::Encoder
|
711
|
-
# source://coderay//lib/coderay/encoders/filter.rb#39
|
712
|
-
def begin_group(kind); end
|
713
|
-
|
714
|
-
# source://coderay//lib/coderay/encoders/filter.rb#43
|
715
|
-
def begin_line(kind); end
|
716
|
-
|
717
|
-
# source://coderay//lib/coderay/encoders/filter.rb#47
|
718
|
-
def end_group(kind); end
|
719
|
-
|
720
|
-
# source://coderay//lib/coderay/encoders/filter.rb#51
|
721
|
-
def end_line(kind); end
|
722
|
-
|
723
|
-
# source://coderay//lib/coderay/encoders/filter.rb#35
|
724
|
-
def text_token(text, kind); end
|
725
|
-
|
726
|
-
protected
|
727
|
-
|
728
|
-
# source://coderay//lib/coderay/encoders/filter.rb#29
|
729
|
-
def finish(options); end
|
730
|
-
|
731
|
-
# source://coderay//lib/coderay/encoders/filter.rb#23
|
732
|
-
def setup(options); end
|
733
|
-
end
|
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
|
828
|
-
class CodeRay::Encoders::HTML < ::CodeRay::Encoders::Encoder
|
829
|
-
# token groups, eg. strings
|
830
|
-
#
|
831
|
-
# source://coderay//lib/coderay/encoders/html.rb#235
|
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
|
837
|
-
def begin_line(kind); end
|
838
|
-
|
839
|
-
# Returns the value of attribute css.
|
840
|
-
#
|
841
|
-
# source://coderay//lib/coderay/encoders/html.rb#126
|
842
|
-
def css; end
|
843
|
-
|
844
|
-
# source://coderay//lib/coderay/encoders/html.rb#241
|
845
|
-
def end_group(kind); end
|
846
|
-
|
847
|
-
# source://coderay//lib/coderay/encoders/html.rb#261
|
848
|
-
def end_line(kind); end
|
849
|
-
|
850
|
-
# source://coderay//lib/coderay/encoders/html.rb#221
|
851
|
-
def text_token(text, kind); end
|
852
|
-
|
853
|
-
protected
|
854
|
-
|
855
|
-
# source://coderay//lib/coderay/encoders/html.rb#316
|
856
|
-
def break_lines(text, style); end
|
857
|
-
|
858
|
-
# source://coderay//lib/coderay/encoders/html.rb#310
|
859
|
-
def check_group_nesting(name, kind); end
|
860
|
-
|
861
|
-
# source://coderay//lib/coderay/encoders/html.rb#268
|
862
|
-
def check_options!(options); end
|
863
|
-
|
864
|
-
# source://coderay//lib/coderay/encoders/html.rb#324
|
865
|
-
def close_span; end
|
866
|
-
|
867
|
-
# source://coderay//lib/coderay/encoders/html.rb#280
|
868
|
-
def css_class_for_kinds(kinds); end
|
869
|
-
|
870
|
-
# source://coderay//lib/coderay/encoders/html.rb#195
|
871
|
-
def finish(options); end
|
872
|
-
|
873
|
-
# source://coderay//lib/coderay/encoders/html.rb#289
|
874
|
-
def make_span_for_kinds(method, hint); end
|
875
|
-
|
876
|
-
# source://coderay//lib/coderay/encoders/html.rb#172
|
877
|
-
def setup(options); end
|
878
|
-
|
879
|
-
# source://coderay//lib/coderay/encoders/html.rb#284
|
880
|
-
def style_for_kinds(kinds); end
|
881
|
-
|
882
|
-
class << self
|
883
|
-
# source://coderay//lib/coderay/encoders/html.rb#130
|
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
|
891
|
-
def token_path_to_hint(hint, kinds); end
|
892
|
-
end
|
893
|
-
end
|
894
|
-
|
895
|
-
# source://coderay//lib/coderay/encoders/html/css.rb#5
|
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
|
900
|
-
def initialize(style = T.unsafe(nil)); end
|
901
|
-
|
902
|
-
# source://coderay//lib/coderay/encoders/html/css.rb#23
|
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
|
908
|
-
def stylesheet; end
|
909
|
-
|
910
|
-
private
|
911
|
-
|
912
|
-
# source://coderay//lib/coderay/encoders/html/css.rb#49
|
913
|
-
def parse(stylesheet); end
|
914
|
-
|
915
|
-
class << self
|
916
|
-
# source://coderay//lib/coderay/encoders/html/css.rb#9
|
917
|
-
def load_stylesheet(style = T.unsafe(nil)); end
|
918
|
-
end
|
919
|
-
end
|
920
|
-
|
921
|
-
# source://coderay//lib/coderay/encoders/html/css.rb#36
|
922
|
-
CodeRay::Encoders::HTML::CSS::CSS_CLASS_PATTERN = T.let(T.unsafe(nil), Regexp)
|
923
|
-
|
924
|
-
# source://coderay//lib/coderay/encoders/html.rb#103
|
925
|
-
CodeRay::Encoders::HTML::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
|
926
|
-
|
927
|
-
# source://coderay//lib/coderay/encoders/html.rb#101
|
928
|
-
CodeRay::Encoders::HTML::FILE_EXTENSION = T.let(T.unsafe(nil), String)
|
929
|
-
|
930
|
-
# source://coderay//lib/coderay/encoders/html.rb#143
|
931
|
-
CodeRay::Encoders::HTML::HTML_ESCAPE = T.let(T.unsafe(nil), Hash)
|
932
|
-
|
933
|
-
# source://coderay//lib/coderay/encoders/html.rb#144
|
934
|
-
CodeRay::Encoders::HTML::HTML_ESCAPE_PATTERN = T.let(T.unsafe(nil), Regexp)
|
935
|
-
|
936
|
-
# source://coderay//lib/coderay/encoders/html/numbering.rb#6
|
937
|
-
module CodeRay::Encoders::HTML::Numbering
|
938
|
-
class << self
|
939
|
-
# source://coderay//lib/coderay/encoders/html/numbering.rb#8
|
940
|
-
def number!(output, mode = T.unsafe(nil), options = T.unsafe(nil)); end
|
941
|
-
end
|
942
|
-
end
|
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
|
954
|
-
module CodeRay::Encoders::HTML::Output
|
955
|
-
# source://coderay//lib/coderay/encoders/html/output.rb#57
|
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
|
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
|
968
|
-
def css=(_arg0); end
|
969
|
-
|
970
|
-
# source://coderay//lib/coderay/encoders/html/output.rb#86
|
971
|
-
def stylesheet(in_tag = T.unsafe(nil)); end
|
972
|
-
|
973
|
-
# source://coderay//lib/coderay/encoders/html/output.rb#62
|
974
|
-
def wrap!(element, *args); end
|
975
|
-
|
976
|
-
# source://coderay//lib/coderay/encoders/html/output.rb#52
|
977
|
-
def wrap_in!(template); end
|
978
|
-
|
979
|
-
# source://coderay//lib/coderay/encoders/html/output.rb#47
|
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
|
987
|
-
def wrapped_in=(_arg0); end
|
988
|
-
|
989
|
-
# @return [Boolean]
|
990
|
-
#
|
991
|
-
# source://coderay//lib/coderay/encoders/html/output.rb#43
|
992
|
-
def wrapped_in?(element); end
|
993
|
-
|
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
|
999
|
-
def extended(o); end
|
1000
|
-
|
1001
|
-
# source://coderay//lib/coderay/encoders/html/output.rb#26
|
1002
|
-
def make_stylesheet(css, in_tag = T.unsafe(nil)); end
|
1003
|
-
|
1004
|
-
# source://coderay//lib/coderay/encoders/html/output.rb#36
|
1005
|
-
def page_template_for_css(css); end
|
1006
|
-
end
|
1007
|
-
end
|
1008
|
-
|
1009
|
-
# source://coderay//lib/coderay/encoders/html/output.rb#117
|
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
|
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
|
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
|
1019
|
-
CodeRay::Encoders::HTML::Output::TABLE = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template)
|
1020
|
-
|
1021
|
-
# -- don't include the templates in docu
|
1022
|
-
#
|
1023
|
-
# source://coderay//lib/coderay/encoders/html/output.rb#92
|
1024
|
-
class CodeRay::Encoders::HTML::Output::Template < ::String
|
1025
|
-
# source://coderay//lib/coderay/encoders/html/output.rb#104
|
1026
|
-
def apply(target, replacement); end
|
1027
|
-
|
1028
|
-
class << self
|
1029
|
-
# source://coderay//lib/coderay/encoders/html/output.rb#94
|
1030
|
-
def wrap!(str, template, target); end
|
1031
|
-
end
|
1032
|
-
end
|
1033
|
-
|
1034
|
-
# source://coderay//lib/coderay/encoders/html.rb#146
|
1035
|
-
CodeRay::Encoders::HTML::TOKEN_KIND_TO_INFO = T.let(T.unsafe(nil), Hash)
|
1036
|
-
|
1037
|
-
# source://coderay//lib/coderay/encoders/html.rb#150
|
1038
|
-
CodeRay::Encoders::HTML::TRANSPARENT_TOKEN_KINDS = T.let(T.unsafe(nil), Set)
|
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
|
1056
|
-
class CodeRay::Encoders::JSON < ::CodeRay::Encoders::Encoder
|
1057
|
-
# source://coderay//lib/coderay/encoders/json.rb#64
|
1058
|
-
def begin_group(kind); end
|
1059
|
-
|
1060
|
-
# source://coderay//lib/coderay/encoders/json.rb#72
|
1061
|
-
def begin_line(kind); end
|
1062
|
-
|
1063
|
-
# source://coderay//lib/coderay/encoders/json.rb#68
|
1064
|
-
def end_group(kind); end
|
1065
|
-
|
1066
|
-
# source://coderay//lib/coderay/encoders/json.rb#76
|
1067
|
-
def end_line(kind); end
|
1068
|
-
|
1069
|
-
# source://coderay//lib/coderay/encoders/json.rb#60
|
1070
|
-
def text_token(text, kind); end
|
1071
|
-
|
1072
|
-
protected
|
1073
|
-
|
1074
|
-
# source://coderay//lib/coderay/encoders/json.rb#49
|
1075
|
-
def append(data); end
|
1076
|
-
|
1077
|
-
# source://coderay//lib/coderay/encoders/json.rb#45
|
1078
|
-
def finish(options); end
|
1079
|
-
|
1080
|
-
# source://coderay//lib/coderay/encoders/json.rb#38
|
1081
|
-
def setup(options); end
|
1082
|
-
end
|
1083
|
-
|
1084
|
-
# source://coderay//lib/coderay/encoders/json.rb#35
|
1085
|
-
CodeRay::Encoders::JSON::FILE_EXTENSION = T.let(T.unsafe(nil), String)
|
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
|
1102
|
-
class CodeRay::Encoders::LinesOfCode < ::CodeRay::Encoders::TokenKindFilter
|
1103
|
-
protected
|
1104
|
-
|
1105
|
-
# source://coderay//lib/coderay/encoders/lines_of_code.rb#38
|
1106
|
-
def finish(options); end
|
1107
|
-
|
1108
|
-
# source://coderay//lib/coderay/encoders/lines_of_code.rb#25
|
1109
|
-
def setup(options); end
|
1110
|
-
end
|
1111
|
-
|
1112
|
-
# source://coderay//lib/coderay/encoders/lines_of_code.rb#21
|
1113
|
-
CodeRay::Encoders::LinesOfCode::NON_EMPTY_LINE = T.let(T.unsafe(nil), Regexp)
|
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
|
1127
|
-
class CodeRay::Encoders::Lint < ::CodeRay::Encoders::Debug
|
1128
|
-
# source://coderay//lib/coderay/encoders/lint.rb#28
|
1129
|
-
def begin_group(kind); end
|
1130
|
-
|
1131
|
-
# source://coderay//lib/coderay/encoders/lint.rb#37
|
1132
|
-
def begin_line(kind); end
|
1133
|
-
|
1134
|
-
# @raise [IncorrectTokenGroupNesting]
|
1135
|
-
#
|
1136
|
-
# source://coderay//lib/coderay/encoders/lint.rb#32
|
1137
|
-
def end_group(kind); end
|
1138
|
-
|
1139
|
-
# @raise [IncorrectTokenGroupNesting]
|
1140
|
-
#
|
1141
|
-
# source://coderay//lib/coderay/encoders/lint.rb#41
|
1142
|
-
def end_line(kind); end
|
1143
|
-
|
1144
|
-
# @raise [EmptyToken]
|
1145
|
-
#
|
1146
|
-
# source://coderay//lib/coderay/encoders/lint.rb#23
|
1147
|
-
def text_token(text, kind); end
|
1148
|
-
|
1149
|
-
protected
|
1150
|
-
|
1151
|
-
# source://coderay//lib/coderay/encoders/lint.rb#52
|
1152
|
-
def finish(options); end
|
1153
|
-
|
1154
|
-
# source://coderay//lib/coderay/encoders/lint.rb#48
|
1155
|
-
def setup(options); end
|
1156
|
-
end
|
1157
|
-
|
1158
|
-
# source://coderay//lib/coderay/encoders/lint.rb#19
|
1159
|
-
class CodeRay::Encoders::Lint::EmptyToken < ::CodeRay::Encoders::Lint::InvalidTokenStream; end
|
1160
|
-
|
1161
|
-
# source://coderay//lib/coderay/encoders/lint.rb#21
|
1162
|
-
class CodeRay::Encoders::Lint::IncorrectTokenGroupNesting < ::CodeRay::Encoders::Lint::InvalidTokenStream; end
|
1163
|
-
|
1164
|
-
# source://coderay//lib/coderay/encoders/lint.rb#18
|
1165
|
-
class CodeRay::Encoders::Lint::InvalidTokenStream < ::StandardError; end
|
1166
|
-
|
1167
|
-
# source://coderay//lib/coderay/encoders/lint.rb#20
|
1168
|
-
class CodeRay::Encoders::Lint::UnknownTokenKind < ::CodeRay::Encoders::Lint::InvalidTokenStream; end
|
1169
|
-
|
1170
|
-
# = Null Encoder
|
1171
|
-
#
|
1172
|
-
# Does nothing and returns an empty string.
|
1173
|
-
#
|
1174
|
-
# source://coderay//lib/coderay/encoders/null.rb#7
|
1175
|
-
class CodeRay::Encoders::Null < ::CodeRay::Encoders::Encoder
|
1176
|
-
# source://coderay//lib/coderay/encoders/null.rb#11
|
1177
|
-
def text_token(text, kind); end
|
1178
|
-
end
|
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
|
1186
|
-
class CodeRay::Encoders::Page < ::CodeRay::Encoders::HTML; end
|
1187
|
-
|
1188
|
-
# source://coderay//lib/coderay/encoders/page.rb#16
|
1189
|
-
CodeRay::Encoders::Page::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
|
1190
|
-
|
1191
|
-
# source://coderay//lib/coderay/encoders/page.rb#12
|
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
|
1199
|
-
class CodeRay::Encoders::Span < ::CodeRay::Encoders::HTML; end
|
1200
|
-
|
1201
|
-
# source://coderay//lib/coderay/encoders/span.rb#15
|
1202
|
-
CodeRay::Encoders::Span::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
|
1203
|
-
|
1204
|
-
# source://coderay//lib/coderay/encoders/span.rb#11
|
1205
|
-
CodeRay::Encoders::Span::FILE_EXTENSION = T.let(T.unsafe(nil), String)
|
1206
|
-
|
1207
|
-
# Makes a statistic for the given tokens.
|
1208
|
-
#
|
1209
|
-
# Alias: +stats+
|
1210
|
-
#
|
1211
|
-
# source://coderay//lib/coderay/encoders/statistic.rb#7
|
1212
|
-
class CodeRay::Encoders::Statistic < ::CodeRay::Encoders::Encoder
|
1213
|
-
# source://coderay//lib/coderay/encoders/statistic.rb#70
|
1214
|
-
def begin_group(kind); end
|
1215
|
-
|
1216
|
-
# source://coderay//lib/coderay/encoders/statistic.rb#78
|
1217
|
-
def begin_line(kind); end
|
1218
|
-
|
1219
|
-
# source://coderay//lib/coderay/encoders/statistic.rb#86
|
1220
|
-
def block_token(action, kind); end
|
1221
|
-
|
1222
|
-
# source://coderay//lib/coderay/encoders/statistic.rb#74
|
1223
|
-
def end_group(kind); end
|
1224
|
-
|
1225
|
-
# source://coderay//lib/coderay/encoders/statistic.rb#82
|
1226
|
-
def end_line(kind); end
|
1227
|
-
|
1228
|
-
# source://coderay//lib/coderay/encoders/statistic.rb#11
|
1229
|
-
def real_token_count; end
|
1230
|
-
|
1231
|
-
# source://coderay//lib/coderay/encoders/statistic.rb#62
|
1232
|
-
def text_token(text, kind); end
|
1233
|
-
|
1234
|
-
# source://coderay//lib/coderay/encoders/statistic.rb#11
|
1235
|
-
def type_stats; end
|
1236
|
-
|
1237
|
-
protected
|
1238
|
-
|
1239
|
-
# source://coderay//lib/coderay/encoders/statistic.rb#42
|
1240
|
-
def finish(options); end
|
1241
|
-
|
1242
|
-
# source://coderay//lib/coderay/encoders/statistic.rb#17
|
1243
|
-
def setup(options); end
|
1244
|
-
end
|
1245
|
-
|
1246
|
-
# source://coderay//lib/coderay/encoders/statistic.rb#24
|
1247
|
-
CodeRay::Encoders::Statistic::STATS = T.let(T.unsafe(nil), String)
|
1248
|
-
|
1249
|
-
# source://coderay//lib/coderay/encoders/statistic.rb#38
|
1250
|
-
CodeRay::Encoders::Statistic::TOKEN_TYPES_ROW = T.let(T.unsafe(nil), String)
|
1251
|
-
|
1252
|
-
# source://coderay//lib/coderay/encoders/statistic.rb#13
|
1253
|
-
class CodeRay::Encoders::Statistic::TypeStats < ::Struct
|
1254
|
-
# Returns the value of attribute count
|
1255
|
-
#
|
1256
|
-
# @return [Object] the current value of count
|
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
|
1263
|
-
def count=(_); end
|
1264
|
-
|
1265
|
-
# Returns the value of attribute size
|
1266
|
-
#
|
1267
|
-
# @return [Object] the current value of size
|
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
|
1274
|
-
def size=(_); end
|
1275
|
-
|
1276
|
-
class << self
|
1277
|
-
def [](*_arg0); end
|
1278
|
-
def inspect; end
|
1279
|
-
def keyword_init?; end
|
1280
|
-
def members; end
|
1281
|
-
def new(*_arg0); end
|
1282
|
-
end
|
1283
|
-
end
|
1284
|
-
|
1285
|
-
# source://coderay//lib/coderay/encoders/terminal.rb#17
|
1286
|
-
class CodeRay::Encoders::Terminal < ::CodeRay::Encoders::Encoder
|
1287
|
-
# source://coderay//lib/coderay/encoders/terminal.rb#156
|
1288
|
-
def begin_group(kind); end
|
1289
|
-
|
1290
|
-
# source://coderay//lib/coderay/encoders/terminal.rb#156
|
1291
|
-
def begin_line(kind); end
|
1292
|
-
|
1293
|
-
# source://coderay//lib/coderay/encoders/terminal.rb#162
|
1294
|
-
def end_group(kind); end
|
1295
|
-
|
1296
|
-
# source://coderay//lib/coderay/encoders/terminal.rb#172
|
1297
|
-
def end_line(kind); end
|
1298
|
-
|
1299
|
-
# source://coderay//lib/coderay/encoders/terminal.rb#141
|
1300
|
-
def text_token(text, kind); end
|
1301
|
-
|
1302
|
-
protected
|
1303
|
-
|
1304
|
-
# source://coderay//lib/coderay/encoders/terminal.rb#133
|
1305
|
-
def setup(options); end
|
1306
|
-
|
1307
|
-
private
|
1308
|
-
|
1309
|
-
# source://coderay//lib/coderay/encoders/terminal.rb#179
|
1310
|
-
def open_token(kind); end
|
1311
|
-
end
|
1312
|
-
|
1313
|
-
# source://coderay//lib/coderay/encoders/terminal.rb#21
|
1314
|
-
CodeRay::Encoders::Terminal::TOKEN_COLORS = T.let(T.unsafe(nil), Hash)
|
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
|
1329
|
-
class CodeRay::Encoders::Text < ::CodeRay::Encoders::Encoder
|
1330
|
-
# source://coderay//lib/coderay/encoders/text.rb#25
|
1331
|
-
def text_token(text, kind); end
|
1332
|
-
|
1333
|
-
protected
|
1334
|
-
|
1335
|
-
# source://coderay//lib/coderay/encoders/text.rb#36
|
1336
|
-
def setup(options); end
|
1337
|
-
end
|
1338
|
-
|
1339
|
-
# source://coderay//lib/coderay/encoders/text.rb#21
|
1340
|
-
CodeRay::Encoders::Text::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
|
1341
|
-
|
1342
|
-
# source://coderay//lib/coderay/encoders/text.rb#19
|
1343
|
-
CodeRay::Encoders::Text::FILE_EXTENSION = T.let(T.unsafe(nil), String)
|
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
|
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
|
1374
|
-
def begin_group(kind); end
|
1375
|
-
|
1376
|
-
# See +begin_group+.
|
1377
|
-
#
|
1378
|
-
# source://coderay//lib/coderay/encoders/token_kind_filter.rb#77
|
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
|
1385
|
-
def end_group(kind); end
|
1386
|
-
|
1387
|
-
# See +end_group+.
|
1388
|
-
#
|
1389
|
-
# source://coderay//lib/coderay/encoders/token_kind_filter.rb#99
|
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
|
1395
|
-
def text_token(text, kind); end
|
1396
|
-
|
1397
|
-
protected
|
1398
|
-
|
1399
|
-
# @return [Boolean]
|
1400
|
-
#
|
1401
|
-
# source://coderay//lib/coderay/encoders/token_kind_filter.rb#49
|
1402
|
-
def include_group?(kind); end
|
1403
|
-
|
1404
|
-
# @return [Boolean]
|
1405
|
-
#
|
1406
|
-
# source://coderay//lib/coderay/encoders/token_kind_filter.rb#45
|
1407
|
-
def include_text_token?(text, kind); end
|
1408
|
-
|
1409
|
-
# source://coderay//lib/coderay/encoders/token_kind_filter.rb#35
|
1410
|
-
def setup(options); end
|
1411
|
-
end
|
1412
|
-
|
1413
|
-
# source://coderay//lib/coderay/encoders/token_kind_filter.rb#29
|
1414
|
-
CodeRay::Encoders::TokenKindFilter::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
|
1415
|
-
|
1416
|
-
# = XML Encoder
|
1417
|
-
#
|
1418
|
-
# Uses REXML. Very slow.
|
1419
|
-
#
|
1420
|
-
# source://coderay//lib/coderay/encoders/xml.rb#7
|
1421
|
-
class CodeRay::Encoders::XML < ::CodeRay::Encoders::Encoder
|
1422
|
-
# source://coderay//lib/coderay/encoders/xml.rb#58
|
1423
|
-
def begin_group(kind); end
|
1424
|
-
|
1425
|
-
# source://coderay//lib/coderay/encoders/xml.rb#62
|
1426
|
-
def end_group(kind); end
|
1427
|
-
|
1428
|
-
# source://coderay//lib/coderay/encoders/xml.rb#38
|
1429
|
-
def text_token(text, kind); end
|
1430
|
-
|
1431
|
-
protected
|
1432
|
-
|
1433
|
-
# source://coderay//lib/coderay/encoders/xml.rb#31
|
1434
|
-
def finish(options); end
|
1435
|
-
|
1436
|
-
# source://coderay//lib/coderay/encoders/xml.rb#22
|
1437
|
-
def setup(options); end
|
1438
|
-
end
|
1439
|
-
|
1440
|
-
# source://coderay//lib/coderay/encoders/xml.rb#15
|
1441
|
-
CodeRay::Encoders::XML::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
|
1442
|
-
|
1443
|
-
# source://coderay//lib/coderay/encoders/xml.rb#11
|
1444
|
-
CodeRay::Encoders::XML::FILE_EXTENSION = T.let(T.unsafe(nil), String)
|
1445
|
-
|
1446
|
-
# = YAML Encoder
|
1447
|
-
#
|
1448
|
-
# Slow.
|
1449
|
-
#
|
1450
|
-
# source://coderay//lib/coderay/encoders/yaml.rb#9
|
1451
|
-
class CodeRay::Encoders::YAML < ::CodeRay::Encoders::Encoder
|
1452
|
-
# source://coderay//lib/coderay/encoders/yaml.rb#31
|
1453
|
-
def begin_group(kind); end
|
1454
|
-
|
1455
|
-
# source://coderay//lib/coderay/encoders/yaml.rb#39
|
1456
|
-
def begin_line(kind); end
|
1457
|
-
|
1458
|
-
# source://coderay//lib/coderay/encoders/yaml.rb#35
|
1459
|
-
def end_group(kind); end
|
1460
|
-
|
1461
|
-
# source://coderay//lib/coderay/encoders/yaml.rb#43
|
1462
|
-
def end_line(kind); end
|
1463
|
-
|
1464
|
-
# source://coderay//lib/coderay/encoders/yaml.rb#27
|
1465
|
-
def text_token(text, kind); end
|
1466
|
-
|
1467
|
-
protected
|
1468
|
-
|
1469
|
-
# source://coderay//lib/coderay/encoders/yaml.rb#22
|
1470
|
-
def finish(options); end
|
1471
|
-
|
1472
|
-
# source://coderay//lib/coderay/encoders/yaml.rb#16
|
1473
|
-
def setup(options); end
|
1474
|
-
end
|
1475
|
-
|
1476
|
-
# source://coderay//lib/coderay/encoders/yaml.rb#13
|
1477
|
-
CodeRay::Encoders::YAML::FILE_EXTENSION = T.let(T.unsafe(nil), String)
|
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
|
1495
|
-
module CodeRay::FileType
|
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
|
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
|
1513
|
-
def fetch(filename, default = T.unsafe(nil), read_shebang = T.unsafe(nil)); end
|
1514
|
-
|
1515
|
-
protected
|
1516
|
-
|
1517
|
-
# source://coderay//lib/coderay/helpers/file_type.rb#66
|
1518
|
-
def type_from_shebang(filename); end
|
1519
|
-
end
|
1520
|
-
end
|
1521
|
-
|
1522
|
-
# source://coderay//lib/coderay/helpers/file_type.rb#79
|
1523
|
-
CodeRay::FileType::TypeFromExt = T.let(T.unsafe(nil), Hash)
|
1524
|
-
|
1525
|
-
# source://coderay//lib/coderay/helpers/file_type.rb#139
|
1526
|
-
CodeRay::FileType::TypeFromName = T.let(T.unsafe(nil), Hash)
|
1527
|
-
|
1528
|
-
# source://coderay//lib/coderay/helpers/file_type.rb#137
|
1529
|
-
CodeRay::FileType::TypeFromShebang = T.let(T.unsafe(nil), Regexp)
|
1530
|
-
|
1531
|
-
# source://coderay//lib/coderay/helpers/file_type.rb#19
|
1532
|
-
class CodeRay::FileType::UnknownFileType < ::Exception; end
|
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
|
1543
|
-
module CodeRay::Plugin
|
1544
|
-
# source://coderay//lib/coderay/helpers/plugin.rb#46
|
1545
|
-
def aliases; end
|
1546
|
-
|
1547
|
-
# The PluginHost for this Plugin class.
|
1548
|
-
#
|
1549
|
-
# source://coderay//lib/coderay/helpers/plugin.rb#39
|
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
|
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
|
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
|
1574
|
-
def title(title = T.unsafe(nil)); end
|
1575
|
-
end
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
1696
|
-
def register(plugin, id); end
|
1697
|
-
|
1698
|
-
protected
|
1699
|
-
|
1700
|
-
# Return a plugin hash that automatically loads plugins.
|
1701
|
-
#
|
1702
|
-
# source://coderay//lib/coderay/helpers/plugin_host.rb#172
|
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
|
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
|
1716
|
-
def validate_id(id); end
|
1717
|
-
|
1718
|
-
class << self
|
1719
|
-
# Adds the module/class to the PLUGIN_HOSTS list.
|
1720
|
-
#
|
1721
|
-
# source://coderay//lib/coderay/helpers/plugin_host.rb#72
|
1722
|
-
def extended(mod); end
|
1723
|
-
end
|
1724
|
-
end
|
1725
|
-
|
1726
|
-
# source://coderay//lib/coderay/helpers/plugin_host.rb#33
|
1727
|
-
class CodeRay::PluginHost::HostNotFound < ::LoadError; end
|
1728
|
-
|
1729
|
-
# source://coderay//lib/coderay/helpers/plugin_host.rb#35
|
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
|
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
|
1742
|
-
class CodeRay::PluginHost::PluginNotFound < ::LoadError; end
|
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
|
1757
|
-
module CodeRay::Scanners
|
1758
|
-
extend ::CodeRay::PluginHost
|
1759
|
-
end
|
1760
|
-
|
1761
|
-
# Scanner for C.
|
1762
|
-
#
|
1763
|
-
# source://coderay//lib/coderay/scanners/c.rb#5
|
1764
|
-
class CodeRay::Scanners::C < ::CodeRay::Scanners::Scanner
|
1765
|
-
protected
|
1766
|
-
|
1767
|
-
# source://coderay//lib/coderay/scanners/c.rb#44
|
1768
|
-
def scan_tokens(encoder, options); end
|
1769
|
-
end
|
1770
|
-
|
1771
|
-
# source://coderay//lib/coderay/scanners/c.rb#27
|
1772
|
-
CodeRay::Scanners::C::DIRECTIVES = T.let(T.unsafe(nil), Array)
|
1773
|
-
|
1774
|
-
# source://coderay//lib/coderay/scanners/c.rb#39
|
1775
|
-
CodeRay::Scanners::C::ESCAPE = T.let(T.unsafe(nil), Regexp)
|
1776
|
-
|
1777
|
-
# source://coderay//lib/coderay/scanners/c.rb#33
|
1778
|
-
CodeRay::Scanners::C::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList)
|
1779
|
-
|
1780
|
-
# source://coderay//lib/coderay/scanners/c.rb#10
|
1781
|
-
CodeRay::Scanners::C::KEYWORDS = T.let(T.unsafe(nil), Array)
|
1782
|
-
|
1783
|
-
# source://coderay//lib/coderay/scanners/c.rb#23
|
1784
|
-
CodeRay::Scanners::C::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array)
|
1785
|
-
|
1786
|
-
# source://coderay//lib/coderay/scanners/c.rb#17
|
1787
|
-
CodeRay::Scanners::C::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array)
|
1788
|
-
|
1789
|
-
# source://coderay//lib/coderay/scanners/c.rb#40
|
1790
|
-
CodeRay::Scanners::C::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp)
|
1791
|
-
|
1792
|
-
# Scanner for C++.
|
1793
|
-
#
|
1794
|
-
# Aliases: +cplusplus+, c++
|
1795
|
-
CodeRay::Scanners::CPlusPlus = CodeRay::Scanners::Text
|
1796
|
-
|
1797
|
-
# source://coderay//lib/coderay/scanners/css.rb#4
|
1798
|
-
class CodeRay::Scanners::CSS < ::CodeRay::Scanners::Scanner
|
1799
|
-
protected
|
1800
|
-
|
1801
|
-
# source://coderay//lib/coderay/scanners/css.rb#55
|
1802
|
-
def scan_tokens(encoder, options); end
|
1803
|
-
|
1804
|
-
# source://coderay//lib/coderay/scanners/css.rb#50
|
1805
|
-
def setup; end
|
1806
|
-
end
|
1807
|
-
|
1808
|
-
# source://coderay//lib/coderay/scanners/css.rb#8
|
1809
|
-
CodeRay::Scanners::CSS::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array)
|
1810
|
-
|
1811
|
-
# source://coderay//lib/coderay/scanners/css.rb#16
|
1812
|
-
module CodeRay::Scanners::CSS::RE; end
|
1813
|
-
|
1814
|
-
# source://coderay//lib/coderay/scanners/css.rb#31
|
1815
|
-
CodeRay::Scanners::CSS::RE::AtKeyword = T.let(T.unsafe(nil), Regexp)
|
1816
|
-
|
1817
|
-
# source://coderay//lib/coderay/scanners/css.rb#45
|
1818
|
-
CodeRay::Scanners::CSS::RE::AttributeSelector = T.let(T.unsafe(nil), Regexp)
|
1819
|
-
|
1820
|
-
# source://coderay//lib/coderay/scanners/css.rb#43
|
1821
|
-
CodeRay::Scanners::CSS::RE::Class = T.let(T.unsafe(nil), Regexp)
|
1822
|
-
|
1823
|
-
# source://coderay//lib/coderay/scanners/css.rb#38
|
1824
|
-
CodeRay::Scanners::CSS::RE::Dimension = T.let(T.unsafe(nil), Regexp)
|
1825
|
-
|
1826
|
-
# source://coderay//lib/coderay/scanners/css.rb#19
|
1827
|
-
CodeRay::Scanners::CSS::RE::Escape = T.let(T.unsafe(nil), Regexp)
|
1828
|
-
|
1829
|
-
# source://coderay//lib/coderay/scanners/css.rb#40
|
1830
|
-
CodeRay::Scanners::CSS::RE::Function = T.let(T.unsafe(nil), Regexp)
|
1831
|
-
|
1832
|
-
# source://coderay//lib/coderay/scanners/css.rb#17
|
1833
|
-
CodeRay::Scanners::CSS::RE::Hex = T.let(T.unsafe(nil), Regexp)
|
1834
|
-
|
1835
|
-
# source://coderay//lib/coderay/scanners/css.rb#26
|
1836
|
-
CodeRay::Scanners::CSS::RE::HexColor = T.let(T.unsafe(nil), Regexp)
|
1837
|
-
|
1838
|
-
# source://coderay//lib/coderay/scanners/css.rb#42
|
1839
|
-
CodeRay::Scanners::CSS::RE::Id = T.let(T.unsafe(nil), Regexp)
|
1840
|
-
|
1841
|
-
# source://coderay//lib/coderay/scanners/css.rb#30
|
1842
|
-
CodeRay::Scanners::CSS::RE::Ident = T.let(T.unsafe(nil), Regexp)
|
1843
|
-
|
1844
|
-
# source://coderay//lib/coderay/scanners/css.rb#20
|
1845
|
-
CodeRay::Scanners::CSS::RE::NMChar = T.let(T.unsafe(nil), Regexp)
|
1846
|
-
|
1847
|
-
# source://coderay//lib/coderay/scanners/css.rb#21
|
1848
|
-
CodeRay::Scanners::CSS::RE::NMStart = T.let(T.unsafe(nil), Regexp)
|
1849
|
-
|
1850
|
-
# source://coderay//lib/coderay/scanners/css.rb#29
|
1851
|
-
CodeRay::Scanners::CSS::RE::Name = T.let(T.unsafe(nil), Regexp)
|
1852
|
-
|
1853
|
-
# source://coderay//lib/coderay/scanners/css.rb#28
|
1854
|
-
CodeRay::Scanners::CSS::RE::Num = T.let(T.unsafe(nil), Regexp)
|
1855
|
-
|
1856
|
-
# source://coderay//lib/coderay/scanners/css.rb#32
|
1857
|
-
CodeRay::Scanners::CSS::RE::Percentage = T.let(T.unsafe(nil), Regexp)
|
1858
|
-
|
1859
|
-
# source://coderay//lib/coderay/scanners/css.rb#44
|
1860
|
-
CodeRay::Scanners::CSS::RE::PseudoClass = T.let(T.unsafe(nil), Regexp)
|
1861
|
-
|
1862
|
-
# source://coderay//lib/coderay/scanners/css.rb#24
|
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
|
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
|
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
|
1878
|
-
CodeRay::Scanners::CSS::RE::Unicode = T.let(T.unsafe(nil), Regexp)
|
1879
|
-
|
1880
|
-
# source://coderay//lib/coderay/scanners/css.rb#36
|
1881
|
-
CodeRay::Scanners::CSS::RE::Unit = T.let(T.unsafe(nil), Regexp)
|
1882
|
-
|
1883
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#6
|
1884
|
-
class CodeRay::Scanners::Clojure < ::CodeRay::Scanners::Scanner
|
1885
|
-
protected
|
1886
|
-
|
1887
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#145
|
1888
|
-
def scan_tokens(encoder, options); end
|
1889
|
-
end
|
1890
|
-
|
1891
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#95
|
1892
|
-
CodeRay::Scanners::Clojure::BASIC_IDENTIFIER = T.let(T.unsafe(nil), Regexp)
|
1893
|
-
|
1894
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#133
|
1895
|
-
CodeRay::Scanners::Clojure::COMPLEX10 = T.let(T.unsafe(nil), Regexp)
|
1896
|
-
|
1897
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#134
|
1898
|
-
CodeRay::Scanners::Clojure::COMPLEX16 = T.let(T.unsafe(nil), Regexp)
|
1899
|
-
|
1900
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#136
|
1901
|
-
CodeRay::Scanners::Clojure::COMPLEX2 = T.let(T.unsafe(nil), Regexp)
|
1902
|
-
|
1903
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#135
|
1904
|
-
CodeRay::Scanners::Clojure::COMPLEX8 = T.let(T.unsafe(nil), Regexp)
|
1905
|
-
|
1906
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#16
|
1907
|
-
CodeRay::Scanners::Clojure::CORE_FORMS = T.let(T.unsafe(nil), Array)
|
1908
|
-
|
1909
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#120
|
1910
|
-
CodeRay::Scanners::Clojure::DECIMAL = T.let(T.unsafe(nil), Regexp)
|
1911
|
-
|
1912
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#98
|
1913
|
-
CodeRay::Scanners::Clojure::DIGIT = T.let(T.unsafe(nil), Regexp)
|
1914
|
-
|
1915
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#99
|
1916
|
-
CodeRay::Scanners::Clojure::DIGIT10 = T.let(T.unsafe(nil), Regexp)
|
1917
|
-
|
1918
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#100
|
1919
|
-
CodeRay::Scanners::Clojure::DIGIT16 = T.let(T.unsafe(nil), Regexp)
|
1920
|
-
|
1921
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#102
|
1922
|
-
CodeRay::Scanners::Clojure::DIGIT2 = T.let(T.unsafe(nil), Regexp)
|
1923
|
-
|
1924
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#101
|
1925
|
-
CodeRay::Scanners::Clojure::DIGIT8 = T.let(T.unsafe(nil), Regexp)
|
1926
|
-
|
1927
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#107
|
1928
|
-
CodeRay::Scanners::Clojure::EXACTNESS = T.let(T.unsafe(nil), Regexp)
|
1929
|
-
|
1930
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#110
|
1931
|
-
CodeRay::Scanners::Clojure::EXP = T.let(T.unsafe(nil), Regexp)
|
1932
|
-
|
1933
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#109
|
1934
|
-
CodeRay::Scanners::Clojure::EXP_MARK = T.let(T.unsafe(nil), Regexp)
|
1935
|
-
|
1936
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#96
|
1937
|
-
CodeRay::Scanners::Clojure::IDENTIFIER = T.let(T.unsafe(nil), Regexp)
|
1938
|
-
|
1939
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#85
|
1940
|
-
CodeRay::Scanners::Clojure::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList)
|
1941
|
-
|
1942
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#129
|
1943
|
-
CodeRay::Scanners::Clojure::IMAG10 = T.let(T.unsafe(nil), Regexp)
|
1944
|
-
|
1945
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#130
|
1946
|
-
CodeRay::Scanners::Clojure::IMAG16 = T.let(T.unsafe(nil), Regexp)
|
1947
|
-
|
1948
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#132
|
1949
|
-
CodeRay::Scanners::Clojure::IMAG2 = T.let(T.unsafe(nil), Regexp)
|
1950
|
-
|
1951
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#131
|
1952
|
-
CodeRay::Scanners::Clojure::IMAG8 = T.let(T.unsafe(nil), Regexp)
|
1953
|
-
|
1954
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#90
|
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
|
1958
|
-
CodeRay::Scanners::Clojure::NUM = T.let(T.unsafe(nil), Regexp)
|
1959
|
-
|
1960
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#137
|
1961
|
-
CodeRay::Scanners::Clojure::NUM10 = T.let(T.unsafe(nil), Regexp)
|
1962
|
-
|
1963
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#138
|
1964
|
-
CodeRay::Scanners::Clojure::NUM16 = T.let(T.unsafe(nil), Regexp)
|
1965
|
-
|
1966
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#140
|
1967
|
-
CodeRay::Scanners::Clojure::NUM2 = T.let(T.unsafe(nil), Regexp)
|
1968
|
-
|
1969
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#139
|
1970
|
-
CodeRay::Scanners::Clojure::NUM8 = T.let(T.unsafe(nil), Regexp)
|
1971
|
-
|
1972
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#78
|
1973
|
-
CodeRay::Scanners::Clojure::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array)
|
1974
|
-
|
1975
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#112
|
1976
|
-
CodeRay::Scanners::Clojure::PREFIX10 = T.let(T.unsafe(nil), Regexp)
|
1977
|
-
|
1978
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#113
|
1979
|
-
CodeRay::Scanners::Clojure::PREFIX16 = T.let(T.unsafe(nil), Regexp)
|
1980
|
-
|
1981
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#115
|
1982
|
-
CodeRay::Scanners::Clojure::PREFIX2 = T.let(T.unsafe(nil), Regexp)
|
1983
|
-
|
1984
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#114
|
1985
|
-
CodeRay::Scanners::Clojure::PREFIX8 = T.let(T.unsafe(nil), Regexp)
|
1986
|
-
|
1987
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#106
|
1988
|
-
CodeRay::Scanners::Clojure::RADIX10 = T.let(T.unsafe(nil), Regexp)
|
1989
|
-
|
1990
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#103
|
1991
|
-
CodeRay::Scanners::Clojure::RADIX16 = T.let(T.unsafe(nil), Regexp)
|
1992
|
-
|
1993
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#105
|
1994
|
-
CodeRay::Scanners::Clojure::RADIX2 = T.let(T.unsafe(nil), Regexp)
|
1995
|
-
|
1996
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#104
|
1997
|
-
CodeRay::Scanners::Clojure::RADIX8 = T.let(T.unsafe(nil), Regexp)
|
1998
|
-
|
1999
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#125
|
2000
|
-
CodeRay::Scanners::Clojure::REAL10 = T.let(T.unsafe(nil), Regexp)
|
2001
|
-
|
2002
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#126
|
2003
|
-
CodeRay::Scanners::Clojure::REAL16 = T.let(T.unsafe(nil), Regexp)
|
2004
|
-
|
2005
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#128
|
2006
|
-
CodeRay::Scanners::Clojure::REAL2 = T.let(T.unsafe(nil), Regexp)
|
2007
|
-
|
2008
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#127
|
2009
|
-
CodeRay::Scanners::Clojure::REAL8 = T.let(T.unsafe(nil), Regexp)
|
2010
|
-
|
2011
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#108
|
2012
|
-
CodeRay::Scanners::Clojure::SIGN = T.let(T.unsafe(nil), Regexp)
|
2013
|
-
|
2014
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#11
|
2015
|
-
CodeRay::Scanners::Clojure::SPECIAL_FORMS = T.let(T.unsafe(nil), Array)
|
2016
|
-
|
2017
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#111
|
2018
|
-
CodeRay::Scanners::Clojure::SUFFIX = T.let(T.unsafe(nil), Regexp)
|
2019
|
-
|
2020
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#97
|
2021
|
-
CodeRay::Scanners::Clojure::SYMBOL = T.let(T.unsafe(nil), Regexp)
|
2022
|
-
|
2023
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#116
|
2024
|
-
CodeRay::Scanners::Clojure::UINT10 = T.let(T.unsafe(nil), Regexp)
|
2025
|
-
|
2026
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#117
|
2027
|
-
CodeRay::Scanners::Clojure::UINT16 = T.let(T.unsafe(nil), Regexp)
|
2028
|
-
|
2029
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#119
|
2030
|
-
CodeRay::Scanners::Clojure::UINT2 = T.let(T.unsafe(nil), Regexp)
|
2031
|
-
|
2032
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#118
|
2033
|
-
CodeRay::Scanners::Clojure::UINT8 = T.let(T.unsafe(nil), Regexp)
|
2034
|
-
|
2035
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#121
|
2036
|
-
CodeRay::Scanners::Clojure::UREAL10 = T.let(T.unsafe(nil), Regexp)
|
2037
|
-
|
2038
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#122
|
2039
|
-
CodeRay::Scanners::Clojure::UREAL16 = T.let(T.unsafe(nil), Regexp)
|
2040
|
-
|
2041
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#124
|
2042
|
-
CodeRay::Scanners::Clojure::UREAL2 = T.let(T.unsafe(nil), Regexp)
|
2043
|
-
|
2044
|
-
# source://coderay//lib/coderay/scanners/clojure.rb#123
|
2045
|
-
CodeRay::Scanners::Clojure::UREAL8 = T.let(T.unsafe(nil), Regexp)
|
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
|
2052
|
-
class CodeRay::Scanners::Debug < ::CodeRay::Scanners::Scanner
|
2053
|
-
protected
|
2054
|
-
|
2055
|
-
# source://coderay//lib/coderay/scanners/debug.rb#21
|
2056
|
-
def scan_tokens(encoder, options); end
|
2057
|
-
|
2058
|
-
# source://coderay//lib/coderay/scanners/debug.rb#16
|
2059
|
-
def setup; end
|
2060
|
-
end
|
2061
|
-
|
2062
|
-
# Scanner for the Delphi language (Object Pascal).
|
2063
|
-
#
|
2064
|
-
# Alias: +pascal+
|
2065
|
-
#
|
2066
|
-
# source://coderay//lib/coderay/scanners/delphi.rb#7
|
2067
|
-
class CodeRay::Scanners::Delphi < ::CodeRay::Scanners::Scanner
|
2068
|
-
protected
|
2069
|
-
|
2070
|
-
# source://coderay//lib/coderay/scanners/delphi.rb#45
|
2071
|
-
def scan_tokens(encoder, options); end
|
2072
|
-
end
|
2073
|
-
|
2074
|
-
# source://coderay//lib/coderay/scanners/delphi.rb#25
|
2075
|
-
CodeRay::Scanners::Delphi::DIRECTIVES = T.let(T.unsafe(nil), Array)
|
2076
|
-
|
2077
|
-
# source://coderay//lib/coderay/scanners/delphi.rb#36
|
2078
|
-
CodeRay::Scanners::Delphi::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring)
|
2079
|
-
|
2080
|
-
# source://coderay//lib/coderay/scanners/delphi.rb#12
|
2081
|
-
CodeRay::Scanners::Delphi::KEYWORDS = T.let(T.unsafe(nil), Array)
|
2082
|
-
|
2083
|
-
# source://coderay//lib/coderay/scanners/delphi.rb#40
|
2084
|
-
CodeRay::Scanners::Delphi::NAME_FOLLOWS = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring)
|
2085
|
-
|
2086
|
-
# Scanner for output of the diff command.
|
2087
|
-
#
|
2088
|
-
# Alias: +patch+
|
2089
|
-
#
|
2090
|
-
# source://coderay//lib/coderay/scanners/diff.rb#7
|
2091
|
-
class CodeRay::Scanners::Diff < ::CodeRay::Scanners::Scanner
|
2092
|
-
protected
|
2093
|
-
|
2094
|
-
# source://coderay//lib/coderay/scanners/diff.rb#19
|
2095
|
-
def scan_tokens(encoder, options); end
|
2096
|
-
|
2097
|
-
private
|
2098
|
-
|
2099
|
-
# source://coderay//lib/coderay/scanners/diff.rb#204
|
2100
|
-
def diff(a, b); end
|
2101
|
-
end
|
2102
|
-
|
2103
|
-
# source://coderay//lib/coderay/scanners/diff.rb#12
|
2104
|
-
CodeRay::Scanners::Diff::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
|
2105
|
-
|
2106
|
-
# Scanner for HTML ERB templates.
|
2107
|
-
#
|
2108
|
-
# source://coderay//lib/coderay/scanners/erb.rb#8
|
2109
|
-
class CodeRay::Scanners::ERB < ::CodeRay::Scanners::Scanner
|
2110
|
-
protected
|
2111
|
-
|
2112
|
-
# source://coderay//lib/coderay/scanners/erb.rb#38
|
2113
|
-
def reset_instance; end
|
2114
|
-
|
2115
|
-
# source://coderay//lib/coderay/scanners/erb.rb#43
|
2116
|
-
def scan_tokens(encoder, options); end
|
2117
|
-
|
2118
|
-
# source://coderay//lib/coderay/scanners/erb.rb#33
|
2119
|
-
def setup; end
|
2120
|
-
end
|
2121
|
-
|
2122
|
-
# source://coderay//lib/coderay/scanners/erb.rb#15
|
2123
|
-
CodeRay::Scanners::ERB::ERB_RUBY_BLOCK = T.let(T.unsafe(nil), Regexp)
|
2124
|
-
|
2125
|
-
# source://coderay//lib/coderay/scanners/erb.rb#13
|
2126
|
-
CodeRay::Scanners::ERB::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array)
|
2127
|
-
|
2128
|
-
# source://coderay//lib/coderay/scanners/erb.rb#27
|
2129
|
-
CodeRay::Scanners::ERB::START_OF_ERB = T.let(T.unsafe(nil), Regexp)
|
2130
|
-
|
2131
|
-
# source://coderay//lib/coderay/scanners/go.rb#4
|
2132
|
-
class CodeRay::Scanners::Go < ::CodeRay::Scanners::Scanner
|
2133
|
-
protected
|
2134
|
-
|
2135
|
-
# source://coderay//lib/coderay/scanners/go.rb#50
|
2136
|
-
def scan_tokens(encoder, options); end
|
2137
|
-
end
|
2138
|
-
|
2139
|
-
# source://coderay//lib/coderay/scanners/go.rb#45
|
2140
|
-
CodeRay::Scanners::Go::ESCAPE = T.let(T.unsafe(nil), Regexp)
|
2141
|
-
|
2142
|
-
# source://coderay//lib/coderay/scanners/go.rb#39
|
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
|
2148
|
-
CodeRay::Scanners::Go::KEYWORDS = T.let(T.unsafe(nil), Array)
|
2149
|
-
|
2150
|
-
# source://coderay//lib/coderay/scanners/go.rb#29
|
2151
|
-
CodeRay::Scanners::Go::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array)
|
2152
|
-
|
2153
|
-
# source://coderay//lib/coderay/scanners/go.rb#34
|
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
|
2159
|
-
CodeRay::Scanners::Go::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array)
|
2160
|
-
|
2161
|
-
# source://coderay//lib/coderay/scanners/go.rb#46
|
2162
|
-
CodeRay::Scanners::Go::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp)
|
2163
|
-
|
2164
|
-
# Scanner for Groovy.
|
2165
|
-
#
|
2166
|
-
# source://coderay//lib/coderay/scanners/groovy.rb#7
|
2167
|
-
class CodeRay::Scanners::Groovy < ::CodeRay::Scanners::Java
|
2168
|
-
protected
|
2169
|
-
|
2170
|
-
# source://coderay//lib/coderay/scanners/groovy.rb#43
|
2171
|
-
def scan_tokens(encoder, options); end
|
2172
|
-
|
2173
|
-
# source://coderay//lib/coderay/scanners/groovy.rb#39
|
2174
|
-
def setup; end
|
2175
|
-
end
|
2176
|
-
|
2177
|
-
# source://coderay//lib/coderay/scanners/groovy.rb#24
|
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
|
2183
|
-
CodeRay::Scanners::Groovy::GROOVY_KEYWORDS = T.let(T.unsafe(nil), Array)
|
2184
|
-
|
2185
|
-
# source://coderay//lib/coderay/scanners/groovy.rb#18
|
2186
|
-
CodeRay::Scanners::Groovy::GROOVY_MAGIC_VARIABLES = T.let(T.unsafe(nil), Array)
|
2187
|
-
|
2188
|
-
# source://coderay//lib/coderay/scanners/groovy.rb#20
|
2189
|
-
CodeRay::Scanners::Groovy::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList)
|
2190
|
-
|
2191
|
-
# source://coderay//lib/coderay/scanners/groovy.rb#15
|
2192
|
-
CodeRay::Scanners::Groovy::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList)
|
2193
|
-
|
2194
|
-
# source://coderay//lib/coderay/scanners/groovy.rb#26
|
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
|
2200
|
-
CodeRay::Scanners::Groovy::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash)
|
2201
|
-
|
2202
|
-
# source://coderay//lib/coderay/scanners/groovy.rb#25
|
2203
|
-
CodeRay::Scanners::Groovy::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp)
|
2204
|
-
|
2205
|
-
# source://coderay//lib/coderay/scanners/haml.rb#8
|
2206
|
-
class CodeRay::Scanners::HAML < ::CodeRay::Scanners::Scanner
|
2207
|
-
protected
|
2208
|
-
|
2209
|
-
# source://coderay//lib/coderay/scanners/haml.rb#24
|
2210
|
-
def scan_tokens(encoder, options); end
|
2211
|
-
|
2212
|
-
# source://coderay//lib/coderay/scanners/haml.rb#17
|
2213
|
-
def setup; end
|
2214
|
-
end
|
2215
|
-
|
2216
|
-
# source://coderay//lib/coderay/scanners/haml.rb#13
|
2217
|
-
CodeRay::Scanners::HAML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array)
|
2218
|
-
|
2219
|
-
# HTML Scanner
|
2220
|
-
#
|
2221
|
-
# Alias: +xhtml+
|
2222
|
-
#
|
2223
|
-
# See also: Scanners::XML
|
2224
|
-
#
|
2225
|
-
# source://coderay//lib/coderay/scanners/html.rb#9
|
2226
|
-
class CodeRay::Scanners::HTML < ::CodeRay::Scanners::Scanner
|
2227
|
-
# source://coderay//lib/coderay/scanners/html.rb#62
|
2228
|
-
def reset; end
|
2229
|
-
|
2230
|
-
protected
|
2231
|
-
|
2232
|
-
# source://coderay//lib/coderay/scanners/html.rb#83
|
2233
|
-
def scan_css(encoder, code, state = T.unsafe(nil)); end
|
2234
|
-
|
2235
|
-
# source://coderay//lib/coderay/scanners/html.rb#76
|
2236
|
-
def scan_java_script(encoder, code); end
|
2237
|
-
|
2238
|
-
# source://coderay//lib/coderay/scanners/html.rb#90
|
2239
|
-
def scan_tokens(encoder, options); end
|
2240
|
-
|
2241
|
-
# source://coderay//lib/coderay/scanners/html.rb#70
|
2242
|
-
def setup; end
|
2243
|
-
end
|
2244
|
-
|
2245
|
-
# source://coderay//lib/coderay/scanners/html.rb#39
|
2246
|
-
CodeRay::Scanners::HTML::ATTR_NAME = T.let(T.unsafe(nil), Regexp)
|
2247
|
-
|
2248
|
-
# source://coderay//lib/coderay/scanners/html.rb#42
|
2249
|
-
CodeRay::Scanners::HTML::ENTITY = T.let(T.unsafe(nil), Regexp)
|
2250
|
-
|
2251
|
-
# source://coderay//lib/coderay/scanners/html.rb#20
|
2252
|
-
CodeRay::Scanners::HTML::EVENT_ATTRIBUTES = T.let(T.unsafe(nil), Array)
|
2253
|
-
|
2254
|
-
# source://coderay//lib/coderay/scanners/html.rb#41
|
2255
|
-
CodeRay::Scanners::HTML::HEX = T.let(T.unsafe(nil), Regexp)
|
2256
|
-
|
2257
|
-
# source://coderay//lib/coderay/scanners/html.rb#35
|
2258
|
-
CodeRay::Scanners::HTML::IN_ATTRIBUTE = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring)
|
2259
|
-
|
2260
|
-
# source://coderay//lib/coderay/scanners/html.rb#13
|
2261
|
-
CodeRay::Scanners::HTML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array)
|
2262
|
-
|
2263
|
-
# source://coderay//lib/coderay/scanners/html.rb#57
|
2264
|
-
CodeRay::Scanners::HTML::PLAIN_STRING_CONTENT = T.let(T.unsafe(nil), Hash)
|
2265
|
-
|
2266
|
-
# source://coderay//lib/coderay/scanners/html.rb#40
|
2267
|
-
CodeRay::Scanners::HTML::TAG_END = T.let(T.unsafe(nil), Regexp)
|
2268
|
-
|
2269
|
-
# Scanner for JSON (JavaScript Object Notation).
|
2270
|
-
#
|
2271
|
-
# source://coderay//lib/coderay/scanners/json.rb#5
|
2272
|
-
class CodeRay::Scanners::JSON < ::CodeRay::Scanners::Scanner
|
2273
|
-
protected
|
2274
|
-
|
2275
|
-
# See http://json.org/ for a definition of the JSON lexic/grammar.
|
2276
|
-
#
|
2277
|
-
# source://coderay//lib/coderay/scanners/json.rb#26
|
2278
|
-
def scan_tokens(encoder, options); end
|
2279
|
-
|
2280
|
-
# source://coderay//lib/coderay/scanners/json.rb#21
|
2281
|
-
def setup; end
|
2282
|
-
end
|
2283
|
-
|
2284
|
-
# source://coderay//lib/coderay/scanners/json.rb#15
|
2285
|
-
CodeRay::Scanners::JSON::ESCAPE = T.let(T.unsafe(nil), Regexp)
|
2286
|
-
|
2287
|
-
# source://coderay//lib/coderay/scanners/json.rb#17
|
2288
|
-
CodeRay::Scanners::JSON::KEY = T.let(T.unsafe(nil), Regexp)
|
2289
|
-
|
2290
|
-
# source://coderay//lib/coderay/scanners/json.rb#10
|
2291
|
-
CodeRay::Scanners::JSON::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array)
|
2292
|
-
|
2293
|
-
# source://coderay//lib/coderay/scanners/json.rb#16
|
2294
|
-
CodeRay::Scanners::JSON::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp)
|
2295
|
-
|
2296
|
-
# Scanner for Java.
|
2297
|
-
#
|
2298
|
-
# source://coderay//lib/coderay/scanners/java.rb#5
|
2299
|
-
class CodeRay::Scanners::Java < ::CodeRay::Scanners::Scanner
|
2300
|
-
protected
|
2301
|
-
|
2302
|
-
# source://coderay//lib/coderay/scanners/java.rb#51
|
2303
|
-
def scan_tokens(encoder, options); end
|
2304
|
-
end
|
2305
|
-
|
2306
|
-
# source://coderay//lib/coderay/scanners/java/builtin_types.rb#4
|
2307
|
-
module CodeRay::Scanners::Java::BuiltinTypes; end
|
2308
|
-
|
2309
|
-
# source://coderay//lib/coderay/scanners/java/builtin_types.rb#7
|
2310
|
-
CodeRay::Scanners::Java::BuiltinTypes::List = T.let(T.unsafe(nil), Array)
|
2311
|
-
|
2312
|
-
# source://coderay//lib/coderay/scanners/java.rb#19
|
2313
|
-
CodeRay::Scanners::Java::CONSTANTS = T.let(T.unsafe(nil), Array)
|
2314
|
-
|
2315
|
-
# source://coderay//lib/coderay/scanners/java.rb#25
|
2316
|
-
CodeRay::Scanners::Java::DIRECTIVES = T.let(T.unsafe(nil), Array)
|
2317
|
-
|
2318
|
-
# source://coderay//lib/coderay/scanners/java.rb#40
|
2319
|
-
CodeRay::Scanners::Java::ESCAPE = T.let(T.unsafe(nil), Regexp)
|
2320
|
-
|
2321
|
-
# source://coderay//lib/coderay/scanners/java.rb#47
|
2322
|
-
CodeRay::Scanners::Java::IDENT = T.let(T.unsafe(nil), Regexp)
|
2323
|
-
|
2324
|
-
# source://coderay//lib/coderay/scanners/java.rb#30
|
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
|
2330
|
-
CodeRay::Scanners::Java::KEYWORDS = T.let(T.unsafe(nil), Array)
|
2331
|
-
|
2332
|
-
# source://coderay//lib/coderay/scanners/java.rb#20
|
2333
|
-
CodeRay::Scanners::Java::MAGIC_VARIABLES = T.let(T.unsafe(nil), Array)
|
2334
|
-
|
2335
|
-
# source://coderay//lib/coderay/scanners/java.rb#18
|
2336
|
-
CodeRay::Scanners::Java::RESERVED = T.let(T.unsafe(nil), Array)
|
2337
|
-
|
2338
|
-
# source://coderay//lib/coderay/scanners/java.rb#42
|
2339
|
-
CodeRay::Scanners::Java::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash)
|
2340
|
-
|
2341
|
-
# source://coderay//lib/coderay/scanners/java.rb#21
|
2342
|
-
CodeRay::Scanners::Java::TYPES = T.let(T.unsafe(nil), Array)
|
2343
|
-
|
2344
|
-
# source://coderay//lib/coderay/scanners/java.rb#41
|
2345
|
-
CodeRay::Scanners::Java::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp)
|
2346
|
-
|
2347
|
-
# Scanner for JavaScript.
|
2348
|
-
#
|
2349
|
-
# Aliases: +ecmascript+, +ecma_script+, +javascript+
|
2350
|
-
#
|
2351
|
-
# source://coderay//lib/coderay/scanners/java_script.rb#7
|
2352
|
-
class CodeRay::Scanners::JavaScript < ::CodeRay::Scanners::Scanner
|
2353
|
-
protected
|
2354
|
-
|
2355
|
-
# source://coderay//lib/coderay/scanners/java_script.rb#224
|
2356
|
-
def reset_instance; end
|
2357
|
-
|
2358
|
-
# source://coderay//lib/coderay/scanners/java_script.rb#61
|
2359
|
-
def scan_tokens(encoder, options); end
|
2360
|
-
|
2361
|
-
# source://coderay//lib/coderay/scanners/java_script.rb#57
|
2362
|
-
def setup; end
|
2363
|
-
|
2364
|
-
# source://coderay//lib/coderay/scanners/java_script.rb#229
|
2365
|
-
def xml_scanner; end
|
2366
|
-
end
|
2367
|
-
|
2368
|
-
# source://coderay//lib/coderay/scanners/java_script.rb#42
|
2369
|
-
CodeRay::Scanners::JavaScript::ESCAPE = T.let(T.unsafe(nil), Regexp)
|
2370
|
-
|
2371
|
-
# source://coderay//lib/coderay/scanners/java_script.rb#36
|
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
|
2377
|
-
CodeRay::Scanners::JavaScript::KEYWORDS = T.let(T.unsafe(nil), Array)
|
2378
|
-
|
2379
|
-
# source://coderay//lib/coderay/scanners/java_script.rb#24
|
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
|
2383
|
-
CodeRay::Scanners::JavaScript::KEY_CHECK_PATTERN = T.let(T.unsafe(nil), Hash)
|
2384
|
-
|
2385
|
-
# source://coderay//lib/coderay/scanners/java_script.rb#22
|
2386
|
-
CodeRay::Scanners::JavaScript::MAGIC_VARIABLES = T.let(T.unsafe(nil), Array)
|
2387
|
-
|
2388
|
-
# source://coderay//lib/coderay/scanners/java_script.rb#18
|
2389
|
-
CodeRay::Scanners::JavaScript::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array)
|
2390
|
-
|
2391
|
-
# source://coderay//lib/coderay/scanners/java_script.rb#44
|
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
|
2397
|
-
CodeRay::Scanners::JavaScript::RESERVED_WORDS = T.let(T.unsafe(nil), Array)
|
2398
|
-
|
2399
|
-
# source://coderay//lib/coderay/scanners/java_script.rb#45
|
2400
|
-
CodeRay::Scanners::JavaScript::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash)
|
2401
|
-
|
2402
|
-
# source://coderay//lib/coderay/scanners/java_script.rb#43
|
2403
|
-
CodeRay::Scanners::JavaScript::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp)
|
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
|
2412
|
-
class CodeRay::Scanners::Lua < ::CodeRay::Scanners::Scanner
|
2413
|
-
protected
|
2414
|
-
|
2415
|
-
# CodeRay entry hook. Starts parsing.
|
2416
|
-
#
|
2417
|
-
# source://coderay//lib/coderay/scanners/lua.rb#60
|
2418
|
-
def scan_tokens(encoder, options); end
|
2419
|
-
|
2420
|
-
# Scanner initialization.
|
2421
|
-
#
|
2422
|
-
# source://coderay//lib/coderay/scanners/lua.rb#54
|
2423
|
-
def setup; end
|
2424
|
-
end
|
2425
|
-
|
2426
|
-
# Automatic token kind selection for normal words.
|
2427
|
-
#
|
2428
|
-
# source://coderay//lib/coderay/scanners/lua.rb#46
|
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
|
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
|
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
|
2454
|
-
CodeRay::Scanners::Lua::PREDEFINED_EXPRESSIONS = T.let(T.unsafe(nil), Array)
|
2455
|
-
|
2456
|
-
# Scanner for PHP.
|
2457
|
-
#
|
2458
|
-
# Original by Stefan Walk.
|
2459
|
-
#
|
2460
|
-
# source://coderay//lib/coderay/scanners/php.rb#10
|
2461
|
-
class CodeRay::Scanners::PHP < ::CodeRay::Scanners::Scanner
|
2462
|
-
protected
|
2463
|
-
|
2464
|
-
# source://coderay//lib/coderay/scanners/php.rb#23
|
2465
|
-
def reset_instance; end
|
2466
|
-
|
2467
|
-
# source://coderay//lib/coderay/scanners/php.rb#234
|
2468
|
-
def scan_tokens(encoder, options); end
|
2469
|
-
|
2470
|
-
# source://coderay//lib/coderay/scanners/php.rb#19
|
2471
|
-
def setup; end
|
2472
|
-
end
|
2473
|
-
|
2474
|
-
# source://coderay//lib/coderay/scanners/php.rb#15
|
2475
|
-
CodeRay::Scanners::PHP::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array)
|
2476
|
-
|
2477
|
-
# source://coderay//lib/coderay/scanners/php.rb#197
|
2478
|
-
module CodeRay::Scanners::PHP::RE; end
|
2479
|
-
|
2480
|
-
# source://coderay//lib/coderay/scanners/php.rb#211
|
2481
|
-
CodeRay::Scanners::PHP::RE::HTML_INDICATOR = T.let(T.unsafe(nil), Regexp)
|
2482
|
-
|
2483
|
-
# source://coderay//lib/coderay/scanners/php.rb#213
|
2484
|
-
CodeRay::Scanners::PHP::RE::IDENTIFIER = T.let(T.unsafe(nil), Regexp)
|
2485
|
-
|
2486
|
-
# source://coderay//lib/coderay/scanners/php.rb#216
|
2487
|
-
CodeRay::Scanners::PHP::RE::OPERATOR = T.let(T.unsafe(nil), Regexp)
|
2488
|
-
|
2489
|
-
# source://coderay//lib/coderay/scanners/php.rb#206
|
2490
|
-
CodeRay::Scanners::PHP::RE::PHP_END = T.let(T.unsafe(nil), Regexp)
|
2491
|
-
|
2492
|
-
# source://coderay//lib/coderay/scanners/php.rb#199
|
2493
|
-
CodeRay::Scanners::PHP::RE::PHP_START = T.let(T.unsafe(nil), Regexp)
|
2494
|
-
|
2495
|
-
# source://coderay//lib/coderay/scanners/php.rb#214
|
2496
|
-
CodeRay::Scanners::PHP::RE::VARIABLE = T.let(T.unsafe(nil), Regexp)
|
2497
|
-
|
2498
|
-
# source://coderay//lib/coderay/scanners/php.rb#28
|
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
|
2505
|
-
CodeRay::Scanners::PHP::Words::BUILTIN_FUNCTIONS = T.let(T.unsafe(nil), Array)
|
2506
|
-
|
2507
|
-
# source://coderay//lib/coderay/scanners/php.rb#46
|
2508
|
-
CodeRay::Scanners::PHP::Words::CLASSES = T.let(T.unsafe(nil), Array)
|
2509
|
-
|
2510
|
-
# source://coderay//lib/coderay/scanners/php.rb#145
|
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
|
2516
|
-
CodeRay::Scanners::PHP::Words::EXCEPTIONS = T.let(T.unsafe(nil), Array)
|
2517
|
-
|
2518
|
-
# source://coderay//lib/coderay/scanners/php.rb#184
|
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
|
2524
|
-
CodeRay::Scanners::PHP::Words::KEYWORDS = T.let(T.unsafe(nil), Array)
|
2525
|
-
|
2526
|
-
# source://coderay//lib/coderay/scanners/php.rb#41
|
2527
|
-
CodeRay::Scanners::PHP::Words::LANGUAGE_CONSTRUCTS = T.let(T.unsafe(nil), Array)
|
2528
|
-
|
2529
|
-
# source://coderay//lib/coderay/scanners/php.rb#178
|
2530
|
-
CodeRay::Scanners::PHP::Words::PREDEFINED = T.let(T.unsafe(nil), Array)
|
2531
|
-
|
2532
|
-
# source://coderay//lib/coderay/scanners/php.rb#39
|
2533
|
-
CodeRay::Scanners::PHP::Words::TYPES = T.let(T.unsafe(nil), Array)
|
2534
|
-
|
2535
|
-
# source://coderay//lib/coderay/scanners/php.rb#193
|
2536
|
-
CodeRay::Scanners::PHP::Words::VARIABLE_KIND = T.let(T.unsafe(nil), CodeRay::WordList)
|
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
|
2544
|
-
class CodeRay::Scanners::Python < ::CodeRay::Scanners::Scanner
|
2545
|
-
protected
|
2546
|
-
|
2547
|
-
# source://coderay//lib/coderay/scanners/python.rb#103
|
2548
|
-
def scan_tokens(encoder, options); end
|
2549
|
-
end
|
2550
|
-
|
2551
|
-
# source://coderay//lib/coderay/scanners/python.rb#86
|
2552
|
-
CodeRay::Scanners::Python::DEF_NEW_STATE = T.let(T.unsafe(nil), CodeRay::WordList)
|
2553
|
-
|
2554
|
-
# source://coderay//lib/coderay/scanners/python.rb#91
|
2555
|
-
CodeRay::Scanners::Python::DESCRIPTOR = T.let(T.unsafe(nil), Regexp)
|
2556
|
-
|
2557
|
-
# source://coderay//lib/coderay/scanners/python.rb#97
|
2558
|
-
CodeRay::Scanners::Python::DOCSTRING_COMING = T.let(T.unsafe(nil), Regexp)
|
2559
|
-
|
2560
|
-
# source://coderay//lib/coderay/scanners/python.rb#65
|
2561
|
-
CodeRay::Scanners::Python::ESCAPE = T.let(T.unsafe(nil), Regexp)
|
2562
|
-
|
2563
|
-
# source://coderay//lib/coderay/scanners/python.rb#57
|
2564
|
-
CodeRay::Scanners::Python::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList)
|
2565
|
-
|
2566
|
-
# source://coderay//lib/coderay/scanners/python.rb#13
|
2567
|
-
CodeRay::Scanners::Python::KEYWORDS = T.let(T.unsafe(nil), Array)
|
2568
|
-
|
2569
|
-
# source://coderay//lib/coderay/scanners/python.rb#64
|
2570
|
-
CodeRay::Scanners::Python::NAME = T.let(T.unsafe(nil), Regexp)
|
2571
|
-
|
2572
|
-
# source://coderay//lib/coderay/scanners/python.rb#21
|
2573
|
-
CodeRay::Scanners::Python::OLD_KEYWORDS = T.let(T.unsafe(nil), Array)
|
2574
|
-
|
2575
|
-
# source://coderay//lib/coderay/scanners/python.rb#68
|
2576
|
-
CodeRay::Scanners::Python::OPERATOR = T.let(T.unsafe(nil), Regexp)
|
2577
|
-
|
2578
|
-
# source://coderay//lib/coderay/scanners/python.rb#37
|
2579
|
-
CodeRay::Scanners::Python::PREDEFINED_EXCEPTIONS = T.let(T.unsafe(nil), Array)
|
2580
|
-
|
2581
|
-
# source://coderay//lib/coderay/scanners/python.rb#25
|
2582
|
-
CodeRay::Scanners::Python::PREDEFINED_METHODS_AND_TYPES = T.let(T.unsafe(nil), Array)
|
2583
|
-
|
2584
|
-
# source://coderay//lib/coderay/scanners/python.rb#52
|
2585
|
-
CodeRay::Scanners::Python::PREDEFINED_VARIABLES_AND_CONSTANTS = T.let(T.unsafe(nil), Array)
|
2586
|
-
|
2587
|
-
# source://coderay//lib/coderay/scanners/python.rb#82
|
2588
|
-
CodeRay::Scanners::Python::STRING_CONTENT_REGEXP = T.let(T.unsafe(nil), Hash)
|
2589
|
-
|
2590
|
-
# source://coderay//lib/coderay/scanners/python.rb#78
|
2591
|
-
CodeRay::Scanners::Python::STRING_DELIMITER_REGEXP = T.let(T.unsafe(nil), Hash)
|
2592
|
-
|
2593
|
-
# source://coderay//lib/coderay/scanners/python.rb#66
|
2594
|
-
CodeRay::Scanners::Python::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp)
|
2595
|
-
|
2596
|
-
# = Raydebug Scanner
|
2597
|
-
#
|
2598
|
-
# Highlights the output of the Encoders::Debug encoder.
|
2599
|
-
#
|
2600
|
-
# source://coderay//lib/coderay/scanners/raydebug.rb#9
|
2601
|
-
class CodeRay::Scanners::Raydebug < ::CodeRay::Scanners::Scanner
|
2602
|
-
protected
|
2603
|
-
|
2604
|
-
# source://coderay//lib/coderay/scanners/raydebug.rb#22
|
2605
|
-
def scan_tokens(encoder, options); end
|
2606
|
-
|
2607
|
-
# source://coderay//lib/coderay/scanners/raydebug.rb#17
|
2608
|
-
def setup; end
|
2609
|
-
end
|
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
|
2620
|
-
class CodeRay::Scanners::Ruby < ::CodeRay::Scanners::Scanner
|
2621
|
-
# source://coderay//lib/coderay/scanners/ruby.rb#19
|
2622
|
-
def interpreted_string_state; end
|
2623
|
-
|
2624
|
-
protected
|
2625
|
-
|
2626
|
-
# source://coderay//lib/coderay/scanners/ruby.rb#29
|
2627
|
-
def scan_tokens(encoder, options); end
|
2628
|
-
|
2629
|
-
# source://coderay//lib/coderay/scanners/ruby.rb#25
|
2630
|
-
def setup; end
|
2631
|
-
end
|
2632
|
-
|
2633
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#5
|
2634
|
-
module CodeRay::Scanners::Ruby::Patterns; end
|
2635
|
-
|
2636
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#72
|
2637
|
-
CodeRay::Scanners::Ruby::Patterns::BINARY = T.let(T.unsafe(nil), Regexp)
|
2638
|
-
|
2639
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#106
|
2640
|
-
CodeRay::Scanners::Ruby::Patterns::CHARACTER = T.let(T.unsafe(nil), Regexp)
|
2641
|
-
|
2642
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#55
|
2643
|
-
CodeRay::Scanners::Ruby::Patterns::CLASS_VARIABLE = T.let(T.unsafe(nil), Regexp)
|
2644
|
-
|
2645
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#96
|
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
|
2649
|
-
CodeRay::Scanners::Ruby::Patterns::DATA = T.let(T.unsafe(nil), Regexp)
|
2650
|
-
|
2651
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#69
|
2652
|
-
CodeRay::Scanners::Ruby::Patterns::DECIMAL = T.let(T.unsafe(nil), Regexp)
|
2653
|
-
|
2654
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#102
|
2655
|
-
CodeRay::Scanners::Ruby::Patterns::ESCAPE = T.let(T.unsafe(nil), Regexp)
|
2656
|
-
|
2657
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#74
|
2658
|
-
CodeRay::Scanners::Ruby::Patterns::EXPONENT = T.let(T.unsafe(nil), Regexp)
|
2659
|
-
|
2660
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#168
|
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
|
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
|
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
|
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
|
2673
|
-
CodeRay::Scanners::Ruby::Patterns::FLOAT_SUFFIX = T.let(T.unsafe(nil), Regexp)
|
2674
|
-
|
2675
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#57
|
2676
|
-
CodeRay::Scanners::Ruby::Patterns::GLOBAL_VARIABLE = T.let(T.unsafe(nil), Regexp)
|
2677
|
-
|
2678
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#116
|
2679
|
-
CodeRay::Scanners::Ruby::Patterns::HEREDOC_OPEN = T.let(T.unsafe(nil), Regexp)
|
2680
|
-
|
2681
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#71
|
2682
|
-
CodeRay::Scanners::Ruby::Patterns::HEXADECIMAL = T.let(T.unsafe(nil), Regexp)
|
2683
|
-
|
2684
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#38
|
2685
|
-
CodeRay::Scanners::Ruby::Patterns::IDENT = T.let(T.unsafe(nil), Regexp)
|
2686
|
-
|
2687
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#28
|
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
|
2691
|
-
CodeRay::Scanners::Ruby::Patterns::INSTANCE_VARIABLE = T.let(T.unsafe(nil), Regexp)
|
2692
|
-
|
2693
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#7
|
2694
|
-
CodeRay::Scanners::Ruby::Patterns::KEYWORDS = T.let(T.unsafe(nil), Array)
|
2695
|
-
|
2696
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#151
|
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
|
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
|
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
|
2706
|
-
CodeRay::Scanners::Ruby::Patterns::METHOD_NAME = T.let(T.unsafe(nil), Regexp)
|
2707
|
-
|
2708
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#52
|
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
|
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
|
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
|
2718
|
-
CodeRay::Scanners::Ruby::Patterns::METHOD_SUFFIX = T.let(T.unsafe(nil), Regexp)
|
2719
|
-
|
2720
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#77
|
2721
|
-
CodeRay::Scanners::Ruby::Patterns::NUMERIC = T.let(T.unsafe(nil), Regexp)
|
2722
|
-
|
2723
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#56
|
2724
|
-
CodeRay::Scanners::Ruby::Patterns::OBJECT_VARIABLE = T.let(T.unsafe(nil), Regexp)
|
2725
|
-
|
2726
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#70
|
2727
|
-
CodeRay::Scanners::Ruby::Patterns::OCTAL = T.let(T.unsafe(nil), Regexp)
|
2728
|
-
|
2729
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#17
|
2730
|
-
CodeRay::Scanners::Ruby::Patterns::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array)
|
2731
|
-
|
2732
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#58
|
2733
|
-
CodeRay::Scanners::Ruby::Patterns::PREFIX_VARIABLE = T.let(T.unsafe(nil), Regexp)
|
2734
|
-
|
2735
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#61
|
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
|
2739
|
-
CodeRay::Scanners::Ruby::Patterns::REGEXP_MODIFIERS = T.let(T.unsafe(nil), Regexp)
|
2740
|
-
|
2741
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#126
|
2742
|
-
CodeRay::Scanners::Ruby::Patterns::RUBYDOC = T.let(T.unsafe(nil), Regexp)
|
2743
|
-
|
2744
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#138
|
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
|
2748
|
-
CodeRay::Scanners::Ruby::Patterns::SIMPLE_ESCAPE = T.let(T.unsafe(nil), Regexp)
|
2749
|
-
|
2750
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#79
|
2751
|
-
CodeRay::Scanners::Ruby::Patterns::SYMBOL = T.let(T.unsafe(nil), Regexp)
|
2752
|
-
|
2753
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#142
|
2754
|
-
CodeRay::Scanners::Ruby::Patterns::VALUE_FOLLOWS = T.let(T.unsafe(nil), Regexp)
|
2755
|
-
|
2756
|
-
# source://coderay//lib/coderay/scanners/ruby/patterns.rb#59
|
2757
|
-
CodeRay::Scanners::Ruby::Patterns::VARIABLE = T.let(T.unsafe(nil), Regexp)
|
2758
|
-
|
2759
|
-
# source://coderay//lib/coderay/scanners/ruby/string_state.rb#8
|
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
|
2764
|
-
def initialize(kind, interpreted, delim, heredoc = T.unsafe(nil)); end
|
2765
|
-
|
2766
|
-
# source://coderay//lib/coderay/scanners/ruby/string_state.rb#63
|
2767
|
-
def heredoc_pattern(delim, interpreted, indented); end
|
2768
|
-
|
2769
|
-
class << self
|
2770
|
-
# source://coderay//lib/coderay/scanners/ruby/string_state.rb#40
|
2771
|
-
def simple_key_pattern(delim); end
|
2772
|
-
end
|
2773
|
-
end
|
2774
|
-
|
2775
|
-
# source://coderay//lib/coderay/scanners/ruby/string_state.rb#10
|
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
|
2779
|
-
CodeRay::Scanners::Ruby::StringState::STRING_PATTERN = T.let(T.unsafe(nil), Hash)
|
2780
|
-
|
2781
|
-
# by Josh Goebel
|
2782
|
-
#
|
2783
|
-
# source://coderay//lib/coderay/scanners/sql.rb#5
|
2784
|
-
class CodeRay::Scanners::SQL < ::CodeRay::Scanners::Scanner
|
2785
|
-
# source://coderay//lib/coderay/scanners/sql.rb#66
|
2786
|
-
def scan_tokens(encoder, options); end
|
2787
|
-
end
|
2788
|
-
|
2789
|
-
# source://coderay//lib/coderay/scanners/sql.rb#23
|
2790
|
-
CodeRay::Scanners::SQL::COMMANDS = T.let(T.unsafe(nil), Array)
|
2791
|
-
|
2792
|
-
# source://coderay//lib/coderay/scanners/sql.rb#38
|
2793
|
-
CodeRay::Scanners::SQL::DIRECTIVES = T.let(T.unsafe(nil), Array)
|
2794
|
-
|
2795
|
-
# source://coderay//lib/coderay/scanners/sql.rb#55
|
2796
|
-
CodeRay::Scanners::SQL::ESCAPE = T.let(T.unsafe(nil), Regexp)
|
2797
|
-
|
2798
|
-
# source://coderay//lib/coderay/scanners/sql.rb#46
|
2799
|
-
CodeRay::Scanners::SQL::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring)
|
2800
|
-
|
2801
|
-
# source://coderay//lib/coderay/scanners/sql.rb#9
|
2802
|
-
CodeRay::Scanners::SQL::KEYWORDS = T.let(T.unsafe(nil), Array)
|
2803
|
-
|
2804
|
-
# source://coderay//lib/coderay/scanners/sql.rb#18
|
2805
|
-
CodeRay::Scanners::SQL::OBJECTS = T.let(T.unsafe(nil), Array)
|
2806
|
-
|
2807
|
-
# source://coderay//lib/coderay/scanners/sql.rb#44
|
2808
|
-
CodeRay::Scanners::SQL::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array)
|
2809
|
-
|
2810
|
-
# source://coderay//lib/coderay/scanners/sql.rb#36
|
2811
|
-
CodeRay::Scanners::SQL::PREDEFINED_FUNCTIONS = T.let(T.unsafe(nil), Array)
|
2812
|
-
|
2813
|
-
# source://coderay//lib/coderay/scanners/sql.rb#28
|
2814
|
-
CodeRay::Scanners::SQL::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array)
|
2815
|
-
|
2816
|
-
# source://coderay//lib/coderay/scanners/sql.rb#60
|
2817
|
-
CodeRay::Scanners::SQL::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash)
|
2818
|
-
|
2819
|
-
# source://coderay//lib/coderay/scanners/sql.rb#58
|
2820
|
-
CodeRay::Scanners::SQL::STRING_PREFIXES = T.let(T.unsafe(nil), Regexp)
|
2821
|
-
|
2822
|
-
# source://coderay//lib/coderay/scanners/sql.rb#56
|
2823
|
-
CodeRay::Scanners::SQL::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp)
|
2824
|
-
|
2825
|
-
# A scanner for Sass.
|
2826
|
-
#
|
2827
|
-
# source://coderay//lib/coderay/scanners/sass.rb#5
|
2828
|
-
class CodeRay::Scanners::Sass < ::CodeRay::Scanners::CSS
|
2829
|
-
protected
|
2830
|
-
|
2831
|
-
# source://coderay//lib/coderay/scanners/sass.rb#16
|
2832
|
-
def scan_tokens(encoder, options); end
|
2833
|
-
|
2834
|
-
# source://coderay//lib/coderay/scanners/sass.rb#12
|
2835
|
-
def setup; end
|
2836
|
-
end
|
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
|
2863
|
-
class CodeRay::Scanners::Scanner < ::StringScanner
|
2864
|
-
include ::Enumerable
|
2865
|
-
extend ::CodeRay::Plugin
|
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
|
2880
|
-
def initialize(code = T.unsafe(nil), options = T.unsafe(nil)); end
|
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
|
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
|
2894
|
-
def column(pos = T.unsafe(nil)); end
|
2895
|
-
|
2896
|
-
# Traverse the tokens.
|
2897
|
-
#
|
2898
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#192
|
2899
|
-
def each(&block); end
|
2900
|
-
|
2901
|
-
# the default file extension for this scanner
|
2902
|
-
#
|
2903
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#160
|
2904
|
-
def file_extension; end
|
2905
|
-
|
2906
|
-
# the Plugin ID for this scanner
|
2907
|
-
#
|
2908
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#155
|
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
|
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
|
2924
|
-
def reset; end
|
2925
|
-
|
2926
|
-
# Returns the value of attribute state.
|
2927
|
-
#
|
2928
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#44
|
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
|
2936
|
-
def state=(_arg0); end
|
2937
|
-
|
2938
|
-
# Set a new string to be scanned.
|
2939
|
-
#
|
2940
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#148
|
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
|
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
|
2951
|
-
def tokens; end
|
2952
|
-
|
2953
|
-
protected
|
2954
|
-
|
2955
|
-
# Scanner error with additional status information
|
2956
|
-
#
|
2957
|
-
# @raise [ScanError]
|
2958
|
-
#
|
2959
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#314
|
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
|
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
|
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
|
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
|
2985
|
-
def scan_tokens(tokens, options); end
|
2986
|
-
|
2987
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#305
|
2988
|
-
def scanner_state_info(state); end
|
2989
|
-
|
2990
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#239
|
2991
|
-
def set_string_from_source(source); end
|
2992
|
-
|
2993
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#250
|
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
|
3003
|
-
def setup; end
|
3004
|
-
|
3005
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#322
|
3006
|
-
def tokens_last(tokens, n); end
|
3007
|
-
|
3008
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#318
|
3009
|
-
def tokens_size(tokens); end
|
3010
|
-
|
3011
|
-
class << self
|
3012
|
-
# The encoding used internally by this scanner.
|
3013
|
-
#
|
3014
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#71
|
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
|
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
|
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
|
3032
|
-
def normalize(code); end
|
3033
|
-
|
3034
|
-
protected
|
3035
|
-
|
3036
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#82
|
3037
|
-
def encode_with_encoding(code, target_encoding); end
|
3038
|
-
|
3039
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#100
|
3040
|
-
def guess_encoding(s); end
|
3041
|
-
|
3042
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#96
|
3043
|
-
def to_unix(code); end
|
3044
|
-
end
|
3045
|
-
end
|
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
|
3052
|
-
CodeRay::Scanners::Scanner::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
|
3053
|
-
|
3054
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#42
|
3055
|
-
CodeRay::Scanners::Scanner::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array)
|
3056
|
-
|
3057
|
-
# source://coderay//lib/coderay/helpers/plugin.rb#41
|
3058
|
-
CodeRay::Scanners::Scanner::PLUGIN_HOST = CodeRay::Scanners
|
3059
|
-
|
3060
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#299
|
3061
|
-
CodeRay::Scanners::Scanner::SCANNER_STATE_INFO = T.let(T.unsafe(nil), String)
|
3062
|
-
|
3063
|
-
# source://coderay//lib/coderay/scanners/scanner.rb#271
|
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
|
3069
|
-
class CodeRay::Scanners::Scanner::ScanError < ::StandardError; end
|
3070
|
-
|
3071
|
-
# source://coderay//lib/coderay/scanners/taskpaper.rb#4
|
3072
|
-
class CodeRay::Scanners::Taskpaper < ::CodeRay::Scanners::Scanner
|
3073
|
-
protected
|
3074
|
-
|
3075
|
-
# source://coderay//lib/coderay/scanners/taskpaper.rb#11
|
3076
|
-
def scan_tokens(encoder, options); end
|
3077
|
-
end
|
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
|
3086
|
-
class CodeRay::Scanners::Text < ::CodeRay::Scanners::Scanner
|
3087
|
-
protected
|
3088
|
-
|
3089
|
-
# source://coderay//lib/coderay/scanners/text.rb#18
|
3090
|
-
def scan_tokens(encoder, options); end
|
3091
|
-
end
|
3092
|
-
|
3093
|
-
# source://coderay//lib/coderay/scanners/text.rb#14
|
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
|
3101
|
-
class CodeRay::Scanners::XML < ::CodeRay::Scanners::HTML; end
|
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
|
3108
|
-
class CodeRay::Scanners::YAML < ::CodeRay::Scanners::Scanner
|
3109
|
-
protected
|
3110
|
-
|
3111
|
-
# source://coderay//lib/coderay/scanners/yaml.rb#16
|
3112
|
-
def scan_tokens(encoder, options); end
|
3113
|
-
end
|
3114
|
-
|
3115
|
-
# source://coderay//lib/coderay/scanners/yaml.rb#12
|
3116
|
-
CodeRay::Scanners::YAML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Symbol)
|
3117
|
-
|
3118
|
-
# This module holds the Style class and its subclasses.
|
3119
|
-
#
|
3120
|
-
# See Plugin.
|
3121
|
-
#
|
3122
|
-
# source://coderay//lib/coderay/styles.rb#6
|
3123
|
-
module CodeRay::Styles
|
3124
|
-
extend ::CodeRay::PluginHost
|
3125
|
-
end
|
3126
|
-
|
3127
|
-
# A colorful theme using CSS 3 colors (with alpha channel).
|
3128
|
-
#
|
3129
|
-
# source://coderay//lib/coderay/styles/alpha.rb#5
|
3130
|
-
class CodeRay::Styles::Alpha < ::CodeRay::Styles::Style; end
|
3131
|
-
|
3132
|
-
# source://coderay//lib/coderay/styles/alpha.rb#14
|
3133
|
-
CodeRay::Styles::Alpha::CSS_MAIN_STYLES = T.let(T.unsafe(nil), String)
|
3134
|
-
|
3135
|
-
# source://coderay//lib/coderay/styles/alpha.rb#53
|
3136
|
-
CodeRay::Styles::Alpha::TOKEN_COLORS = T.let(T.unsafe(nil), String)
|
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
|
3143
|
-
class CodeRay::Styles::Style
|
3144
|
-
extend ::CodeRay::Plugin
|
3145
|
-
end
|
3146
|
-
|
3147
|
-
# source://coderay//lib/coderay/styles/style.rb#12
|
3148
|
-
CodeRay::Styles::Style::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
|
3149
|
-
|
3150
|
-
# source://coderay//lib/coderay/helpers/plugin.rb#41
|
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
|
3156
|
-
CodeRay::TokenKinds = T.let(T.unsafe(nil), Hash)
|
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
|
3198
|
-
class CodeRay::Tokens < ::Array
|
3199
|
-
# source://coderay//lib/coderay/tokens.rb#156
|
3200
|
-
def begin_group(kind); end
|
3201
|
-
|
3202
|
-
# source://coderay//lib/coderay/tokens.rb#158
|
3203
|
-
def begin_line(kind); end
|
3204
|
-
|
3205
|
-
# Return the actual number of tokens.
|
3206
|
-
#
|
3207
|
-
# source://coderay//lib/coderay/tokens.rb#151
|
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
|
3219
|
-
def encode(encoder, options = T.unsafe(nil)); end
|
3220
|
-
|
3221
|
-
# source://coderay//lib/coderay/tokens.rb#157
|
3222
|
-
def end_group(kind); end
|
3223
|
-
|
3224
|
-
# source://coderay//lib/coderay/tokens.rb#159
|
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
|
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
|
3238
|
-
def scanner; end
|
3239
|
-
|
3240
|
-
# The Scanner instance that created the tokens.
|
3241
|
-
#
|
3242
|
-
# source://coderay//lib/coderay/tokens.rb#47
|
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
|
3256
|
-
def split_into_parts(*sizes); end
|
3257
|
-
|
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
|
3263
|
-
def to_s; end
|
3264
|
-
|
3265
|
-
def tokens(*_arg0); end
|
3266
|
-
end
|
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
|
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
|
3280
|
-
def initialize(input, lang, options = T.unsafe(nil), block = T.unsafe(nil)); end
|
3281
|
-
|
3282
|
-
# Returns the value of attribute block.
|
3283
|
-
#
|
3284
|
-
# source://coderay//lib/coderay/tokens_proxy.rb#9
|
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
|
3292
|
-
def block=(_arg0); end
|
3293
|
-
|
3294
|
-
# Overwrite Struct#each.
|
3295
|
-
#
|
3296
|
-
# source://coderay//lib/coderay/tokens_proxy.rb#48
|
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
|
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
|
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
|
3315
|
-
def input=(_arg0); end
|
3316
|
-
|
3317
|
-
# Returns the value of attribute lang.
|
3318
|
-
#
|
3319
|
-
# source://coderay//lib/coderay/tokens_proxy.rb#9
|
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
|
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
|
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
|
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
|
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
|
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
|
3355
|
-
def tokens; end
|
3356
|
-
end
|
3357
|
-
|
3358
|
-
# source://coderay//lib/coderay/version.rb#2
|
3359
|
-
CodeRay::VERSION = T.let(T.unsafe(nil), String)
|
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
|
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
|
3406
|
-
def initialize(default = T.unsafe(nil)); end
|
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
|
3413
|
-
def add(words, value = T.unsafe(nil)); end
|
3414
|
-
end
|
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
|
3420
|
-
class CodeRay::WordList::CaseIgnoring < ::CodeRay::WordList
|
3421
|
-
# source://coderay//lib/coderay/helpers/word_list.rb#62
|
3422
|
-
def [](key); end
|
3423
|
-
|
3424
|
-
# source://coderay//lib/coderay/helpers/word_list.rb#66
|
3425
|
-
def []=(key, value); end
|
3426
|
-
end
|