packwerk-haml 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +75 -0
- data/Gemfile +22 -0
- data/Gemfile.lock +190 -0
- data/LICENSE.txt +21 -0
- data/README.md +32 -0
- data/Rakefile +16 -0
- data/lib/packwerk_haml/parser.rb +64 -0
- data/lib/packwerk_haml/version.rb +6 -0
- data/lib/packwerk_haml.rb +8 -0
- data/packwerk-haml.gemspec +40 -0
- data/sig/packwerk/haml.rbs +4 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/actionview.rbi +75 -0
- data/sorbet/rbi/annotations/activesupport.rbi +136 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/actionview@7.1.1.rbi +15004 -0
- data/sorbet/rbi/gems/activesupport@7.1.1.rbi +18784 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
- data/sorbet/rbi/gems/base64@0.1.1.rbi +172 -0
- data/sorbet/rbi/gems/better_html@2.0.2.rbi +529 -0
- data/sorbet/rbi/gems/bigdecimal@3.1.4.rbi +77 -0
- data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi +11545 -0
- data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +8 -0
- data/sorbet/rbi/gems/constant_resolver@0.2.0.rbi +90 -0
- data/sorbet/rbi/gems/crass@1.0.6.rbi +622 -0
- data/sorbet/rbi/gems/drb@2.1.1.rbi +1313 -0
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
- data/sorbet/rbi/gems/haml@6.2.3.rbi +1619 -0
- data/sorbet/rbi/gems/i18n@1.14.1.rbi +2325 -0
- data/sorbet/rbi/gems/json@2.6.3.rbi +1533 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
- data/sorbet/rbi/gems/loofah@2.21.4.rbi +1021 -0
- data/sorbet/rbi/gems/m@1.6.2.rbi +257 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
- data/sorbet/rbi/gems/minitest-focus@1.4.0.rbi +91 -0
- data/sorbet/rbi/gems/minitest@5.20.0.rbi +1509 -0
- data/sorbet/rbi/gems/mutex_m@0.1.2.rbi +91 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/nokogiri@1.15.4.rbi +7317 -0
- data/sorbet/rbi/gems/packwerk@3.1.0-752d37add96b9f4bf28492d7db152f6523b1d29c.rbi +2370 -0
- data/sorbet/rbi/gems/parallel@1.23.0.rbi +273 -0
- data/sorbet/rbi/gems/parser@3.2.2.4.rbi +7253 -0
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
- data/sorbet/rbi/gems/racc@1.7.1.rbi +161 -0
- data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +8 -0
- data/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +716 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +3042 -0
- data/sorbet/rbi/gems/rbi@0.1.1.rbi +2926 -0
- data/sorbet/rbi/gems/regexp_parser@2.8.2.rbi +3749 -0
- data/sorbet/rbi/gems/rexml@3.2.6.rbi +4781 -0
- data/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi +7075 -0
- data/sorbet/rbi/gems/rubocop-performance@1.19.1.rbi +3208 -0
- data/sorbet/rbi/gems/rubocop-shopify@2.14.0.rbi +8 -0
- data/sorbet/rbi/gems/rubocop-sorbet@0.7.4.rbi +1442 -0
- data/sorbet/rbi/gems/rubocop@1.57.0.rbi +56753 -0
- data/sorbet/rbi/gems/ruby-lsp@0.2.4.rbi +11 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
- data/sorbet/rbi/gems/smart_properties@1.17.0.rbi +474 -0
- data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
- data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23136 -0
- data/sorbet/rbi/gems/tapioca@0.11.9.rbi +3498 -0
- data/sorbet/rbi/gems/temple@0.10.3.rbi +1738 -0
- data/sorbet/rbi/gems/thor@1.2.2.rbi +3965 -0
- data/sorbet/rbi/gems/tilt@2.3.0.rbi +925 -0
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5917 -0
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
- data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
- data/sorbet/rbi/gems/yard@0.9.34.rbi +18219 -0
- data/sorbet/rbi/gems/yarp@0.13.0.rbi +21646 -0
- data/sorbet/rbi/gems/zeitwerk@2.6.12.rbi +997 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +5 -0
- metadata +167 -0
@@ -0,0 +1,1619 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `haml` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem haml`.
|
6
|
+
|
7
|
+
# There are only helpers that depend on ActionView internals.
|
8
|
+
#
|
9
|
+
# source://haml//lib/haml/error.rb#2
|
10
|
+
module Haml; end
|
11
|
+
|
12
|
+
# source://haml//lib/haml/ambles.rb#3
|
13
|
+
class Haml::Ambles < ::Temple::Filter
|
14
|
+
# @return [Ambles] a new instance of Ambles
|
15
|
+
#
|
16
|
+
# source://haml//lib/haml/ambles.rb#6
|
17
|
+
def initialize(*_arg0); end
|
18
|
+
|
19
|
+
# source://haml//lib/haml/ambles.rb#12
|
20
|
+
def call(ast); end
|
21
|
+
end
|
22
|
+
|
23
|
+
# source://haml//lib/haml/attribute_builder.rb#4
|
24
|
+
module Haml::AttributeBuilder
|
25
|
+
class << self
|
26
|
+
# source://haml//lib/haml/attribute_builder.rb#6
|
27
|
+
def build(escape_attrs, quote, format, object_ref, *hashes); end
|
28
|
+
|
29
|
+
# source://haml//lib/haml/attribute_builder.rb#69
|
30
|
+
def build_aria(escape_attrs, quote, *hashes); end
|
31
|
+
|
32
|
+
# source://haml//lib/haml/attribute_builder.rb#35
|
33
|
+
def build_class(escape_attrs, *values); end
|
34
|
+
|
35
|
+
# source://haml//lib/haml/attribute_builder.rb#65
|
36
|
+
def build_data(escape_attrs, quote, *hashes); end
|
37
|
+
|
38
|
+
# source://haml//lib/haml/attribute_builder.rb#31
|
39
|
+
def build_id(escape_attrs, *values); end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
# source://haml//lib/haml/attribute_builder.rb#138
|
44
|
+
def build_boolean!(escape_attrs, quote, format, buf, key, value); end
|
45
|
+
|
46
|
+
# source://haml//lib/haml/attribute_builder.rb#75
|
47
|
+
def build_data_attribute(key, escape_attrs, quote, *hashes); end
|
48
|
+
|
49
|
+
# source://haml//lib/haml/attribute_builder.rb#154
|
50
|
+
def escape_html(escape_attrs, str); end
|
51
|
+
|
52
|
+
# source://haml//lib/haml/attribute_builder.rb#97
|
53
|
+
def flatten_attributes(attributes); end
|
54
|
+
|
55
|
+
# source://haml//lib/haml/attribute_builder.rb#118
|
56
|
+
def merge_all_attrs(hashes); end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# source://haml//lib/haml/attribute_compiler.rb#15
|
61
|
+
class Haml::AttributeCompiler
|
62
|
+
# @return [AttributeCompiler] a new instance of AttributeCompiler
|
63
|
+
#
|
64
|
+
# source://haml//lib/haml/attribute_compiler.rb#16
|
65
|
+
def initialize(identity, options); end
|
66
|
+
|
67
|
+
# source://haml//lib/haml/attribute_compiler.rb#23
|
68
|
+
def compile(node); end
|
69
|
+
|
70
|
+
private
|
71
|
+
|
72
|
+
# source://haml//lib/haml/attribute_compiler.rb#123
|
73
|
+
def attribute_builder(type, values); end
|
74
|
+
|
75
|
+
# source://haml//lib/haml/attribute_compiler.rb#98
|
76
|
+
def compile_boolean!(temple, key, values); end
|
77
|
+
|
78
|
+
# source://haml//lib/haml/attribute_compiler.rb#78
|
79
|
+
def compile_class!(temple, key, values); end
|
80
|
+
|
81
|
+
# source://haml//lib/haml/attribute_compiler.rb#119
|
82
|
+
def compile_common!(temple, key, values); end
|
83
|
+
|
84
|
+
# source://haml//lib/haml/attribute_compiler.rb#87
|
85
|
+
def compile_data!(temple, key, values); end
|
86
|
+
|
87
|
+
# source://haml//lib/haml/attribute_compiler.rb#69
|
88
|
+
def compile_id!(temple, key, values); end
|
89
|
+
|
90
|
+
# source://haml//lib/haml/attribute_compiler.rb#128
|
91
|
+
def literal_for(value); end
|
92
|
+
|
93
|
+
# source://haml//lib/haml/attribute_compiler.rb#38
|
94
|
+
def runtime_compile(node); end
|
95
|
+
|
96
|
+
# source://haml//lib/haml/attribute_compiler.rb#46
|
97
|
+
def static_compile(static_hash, dynamic_hashes); end
|
98
|
+
end
|
99
|
+
|
100
|
+
# source://haml//lib/haml/attribute_parser.rb#5
|
101
|
+
class Haml::AttributeParser
|
102
|
+
# source://haml//lib/haml/attribute_parser.rb#19
|
103
|
+
def parse(text); end
|
104
|
+
|
105
|
+
private
|
106
|
+
|
107
|
+
# @raise [ParseSkip]
|
108
|
+
#
|
109
|
+
# source://haml//lib/haml/attribute_parser.rb#67
|
110
|
+
def assert_type!(token, type); end
|
111
|
+
|
112
|
+
# @yield [attr_tokens]
|
113
|
+
#
|
114
|
+
# source://haml//lib/haml/attribute_parser.rb#78
|
115
|
+
def each_attr(tokens); end
|
116
|
+
|
117
|
+
# source://haml//lib/haml/attribute_parser.rb#42
|
118
|
+
def parse_key!(tokens); end
|
119
|
+
|
120
|
+
# source://haml//lib/haml/attribute_parser.rb#71
|
121
|
+
def skip_until_hash_rocket!(tokens); end
|
122
|
+
|
123
|
+
# source://haml//lib/haml/attribute_parser.rb#36
|
124
|
+
def wrap_bracket(text); end
|
125
|
+
|
126
|
+
class << self
|
127
|
+
# @return [TrueClass, FalseClass] - return true if AttributeParser.parse can be used.
|
128
|
+
#
|
129
|
+
# source://haml//lib/haml/attribute_parser.rb#10
|
130
|
+
def available?; end
|
131
|
+
|
132
|
+
# source://haml//lib/haml/attribute_parser.rb#15
|
133
|
+
def parse(text); end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
# source://haml//lib/haml/attribute_parser.rb#6
|
138
|
+
class Haml::AttributeParser::ParseSkip < ::StandardError; end
|
139
|
+
|
140
|
+
# The list of boolean attributes. You may add custom attributes to this constant.
|
141
|
+
#
|
142
|
+
# source://haml//lib/haml/attribute_compiler.rb#8
|
143
|
+
Haml::BOOLEAN_ATTRIBUTES = T.let(T.unsafe(nil), Array)
|
144
|
+
|
145
|
+
# source://haml//lib/haml/compiler/children_compiler.rb#5
|
146
|
+
class Haml::Compiler
|
147
|
+
# @return [Compiler] a new instance of Compiler
|
148
|
+
#
|
149
|
+
# source://haml//lib/haml/compiler.rb#13
|
150
|
+
def initialize(options = T.unsafe(nil)); end
|
151
|
+
|
152
|
+
# source://haml//lib/haml/compiler.rb#24
|
153
|
+
def call(ast); end
|
154
|
+
|
155
|
+
private
|
156
|
+
|
157
|
+
# source://haml//lib/haml/compiler.rb#33
|
158
|
+
def compile(node); end
|
159
|
+
|
160
|
+
# source://haml//lib/haml/compiler.rb#58
|
161
|
+
def compile_children(node); end
|
162
|
+
|
163
|
+
# source://haml//lib/haml/compiler.rb#62
|
164
|
+
def compile_comment(node); end
|
165
|
+
|
166
|
+
# source://haml//lib/haml/compiler.rb#66
|
167
|
+
def compile_doctype(node); end
|
168
|
+
|
169
|
+
# source://haml//lib/haml/compiler.rb#70
|
170
|
+
def compile_filter(node); end
|
171
|
+
|
172
|
+
# source://haml//lib/haml/compiler.rb#74
|
173
|
+
def compile_plain(node); end
|
174
|
+
|
175
|
+
# source://haml//lib/haml/compiler.rb#78
|
176
|
+
def compile_script(node); end
|
177
|
+
|
178
|
+
# source://haml//lib/haml/compiler.rb#82
|
179
|
+
def compile_silent_script(node); end
|
180
|
+
|
181
|
+
# source://haml//lib/haml/compiler.rb#86
|
182
|
+
def compile_tag(node); end
|
183
|
+
|
184
|
+
# source://haml//lib/haml/compiler.rb#90
|
185
|
+
def runtime_error(error); end
|
186
|
+
end
|
187
|
+
|
188
|
+
# source://haml//lib/haml/compiler/children_compiler.rb#6
|
189
|
+
class Haml::Compiler::ChildrenCompiler
|
190
|
+
# @return [ChildrenCompiler] a new instance of ChildrenCompiler
|
191
|
+
#
|
192
|
+
# source://haml//lib/haml/compiler/children_compiler.rb#7
|
193
|
+
def initialize; end
|
194
|
+
|
195
|
+
# source://haml//lib/haml/compiler/children_compiler.rb#12
|
196
|
+
def compile(node, &block); end
|
197
|
+
|
198
|
+
private
|
199
|
+
|
200
|
+
# source://haml//lib/haml/compiler/children_compiler.rb#125
|
201
|
+
def find_else_index(temple); end
|
202
|
+
|
203
|
+
# source://haml//lib/haml/compiler/children_compiler.rb#29
|
204
|
+
def insert_newlines!(temple, node); end
|
205
|
+
|
206
|
+
# @return [Boolean]
|
207
|
+
#
|
208
|
+
# source://haml//lib/haml/compiler/children_compiler.rb#137
|
209
|
+
def insert_whitespace?(node); end
|
210
|
+
|
211
|
+
# source://haml//lib/haml/compiler/children_compiler.rb#37
|
212
|
+
def moving_lineno(node, &block); end
|
213
|
+
|
214
|
+
# @return [Boolean]
|
215
|
+
#
|
216
|
+
# source://haml//lib/haml/compiler/children_compiler.rb#65
|
217
|
+
def nuke_inner_whitespace?(node); end
|
218
|
+
|
219
|
+
# @return [Boolean]
|
220
|
+
#
|
221
|
+
# source://haml//lib/haml/compiler/children_compiler.rb#87
|
222
|
+
def nuke_outer_whitespace?(node); end
|
223
|
+
|
224
|
+
# @return [Boolean]
|
225
|
+
#
|
226
|
+
# source://haml//lib/haml/compiler/children_compiler.rb#76
|
227
|
+
def nuke_prev_whitespace?(node); end
|
228
|
+
|
229
|
+
# @return [Boolean]
|
230
|
+
#
|
231
|
+
# source://haml//lib/haml/compiler/children_compiler.rb#60
|
232
|
+
def prepend_whitespace?(node); end
|
233
|
+
|
234
|
+
# source://haml//lib/haml/compiler/children_compiler.rb#92
|
235
|
+
def rstrip_whitespace!(temple); end
|
236
|
+
end
|
237
|
+
|
238
|
+
# source://haml//lib/haml/compiler/comment_compiler.rb#4
|
239
|
+
class Haml::Compiler::CommentCompiler
|
240
|
+
# source://haml//lib/haml/compiler/comment_compiler.rb#5
|
241
|
+
def compile(node, &block); end
|
242
|
+
|
243
|
+
private
|
244
|
+
|
245
|
+
# source://haml//lib/haml/compiler/comment_compiler.rb#23
|
246
|
+
def compile_conditional_comment(node, &block); end
|
247
|
+
|
248
|
+
# source://haml//lib/haml/compiler/comment_compiler.rb#15
|
249
|
+
def compile_html_comment(node, &block); end
|
250
|
+
|
251
|
+
# source://haml//lib/haml/compiler/comment_compiler.rb#38
|
252
|
+
def compile_text(node); end
|
253
|
+
end
|
254
|
+
|
255
|
+
# source://haml//lib/haml/compiler/doctype_compiler.rb#4
|
256
|
+
class Haml::Compiler::DoctypeCompiler
|
257
|
+
# @return [DoctypeCompiler] a new instance of DoctypeCompiler
|
258
|
+
#
|
259
|
+
# source://haml//lib/haml/compiler/doctype_compiler.rb#5
|
260
|
+
def initialize(options = T.unsafe(nil)); end
|
261
|
+
|
262
|
+
# source://haml//lib/haml/compiler/doctype_compiler.rb#9
|
263
|
+
def compile(node); end
|
264
|
+
|
265
|
+
private
|
266
|
+
|
267
|
+
# source://haml//lib/haml/compiler/doctype_compiler.rb#24
|
268
|
+
def html_doctype(node); end
|
269
|
+
|
270
|
+
# source://haml//lib/haml/compiler/doctype_compiler.rb#47
|
271
|
+
def rdfa_doctype; end
|
272
|
+
|
273
|
+
# source://haml//lib/haml/compiler/doctype_compiler.rb#38
|
274
|
+
def xml_doctype; end
|
275
|
+
end
|
276
|
+
|
277
|
+
# source://haml//lib/haml/compiler/script_compiler.rb#8
|
278
|
+
class Haml::Compiler::ScriptCompiler
|
279
|
+
# @return [ScriptCompiler] a new instance of ScriptCompiler
|
280
|
+
#
|
281
|
+
# source://haml//lib/haml/compiler/script_compiler.rb#18
|
282
|
+
def initialize(identity, options); end
|
283
|
+
|
284
|
+
# source://haml//lib/haml/compiler/script_compiler.rb#23
|
285
|
+
def compile(node, &block); end
|
286
|
+
|
287
|
+
private
|
288
|
+
|
289
|
+
# String-interpolated plain text must be compiled with this method
|
290
|
+
# because we have to escape only interpolated values.
|
291
|
+
#
|
292
|
+
# source://haml//lib/haml/compiler/script_compiler.rb#45
|
293
|
+
def compile_interpolated_plain(node); end
|
294
|
+
|
295
|
+
# source://haml//lib/haml/compiler/script_compiler.rb#82
|
296
|
+
def compile_script_assign(var, node, &block); end
|
297
|
+
|
298
|
+
# source://haml//lib/haml/compiler/script_compiler.rb#98
|
299
|
+
def compile_script_result(result, node); end
|
300
|
+
|
301
|
+
# :dynamic is optimized in other filter: StringSplitter
|
302
|
+
#
|
303
|
+
# source://haml//lib/haml/compiler/script_compiler.rb#59
|
304
|
+
def delegate_optimization(node); end
|
305
|
+
|
306
|
+
# source://haml//lib/haml/compiler/script_compiler.rb#76
|
307
|
+
def dynamic_compile(node, &block); end
|
308
|
+
|
309
|
+
# source://haml//lib/haml/compiler/script_compiler.rb#109
|
310
|
+
def escape_html(temple); end
|
311
|
+
|
312
|
+
# source://haml//lib/haml/compiler/script_compiler.rb#105
|
313
|
+
def find_and_preserve(code); end
|
314
|
+
|
315
|
+
# source://haml//lib/haml/compiler/script_compiler.rb#66
|
316
|
+
def static_compile(node); end
|
317
|
+
|
318
|
+
class << self
|
319
|
+
# source://haml//lib/haml/compiler/script_compiler.rb#9
|
320
|
+
def find_and_preserve(input, tags); end
|
321
|
+
end
|
322
|
+
end
|
323
|
+
|
324
|
+
# source://haml//lib/haml/compiler/silent_script_compiler.rb#4
|
325
|
+
class Haml::Compiler::SilentScriptCompiler
|
326
|
+
# source://haml//lib/haml/compiler/silent_script_compiler.rb#5
|
327
|
+
def compile(node, &block); end
|
328
|
+
|
329
|
+
private
|
330
|
+
|
331
|
+
# source://haml//lib/haml/compiler/silent_script_compiler.rb#15
|
332
|
+
def compile_with_children(node, &block); end
|
333
|
+
end
|
334
|
+
|
335
|
+
# source://haml//lib/haml/compiler/tag_compiler.rb#8
|
336
|
+
class Haml::Compiler::TagCompiler
|
337
|
+
# @return [TagCompiler] a new instance of TagCompiler
|
338
|
+
#
|
339
|
+
# source://haml//lib/haml/compiler/tag_compiler.rb#9
|
340
|
+
def initialize(identity, options); end
|
341
|
+
|
342
|
+
# source://haml//lib/haml/compiler/tag_compiler.rb#15
|
343
|
+
def compile(node, &block); end
|
344
|
+
|
345
|
+
private
|
346
|
+
|
347
|
+
# source://haml//lib/haml/compiler/tag_compiler.rb#23
|
348
|
+
def compile_contents(node, &block); end
|
349
|
+
|
350
|
+
# We should handle interpolation here to escape only interpolated values.
|
351
|
+
#
|
352
|
+
# source://haml//lib/haml/compiler/tag_compiler.rb#57
|
353
|
+
def compile_interpolated_plain(node); end
|
354
|
+
|
355
|
+
# :dynamic is optimized in other filters: StringSplitter or StaticAnalyzer
|
356
|
+
#
|
357
|
+
# source://haml//lib/haml/compiler/tag_compiler.rb#49
|
358
|
+
def delegate_optimization(node); end
|
359
|
+
|
360
|
+
# @return [Boolean]
|
361
|
+
#
|
362
|
+
# source://haml//lib/haml/compiler/tag_compiler.rb#70
|
363
|
+
def self_closing?(node); end
|
364
|
+
end
|
365
|
+
|
366
|
+
# Compile [:multi, [:static, 'foo'], [:dynamic, 'bar']] to [:dynamic, '"foo#{bar}"']
|
367
|
+
#
|
368
|
+
# source://haml//lib/haml/dynamic_merger.rb#4
|
369
|
+
class Haml::DynamicMerger < ::Temple::Filter
|
370
|
+
# source://haml//lib/haml/dynamic_merger.rb#5
|
371
|
+
def on_multi(*exps); end
|
372
|
+
|
373
|
+
private
|
374
|
+
|
375
|
+
# source://haml//lib/haml/dynamic_merger.rb#55
|
376
|
+
def count_newline(exps); end
|
377
|
+
|
378
|
+
# source://haml//lib/haml/dynamic_merger.rb#33
|
379
|
+
def merge_dynamic(exps); end
|
380
|
+
end
|
381
|
+
|
382
|
+
# source://haml//lib/haml/engine.rb#15
|
383
|
+
class Haml::Engine < ::Temple::Engine; end
|
384
|
+
|
385
|
+
# source://haml//lib/haml/error.rb#3
|
386
|
+
class Haml::Error < ::StandardError
|
387
|
+
# @param message [String] The error message
|
388
|
+
# @param line [Fixnum] See \{#line}
|
389
|
+
# @return [Error] a new instance of Error
|
390
|
+
#
|
391
|
+
# source://haml//lib/haml/error.rb#49
|
392
|
+
def initialize(message = T.unsafe(nil), line = T.unsafe(nil)); end
|
393
|
+
|
394
|
+
# The line of the template on which the error occurred.
|
395
|
+
#
|
396
|
+
# @return [Fixnum]
|
397
|
+
#
|
398
|
+
# source://haml//lib/haml/error.rb#45
|
399
|
+
def line; end
|
400
|
+
|
401
|
+
class << self
|
402
|
+
# source://haml//lib/haml/error.rb#37
|
403
|
+
def message(key, *args); end
|
404
|
+
end
|
405
|
+
end
|
406
|
+
|
407
|
+
# source://haml//lib/haml/error.rb#4
|
408
|
+
Haml::Error::MESSAGES = T.let(T.unsafe(nil), Hash)
|
409
|
+
|
410
|
+
# source://haml//lib/haml/escape.rb#5
|
411
|
+
class Haml::Escape < ::Temple::Filters::Escapable
|
412
|
+
# @return [Escape] a new instance of Escape
|
413
|
+
#
|
414
|
+
# source://haml//lib/haml/escape.rb#6
|
415
|
+
def initialize(opts = T.unsafe(nil)); end
|
416
|
+
end
|
417
|
+
|
418
|
+
# Unlike Haml::Escape, this calls to_s when not escaped.
|
419
|
+
#
|
420
|
+
# source://haml//lib/haml/escape_any.rb#14
|
421
|
+
class Haml::EscapeAny < ::Haml::Escape
|
422
|
+
# source://haml//lib/haml/escape_any.rb#17
|
423
|
+
def on_dynamic(value); end
|
424
|
+
|
425
|
+
# source://temple/0.10.3/lib/temple/filters/escapable.rb#24
|
426
|
+
def on_escapeany(flag, exp); end
|
427
|
+
end
|
428
|
+
|
429
|
+
# This module allows Temple::Filter to dispatch :fescape on `#compile`.
|
430
|
+
#
|
431
|
+
# source://haml//lib/haml/escape_any.rb#6
|
432
|
+
module Haml::EscapeanyDispathcer
|
433
|
+
# source://haml//lib/haml/escape_any.rb#7
|
434
|
+
def on_escapeany(flag, exp); end
|
435
|
+
end
|
436
|
+
|
437
|
+
# This module allows Temple::Filter to dispatch :fescape on `#compile`.
|
438
|
+
#
|
439
|
+
# source://haml//lib/haml/force_escape.rb#6
|
440
|
+
module Haml::FescapeDispathcer
|
441
|
+
# source://haml//lib/haml/force_escape.rb#7
|
442
|
+
def on_fescape(flag, exp); end
|
443
|
+
end
|
444
|
+
|
445
|
+
# An invalid filter name was used.
|
446
|
+
#
|
447
|
+
# source://haml//lib/haml/error.rb#62
|
448
|
+
class Haml::FilterNotFound < ::Haml::Error; end
|
449
|
+
|
450
|
+
# source://haml//lib/haml/filters/base.rb#5
|
451
|
+
class Haml::Filters
|
452
|
+
# @return [Filters] a new instance of Filters
|
453
|
+
#
|
454
|
+
# source://haml//lib/haml/filters.rb#55
|
455
|
+
def initialize(options = T.unsafe(nil)); end
|
456
|
+
|
457
|
+
# source://haml//lib/haml/filters.rb#60
|
458
|
+
def compile(node); end
|
459
|
+
|
460
|
+
private
|
461
|
+
|
462
|
+
# @raise [FilterNotFound]
|
463
|
+
#
|
464
|
+
# source://haml//lib/haml/filters.rb#67
|
465
|
+
def find_compiler(node); end
|
466
|
+
|
467
|
+
class << self
|
468
|
+
# Returns the value of attribute registered.
|
469
|
+
#
|
470
|
+
# source://haml//lib/haml/filters.rb#24
|
471
|
+
def registered; end
|
472
|
+
|
473
|
+
# source://haml//lib/haml/filters.rb#26
|
474
|
+
def remove_filter(name); end
|
475
|
+
|
476
|
+
private
|
477
|
+
|
478
|
+
# source://haml//lib/haml/filters.rb#35
|
479
|
+
def register(name, compiler); end
|
480
|
+
end
|
481
|
+
end
|
482
|
+
|
483
|
+
# source://haml//lib/haml/filters/base.rb#6
|
484
|
+
class Haml::Filters::Base
|
485
|
+
# @return [Base] a new instance of Base
|
486
|
+
#
|
487
|
+
# source://haml//lib/haml/filters/base.rb#7
|
488
|
+
def initialize(options = T.unsafe(nil)); end
|
489
|
+
end
|
490
|
+
|
491
|
+
# source://haml//lib/haml/filters/cdata.rb#4
|
492
|
+
class Haml::Filters::Cdata < ::Haml::Filters::TextBase
|
493
|
+
# source://haml//lib/haml/filters/cdata.rb#5
|
494
|
+
def compile(node); end
|
495
|
+
|
496
|
+
private
|
497
|
+
|
498
|
+
# source://haml//lib/haml/filters/cdata.rb#11
|
499
|
+
def compile_cdata(node); end
|
500
|
+
end
|
501
|
+
|
502
|
+
# source://haml//lib/haml/filters/coffee.rb#4
|
503
|
+
class Haml::Filters::Coffee < ::Haml::Filters::TiltBase
|
504
|
+
# source://haml//lib/haml/filters/coffee.rb#5
|
505
|
+
def compile(node); end
|
506
|
+
end
|
507
|
+
|
508
|
+
# source://haml//lib/haml/filters/coffee.rb#15
|
509
|
+
Haml::Filters::CoffeeScript = Haml::Filters::Coffee
|
510
|
+
|
511
|
+
# source://haml//lib/haml/filters/css.rb#4
|
512
|
+
class Haml::Filters::Css < ::Haml::Filters::TextBase
|
513
|
+
# source://haml//lib/haml/filters/css.rb#5
|
514
|
+
def compile(node); end
|
515
|
+
|
516
|
+
private
|
517
|
+
|
518
|
+
# source://haml//lib/haml/filters/css.rb#16
|
519
|
+
def compile_html(node); end
|
520
|
+
|
521
|
+
# source://haml//lib/haml/filters/css.rb#24
|
522
|
+
def compile_xhtml(node); end
|
523
|
+
end
|
524
|
+
|
525
|
+
# source://haml//lib/haml/filters/erb.rb#4
|
526
|
+
class Haml::Filters::Erb < ::Haml::Filters::TiltBase
|
527
|
+
# source://haml//lib/haml/filters/erb.rb#5
|
528
|
+
def compile(node); end
|
529
|
+
end
|
530
|
+
|
531
|
+
# source://haml//lib/haml/filters/escaped.rb#4
|
532
|
+
class Haml::Filters::Escaped < ::Haml::Filters::Base
|
533
|
+
# source://haml//lib/haml/filters/escaped.rb#5
|
534
|
+
def compile(node); end
|
535
|
+
|
536
|
+
private
|
537
|
+
|
538
|
+
# source://haml//lib/haml/filters/escaped.rb#13
|
539
|
+
def compile_text(text); end
|
540
|
+
end
|
541
|
+
|
542
|
+
# source://haml//lib/haml/filters/javascript.rb#4
|
543
|
+
class Haml::Filters::Javascript < ::Haml::Filters::TextBase
|
544
|
+
# source://haml//lib/haml/filters/javascript.rb#5
|
545
|
+
def compile(node); end
|
546
|
+
|
547
|
+
private
|
548
|
+
|
549
|
+
# source://haml//lib/haml/filters/javascript.rb#16
|
550
|
+
def compile_html(node); end
|
551
|
+
|
552
|
+
# source://haml//lib/haml/filters/javascript.rb#24
|
553
|
+
def compile_xhtml(node); end
|
554
|
+
end
|
555
|
+
|
556
|
+
# source://haml//lib/haml/filters/less.rb#9
|
557
|
+
class Haml::Filters::Less < ::Haml::Filters::TiltBase
|
558
|
+
# source://haml//lib/haml/filters/less.rb#10
|
559
|
+
def compile(node); end
|
560
|
+
end
|
561
|
+
|
562
|
+
# source://haml//lib/haml/filters/markdown.rb#4
|
563
|
+
class Haml::Filters::Markdown < ::Haml::Filters::TiltBase
|
564
|
+
# source://haml//lib/haml/filters/markdown.rb#5
|
565
|
+
def compile(node); end
|
566
|
+
end
|
567
|
+
|
568
|
+
# source://haml//lib/haml/filters/plain.rb#6
|
569
|
+
class Haml::Filters::Plain < ::Haml::Filters::Base
|
570
|
+
# source://haml//lib/haml/filters/plain.rb#7
|
571
|
+
def compile(node); end
|
572
|
+
|
573
|
+
private
|
574
|
+
|
575
|
+
# source://haml//lib/haml/filters/plain.rb#15
|
576
|
+
def compile_plain(text); end
|
577
|
+
end
|
578
|
+
|
579
|
+
# source://haml//lib/haml/filters/preserve.rb#4
|
580
|
+
class Haml::Filters::Preserve < ::Haml::Filters::Base
|
581
|
+
# source://haml//lib/haml/filters/preserve.rb#5
|
582
|
+
def compile(node); end
|
583
|
+
|
584
|
+
private
|
585
|
+
|
586
|
+
# source://haml//lib/haml/filters/preserve.rb#13
|
587
|
+
def compile_text(text); end
|
588
|
+
end
|
589
|
+
|
590
|
+
# source://haml//lib/haml/filters/ruby.rb#4
|
591
|
+
class Haml::Filters::Ruby < ::Haml::Filters::Base
|
592
|
+
# source://haml//lib/haml/filters/ruby.rb#5
|
593
|
+
def compile(node); end
|
594
|
+
end
|
595
|
+
|
596
|
+
# source://haml//lib/haml/filters/sass.rb#4
|
597
|
+
class Haml::Filters::Sass < ::Haml::Filters::TiltBase
|
598
|
+
# source://haml//lib/haml/filters/sass.rb#5
|
599
|
+
def compile(node); end
|
600
|
+
end
|
601
|
+
|
602
|
+
# source://haml//lib/haml/filters/scss.rb#4
|
603
|
+
class Haml::Filters::Scss < ::Haml::Filters::TiltBase
|
604
|
+
# source://haml//lib/haml/filters/scss.rb#5
|
605
|
+
def compile(node); end
|
606
|
+
end
|
607
|
+
|
608
|
+
# source://haml//lib/haml/filters/text_base.rb#4
|
609
|
+
class Haml::Filters::TextBase < ::Haml::Filters::Base
|
610
|
+
# source://haml//lib/haml/filters/text_base.rb#5
|
611
|
+
def compile_text!(temple, node, prefix); end
|
612
|
+
end
|
613
|
+
|
614
|
+
# source://haml//lib/haml/filters/tilt_base.rb#6
|
615
|
+
class Haml::Filters::TiltBase < ::Haml::Filters::Base
|
616
|
+
# @return [Boolean]
|
617
|
+
#
|
618
|
+
# source://haml//lib/haml/filters/tilt_base.rb#17
|
619
|
+
def explicit_require?(needed_registration); end
|
620
|
+
|
621
|
+
private
|
622
|
+
|
623
|
+
# source://haml//lib/haml/filters/tilt_base.rb#30
|
624
|
+
def compile_with_tilt(node, name, indent_width: T.unsafe(nil)); end
|
625
|
+
|
626
|
+
# source://haml//lib/haml/filters/tilt_base.rb#46
|
627
|
+
def dynamic_compile(node, name, indent_width: T.unsafe(nil)); end
|
628
|
+
|
629
|
+
# TODO: support interpolation
|
630
|
+
#
|
631
|
+
# source://haml//lib/haml/filters/tilt_base.rb#25
|
632
|
+
def precompiled_with_tilt(node, name); end
|
633
|
+
|
634
|
+
# source://haml//lib/haml/filters/tilt_base.rb#38
|
635
|
+
def static_compile(node, name, indent_width: T.unsafe(nil)); end
|
636
|
+
|
637
|
+
class << self
|
638
|
+
# source://haml//lib/haml/filters/tilt_base.rb#7
|
639
|
+
def render(name, source, indent_width: T.unsafe(nil)); end
|
640
|
+
end
|
641
|
+
end
|
642
|
+
|
643
|
+
# Unlike Haml::Escape, this escapes value even if it's html_safe.
|
644
|
+
#
|
645
|
+
# source://haml//lib/haml/force_escape.rb#14
|
646
|
+
class Haml::ForceEscape < ::Haml::Escape
|
647
|
+
# @return [ForceEscape] a new instance of ForceEscape
|
648
|
+
#
|
649
|
+
# source://haml//lib/haml/force_escape.rb#15
|
650
|
+
def initialize(opts = T.unsafe(nil)); end
|
651
|
+
|
652
|
+
# ForceEscape doesn't touch :escape expression.
|
653
|
+
# This method is not used if it's inserted after Haml::Escape.
|
654
|
+
#
|
655
|
+
# source://haml//lib/haml/force_escape.rb#25
|
656
|
+
def on_escape(flag, exp); end
|
657
|
+
|
658
|
+
# source://temple/0.10.3/lib/temple/filters/escapable.rb#24
|
659
|
+
def on_fescape(flag, exp); end
|
660
|
+
end
|
661
|
+
|
662
|
+
# source://haml//lib/haml/html.rb#3
|
663
|
+
class Haml::HTML < ::Temple::HTML::Fast
|
664
|
+
# @return [HTML] a new instance of HTML
|
665
|
+
#
|
666
|
+
# source://haml//lib/haml/html.rb#6
|
667
|
+
def initialize(opts = T.unsafe(nil)); end
|
668
|
+
|
669
|
+
# This dispatcher supports Haml's "revealed" conditional comment.
|
670
|
+
#
|
671
|
+
# source://haml//lib/haml/html.rb#15
|
672
|
+
def on_html_condcomment(condition, content, revealed = T.unsafe(nil)); end
|
673
|
+
end
|
674
|
+
|
675
|
+
# source://haml//lib/haml/html.rb#4
|
676
|
+
Haml::HTML::DEPRECATED_FORMATS = T.let(T.unsafe(nil), Array)
|
677
|
+
|
678
|
+
# source://haml//lib/haml/helpers.rb#3
|
679
|
+
module Haml::Helpers
|
680
|
+
# source://haml//lib/haml/helpers.rb#11
|
681
|
+
def preserve(input); end
|
682
|
+
|
683
|
+
class << self
|
684
|
+
# source://haml//lib/haml/helpers.rb#4
|
685
|
+
def preserve(input); end
|
686
|
+
end
|
687
|
+
end
|
688
|
+
|
689
|
+
# source://haml//lib/haml/identity.rb#3
|
690
|
+
class Haml::Identity
|
691
|
+
# @return [Identity] a new instance of Identity
|
692
|
+
#
|
693
|
+
# source://haml//lib/haml/identity.rb#4
|
694
|
+
def initialize; end
|
695
|
+
|
696
|
+
# source://haml//lib/haml/identity.rb#8
|
697
|
+
def generate; end
|
698
|
+
end
|
699
|
+
|
700
|
+
# InternalError means that you hit a bug of Haml itself.
|
701
|
+
#
|
702
|
+
# source://haml//lib/haml/error.rb#65
|
703
|
+
class Haml::InternalError < ::Haml::Error; end
|
704
|
+
|
705
|
+
# source://haml//lib/haml/object_ref.rb#3
|
706
|
+
module Haml::ObjectRef
|
707
|
+
class << self
|
708
|
+
# source://haml//lib/haml/object_ref.rb#5
|
709
|
+
def parse(args); end
|
710
|
+
|
711
|
+
private
|
712
|
+
|
713
|
+
# Haml::Buffer.underscore
|
714
|
+
#
|
715
|
+
# source://haml//lib/haml/object_ref.rb#24
|
716
|
+
def underscore(camel_cased_word); end
|
717
|
+
end
|
718
|
+
end
|
719
|
+
|
720
|
+
# source://haml//lib/haml/parser.rb#9
|
721
|
+
class Haml::Parser
|
722
|
+
include ::Haml::Util
|
723
|
+
|
724
|
+
# @return [Parser] a new instance of Parser
|
725
|
+
#
|
726
|
+
# source://haml//lib/haml/parser.rb#99
|
727
|
+
def initialize(options); end
|
728
|
+
|
729
|
+
# source://haml//lib/haml/parser.rb#112
|
730
|
+
def call(template); end
|
731
|
+
|
732
|
+
# @raise [SyntaxError]
|
733
|
+
#
|
734
|
+
# source://haml//lib/haml/parser.rb#169
|
735
|
+
def compute_tabs(line); end
|
736
|
+
|
737
|
+
# Returns the value of attribute root.
|
738
|
+
#
|
739
|
+
# source://haml//lib/haml/parser.rb#12
|
740
|
+
def root; end
|
741
|
+
|
742
|
+
private
|
743
|
+
|
744
|
+
# source://haml//lib/haml/parser.rb#844
|
745
|
+
def balance(*args); end
|
746
|
+
|
747
|
+
# Unlike #balance, this balances Ripper tokens to balance something like `{ a: "}" }` correctly.
|
748
|
+
#
|
749
|
+
# @raise [SyntaxError]
|
750
|
+
#
|
751
|
+
# source://haml//lib/haml/parser.rb#849
|
752
|
+
def balance_tokens(buf, start, finish, count: T.unsafe(nil)); end
|
753
|
+
|
754
|
+
# source://haml//lib/haml/parser.rb#316
|
755
|
+
def block_keyword(text); end
|
756
|
+
|
757
|
+
# @return [Boolean]
|
758
|
+
#
|
759
|
+
# source://haml//lib/haml/parser.rb#867
|
760
|
+
def block_opened?; end
|
761
|
+
|
762
|
+
# source://haml//lib/haml/parser.rb#387
|
763
|
+
def check_push_script_stack(keyword); end
|
764
|
+
|
765
|
+
# source://haml//lib/haml/parser.rb#543
|
766
|
+
def close; end
|
767
|
+
|
768
|
+
# source://haml//lib/haml/parser.rb#549
|
769
|
+
def close_filter(_); end
|
770
|
+
|
771
|
+
# source://haml//lib/haml/parser.rb#557
|
772
|
+
def close_flat_section; end
|
773
|
+
|
774
|
+
# source://haml//lib/haml/parser.rb#553
|
775
|
+
def close_haml_comment(_); end
|
776
|
+
|
777
|
+
# source://haml//lib/haml/parser.rb#563
|
778
|
+
def close_script(node); end
|
779
|
+
|
780
|
+
# source://haml//lib/haml/parser.rb#563
|
781
|
+
def close_silent_script(node); end
|
782
|
+
|
783
|
+
# @return [Boolean]
|
784
|
+
#
|
785
|
+
# source://haml//lib/haml/parser.rb#798
|
786
|
+
def closes_flat?(line); end
|
787
|
+
|
788
|
+
# Renders an XHTML comment.
|
789
|
+
#
|
790
|
+
# source://haml//lib/haml/parser.rb#498
|
791
|
+
def comment(text); end
|
792
|
+
|
793
|
+
# @return [Boolean]
|
794
|
+
#
|
795
|
+
# source://haml//lib/haml/parser.rb#267
|
796
|
+
def continuation_script?(text); end
|
797
|
+
|
798
|
+
# Renders a line that creates an XHTML tag and has an implicit div because of
|
799
|
+
# `.` or `#`.
|
800
|
+
#
|
801
|
+
# source://haml//lib/haml/parser.rb#492
|
802
|
+
def div(line); end
|
803
|
+
|
804
|
+
# Renders an XHTML doctype or XML shebang.
|
805
|
+
#
|
806
|
+
# @raise [SyntaxError]
|
807
|
+
#
|
808
|
+
# source://haml//lib/haml/parser.rb#524
|
809
|
+
def doctype(text); end
|
810
|
+
|
811
|
+
# source://haml//lib/haml/parser.rb#196
|
812
|
+
def error_with_lineno(error); end
|
813
|
+
|
814
|
+
# @raise [Error]
|
815
|
+
#
|
816
|
+
# source://haml//lib/haml/parser.rb#530
|
817
|
+
def filter(name); end
|
818
|
+
|
819
|
+
# Same semantics as block_opened?, except that block_opened? uses Line#tabs,
|
820
|
+
# which doesn't interact well with filter lines
|
821
|
+
#
|
822
|
+
# @return [Boolean]
|
823
|
+
#
|
824
|
+
# source://haml//lib/haml/parser.rb#873
|
825
|
+
def filter_opened?; end
|
826
|
+
|
827
|
+
# @return [Boolean]
|
828
|
+
#
|
829
|
+
# source://haml//lib/haml/parser.rb#877
|
830
|
+
def flat?; end
|
831
|
+
|
832
|
+
# @raise [SyntaxError]
|
833
|
+
#
|
834
|
+
# source://haml//lib/haml/parser.rb#352
|
835
|
+
def flat_script(line, escape_html = T.unsafe(nil)); end
|
836
|
+
|
837
|
+
# source://haml//lib/haml/parser.rb#397
|
838
|
+
def haml_comment(text); end
|
839
|
+
|
840
|
+
# source://haml//lib/haml/parser.rb#802
|
841
|
+
def handle_multiline(line); end
|
842
|
+
|
843
|
+
# source://haml//lib/haml/parser.rb#820
|
844
|
+
def handle_ruby_multiline(line); end
|
845
|
+
|
846
|
+
# Checks whether or not `line` is in a multiline sequence.
|
847
|
+
#
|
848
|
+
# @return [Boolean]
|
849
|
+
#
|
850
|
+
# source://haml//lib/haml/parser.rb#816
|
851
|
+
def is_multiline?(text); end
|
852
|
+
|
853
|
+
# `text' is a Ruby multiline block if it:
|
854
|
+
# - ends with a comma
|
855
|
+
# - but not "?," which is a character literal
|
856
|
+
# (however, "x?," is a method call and not a literal)
|
857
|
+
# - and not "?\," which is a character literal
|
858
|
+
#
|
859
|
+
# @return [Boolean]
|
860
|
+
#
|
861
|
+
# source://haml//lib/haml/parser.rb#839
|
862
|
+
def is_ruby_multiline?(text); end
|
863
|
+
|
864
|
+
# @return [Boolean]
|
865
|
+
#
|
866
|
+
# source://haml//lib/haml/parser.rb#271
|
867
|
+
def mid_block_keyword?(text); end
|
868
|
+
|
869
|
+
# source://haml//lib/haml/parser.rb#780
|
870
|
+
def next_line; end
|
871
|
+
|
872
|
+
# source://haml//lib/haml/parser.rb#751
|
873
|
+
def parse_new_attribute(scanner); end
|
874
|
+
|
875
|
+
# @return [Array<Hash,String,nil>] - [static_attributes (Hash), dynamic_attributes (nil or String starting with `{` and ending with `}`)]
|
876
|
+
# @return [String] rest
|
877
|
+
# @return [Integer] last_line
|
878
|
+
#
|
879
|
+
# source://haml//lib/haml/parser.rb#710
|
880
|
+
def parse_new_attributes(text); end
|
881
|
+
|
882
|
+
# @return [String] attributes_hash - Hash literal starting with `{` and ending with `}`
|
883
|
+
# @return [String] rest
|
884
|
+
# @return [Integer] last_line
|
885
|
+
#
|
886
|
+
# source://haml//lib/haml/parser.rb#682
|
887
|
+
def parse_old_attributes(text); end
|
888
|
+
|
889
|
+
# This method doesn't use Haml::HamlAttributeParser because currently it depends on Ripper and Rubinius doesn't provide it.
|
890
|
+
# Ideally this logic should be placed in Haml::HamlAttributeParser instead of here and this method should use it.
|
891
|
+
#
|
892
|
+
# @param text [String] - Hash literal or text inside old attributes
|
893
|
+
# @return [Hash, nil] - Return nil if text is not static Hash literal
|
894
|
+
#
|
895
|
+
# source://haml//lib/haml/parser.rb#609
|
896
|
+
def parse_static_hash(text); end
|
897
|
+
|
898
|
+
# Parses a line into tag_name, attributes, attributes_hash, object_ref, action, value
|
899
|
+
#
|
900
|
+
# @raise [SyntaxError]
|
901
|
+
#
|
902
|
+
# source://haml//lib/haml/parser.rb#627
|
903
|
+
def parse_tag(text); end
|
904
|
+
|
905
|
+
# source://haml//lib/haml/parser.rb#326
|
906
|
+
def plain(line, escape_html = T.unsafe(nil)); end
|
907
|
+
|
908
|
+
# Processes and deals with lowering indentation.
|
909
|
+
#
|
910
|
+
# source://haml//lib/haml/parser.rb#260
|
911
|
+
def process_indent(line); end
|
912
|
+
|
913
|
+
# Processes a single line of Haml.
|
914
|
+
#
|
915
|
+
# This method doesn't return anything; it simply processes the line and
|
916
|
+
# adds the appropriate code to `@precompiled`.
|
917
|
+
#
|
918
|
+
# source://haml//lib/haml/parser.rb#279
|
919
|
+
def process_line(line); end
|
920
|
+
|
921
|
+
# source://haml//lib/haml/parser.rb#321
|
922
|
+
def push(node); end
|
923
|
+
|
924
|
+
# @raise [SyntaxError]
|
925
|
+
#
|
926
|
+
# source://haml//lib/haml/parser.rb#340
|
927
|
+
def script(line, escape_html = T.unsafe(nil), preserve = T.unsafe(nil)); end
|
928
|
+
|
929
|
+
# @raise [SyntaxError]
|
930
|
+
#
|
931
|
+
# source://haml//lib/haml/parser.rb#357
|
932
|
+
def silent_script(line); end
|
933
|
+
|
934
|
+
# @raise [SyntaxError]
|
935
|
+
#
|
936
|
+
# source://haml//lib/haml/parser.rb#410
|
937
|
+
def tag(line); end
|
938
|
+
|
939
|
+
class << self
|
940
|
+
# This is a class method so it can be accessed from {Haml::HamlHelpers}.
|
941
|
+
#
|
942
|
+
# Iterates through the classes and ids supplied through `.`
|
943
|
+
# and `#` syntax, and returns a hash with them as attributes,
|
944
|
+
# that can then be merged with another attributes hash.
|
945
|
+
#
|
946
|
+
# source://haml//lib/haml/parser.rb#585
|
947
|
+
def parse_class_and_id(list); end
|
948
|
+
end
|
949
|
+
end
|
950
|
+
|
951
|
+
# source://haml//lib/haml/parser.rb#85
|
952
|
+
Haml::Parser::BLOCK_KEYWORD_REGEX = T.let(T.unsafe(nil), Regexp)
|
953
|
+
|
954
|
+
# Regex to check for blocks with spaces around arguments. Not to be confused
|
955
|
+
# with multiline script.
|
956
|
+
# For example:
|
957
|
+
# foo.each do | bar |
|
958
|
+
# = bar
|
959
|
+
#
|
960
|
+
# source://haml//lib/haml/parser.rb#79
|
961
|
+
Haml::Parser::BLOCK_WITH_SPACES = T.let(T.unsafe(nil), Regexp)
|
962
|
+
|
963
|
+
# source://haml//lib/haml/parser.rb#94
|
964
|
+
Haml::Parser::CLASS_KEY = T.let(T.unsafe(nil), String)
|
965
|
+
|
966
|
+
# Designates an XHTML/XML comment.
|
967
|
+
#
|
968
|
+
# source://haml//lib/haml/parser.rb#24
|
969
|
+
Haml::Parser::COMMENT = T.let(T.unsafe(nil), String)
|
970
|
+
|
971
|
+
# Designates a `<div>` element with the given class.
|
972
|
+
#
|
973
|
+
# source://haml//lib/haml/parser.rb#18
|
974
|
+
Haml::Parser::DIV_CLASS = T.let(T.unsafe(nil), String)
|
975
|
+
|
976
|
+
# Designates a `<div>` element with the given id.
|
977
|
+
#
|
978
|
+
# source://haml//lib/haml/parser.rb#21
|
979
|
+
Haml::Parser::DIV_ID = T.let(T.unsafe(nil), String)
|
980
|
+
|
981
|
+
# Designates an XHTML doctype or script that is never HTML-escaped.
|
982
|
+
#
|
983
|
+
# source://haml//lib/haml/parser.rb#27
|
984
|
+
Haml::Parser::DOCTYPE = T.let(T.unsafe(nil), String)
|
985
|
+
|
986
|
+
# The Regex that matches a Doctype command.
|
987
|
+
#
|
988
|
+
# source://haml//lib/haml/parser.rb#88
|
989
|
+
Haml::Parser::DOCTYPE_REGEX = T.let(T.unsafe(nil), Regexp)
|
990
|
+
|
991
|
+
# @param new [String] - Hash literal including dynamic values.
|
992
|
+
# @param old [String] - Hash literal including dynamic values or Ruby literal of multiple Hashes which MUST be interpreted as method's last arguments.
|
993
|
+
#
|
994
|
+
# source://haml//lib/haml/parser.rb#236
|
995
|
+
class Haml::Parser::DynamicAttributes < ::Struct
|
996
|
+
# Returns the value of attribute new
|
997
|
+
#
|
998
|
+
# @return [Object] the current value of new
|
999
|
+
def new; end
|
1000
|
+
|
1001
|
+
# Sets the attribute new
|
1002
|
+
#
|
1003
|
+
# @param value [Object] the value to set the attribute new to.
|
1004
|
+
# @return [Object] the newly set value
|
1005
|
+
def new=(_); end
|
1006
|
+
|
1007
|
+
# Returns the value of attribute old
|
1008
|
+
#
|
1009
|
+
# @return [Object] the current value of old
|
1010
|
+
def old; end
|
1011
|
+
|
1012
|
+
# Sets the attribute old
|
1013
|
+
#
|
1014
|
+
# @param value [Object] the value to set the attribute old to.
|
1015
|
+
# @return [Object] the newly set value
|
1016
|
+
#
|
1017
|
+
# source://haml//lib/haml/parser.rb#238
|
1018
|
+
def old=(value); end
|
1019
|
+
|
1020
|
+
# This will be a literal for Haml::HamlBuffer#attributes's last argument, `attributes_hashes`.
|
1021
|
+
#
|
1022
|
+
# source://haml//lib/haml/parser.rb#246
|
1023
|
+
def to_literal; end
|
1024
|
+
|
1025
|
+
private
|
1026
|
+
|
1027
|
+
# For `%foo{ { foo: 1 }, bar: 2 }`, :old is "{ { foo: 1 }, bar: 2 }" and this method returns " { foo: 1 }, bar: 2 " for last argument.
|
1028
|
+
#
|
1029
|
+
# source://haml//lib/haml/parser.rb#253
|
1030
|
+
def stripped_old; end
|
1031
|
+
|
1032
|
+
class << self
|
1033
|
+
def [](*_arg0); end
|
1034
|
+
def inspect; end
|
1035
|
+
def keyword_init?; end
|
1036
|
+
def members; end
|
1037
|
+
def new(*_arg0); end
|
1038
|
+
end
|
1039
|
+
end
|
1040
|
+
|
1041
|
+
# Designates an XHTML/XML element.
|
1042
|
+
#
|
1043
|
+
# source://haml//lib/haml/parser.rb#15
|
1044
|
+
Haml::Parser::ELEMENT = T.let(T.unsafe(nil), String)
|
1045
|
+
|
1046
|
+
# Designates a non-parsed line.
|
1047
|
+
#
|
1048
|
+
# source://haml//lib/haml/parser.rb#45
|
1049
|
+
Haml::Parser::ESCAPE = T.let(T.unsafe(nil), String)
|
1050
|
+
|
1051
|
+
# Designates a block of filtered text.
|
1052
|
+
#
|
1053
|
+
# source://haml//lib/haml/parser.rb#48
|
1054
|
+
Haml::Parser::FILTER = T.let(T.unsafe(nil), String)
|
1055
|
+
|
1056
|
+
# Designates script, the result of which is flattened and output.
|
1057
|
+
#
|
1058
|
+
# source://haml//lib/haml/parser.rb#36
|
1059
|
+
Haml::Parser::FLAT_SCRIPT = T.let(T.unsafe(nil), String)
|
1060
|
+
|
1061
|
+
# source://haml//lib/haml/parser.rb#93
|
1062
|
+
Haml::Parser::ID_KEY = T.let(T.unsafe(nil), String)
|
1063
|
+
|
1064
|
+
# The Regex that matches a literal string or symbol value
|
1065
|
+
#
|
1066
|
+
# source://haml//lib/haml/parser.rb#91
|
1067
|
+
Haml::Parser::LITERAL_VALUE_REGEX = T.let(T.unsafe(nil), Regexp)
|
1068
|
+
|
1069
|
+
# @private
|
1070
|
+
#
|
1071
|
+
# source://haml//lib/haml/parser.rb#207
|
1072
|
+
class Haml::Parser::Line < ::Struct
|
1073
|
+
# Returns the value of attribute eod
|
1074
|
+
#
|
1075
|
+
# @return [Object] the current value of eod
|
1076
|
+
def eod; end
|
1077
|
+
|
1078
|
+
# Sets the attribute eod
|
1079
|
+
#
|
1080
|
+
# @param value [Object] the value to set the attribute eod to.
|
1081
|
+
# @return [Object] the newly set value
|
1082
|
+
def eod=(_); end
|
1083
|
+
|
1084
|
+
# Returns the value of attribute eod
|
1085
|
+
#
|
1086
|
+
# @return [Object] the current value of eod
|
1087
|
+
def eod?; end
|
1088
|
+
|
1089
|
+
# Returns the value of attribute full
|
1090
|
+
#
|
1091
|
+
# @return [Object] the current value of full
|
1092
|
+
def full; end
|
1093
|
+
|
1094
|
+
# Sets the attribute full
|
1095
|
+
#
|
1096
|
+
# @param value [Object] the value to set the attribute full to.
|
1097
|
+
# @return [Object] the newly set value
|
1098
|
+
def full=(_); end
|
1099
|
+
|
1100
|
+
# Returns the value of attribute index
|
1101
|
+
#
|
1102
|
+
# @return [Object] the current value of index
|
1103
|
+
def index; end
|
1104
|
+
|
1105
|
+
# Sets the attribute index
|
1106
|
+
#
|
1107
|
+
# @param value [Object] the value to set the attribute index to.
|
1108
|
+
# @return [Object] the newly set value
|
1109
|
+
def index=(_); end
|
1110
|
+
|
1111
|
+
# Returns the value of attribute parser
|
1112
|
+
#
|
1113
|
+
# @return [Object] the current value of parser
|
1114
|
+
def parser; end
|
1115
|
+
|
1116
|
+
# Sets the attribute parser
|
1117
|
+
#
|
1118
|
+
# @param value [Object] the value to set the attribute parser to.
|
1119
|
+
# @return [Object] the newly set value
|
1120
|
+
def parser=(_); end
|
1121
|
+
|
1122
|
+
# source://haml//lib/haml/parser.rb#215
|
1123
|
+
def strip!(from); end
|
1124
|
+
|
1125
|
+
# @private
|
1126
|
+
#
|
1127
|
+
# source://haml//lib/haml/parser.rb#211
|
1128
|
+
def tabs; end
|
1129
|
+
|
1130
|
+
# Returns the value of attribute text
|
1131
|
+
#
|
1132
|
+
# @return [Object] the current value of text
|
1133
|
+
def text; end
|
1134
|
+
|
1135
|
+
# Sets the attribute text
|
1136
|
+
#
|
1137
|
+
# @param value [Object] the value to set the attribute text to.
|
1138
|
+
# @return [Object] the newly set value
|
1139
|
+
def text=(_); end
|
1140
|
+
|
1141
|
+
# Returns the value of attribute whitespace
|
1142
|
+
#
|
1143
|
+
# @return [Object] the current value of whitespace
|
1144
|
+
def whitespace; end
|
1145
|
+
|
1146
|
+
# Sets the attribute whitespace
|
1147
|
+
#
|
1148
|
+
# @param value [Object] the value to set the attribute whitespace to.
|
1149
|
+
# @return [Object] the newly set value
|
1150
|
+
def whitespace=(_); end
|
1151
|
+
|
1152
|
+
class << self
|
1153
|
+
def [](*_arg0); end
|
1154
|
+
def inspect; end
|
1155
|
+
def keyword_init?; end
|
1156
|
+
def members; end
|
1157
|
+
def new(*_arg0); end
|
1158
|
+
end
|
1159
|
+
end
|
1160
|
+
|
1161
|
+
# Used for scanning old attributes, substituting the first '{'
|
1162
|
+
#
|
1163
|
+
# source://haml//lib/haml/parser.rb#97
|
1164
|
+
Haml::Parser::METHOD_CALL_PREFIX = T.let(T.unsafe(nil), String)
|
1165
|
+
|
1166
|
+
# source://haml//lib/haml/parser.rb#81
|
1167
|
+
Haml::Parser::MID_BLOCK_KEYWORDS = T.let(T.unsafe(nil), Array)
|
1168
|
+
|
1169
|
+
# The value of the character that designates that a line is part
|
1170
|
+
# of a multiline string.
|
1171
|
+
#
|
1172
|
+
# source://haml//lib/haml/parser.rb#71
|
1173
|
+
Haml::Parser::MULTILINE_CHAR_VALUE = T.let(T.unsafe(nil), String)
|
1174
|
+
|
1175
|
+
# Designates a non-parsed line. Not actually a character.
|
1176
|
+
#
|
1177
|
+
# source://haml//lib/haml/parser.rb#51
|
1178
|
+
Haml::Parser::PLAIN_TEXT = T.let(T.unsafe(nil), Integer)
|
1179
|
+
|
1180
|
+
# @private
|
1181
|
+
#
|
1182
|
+
# source://haml//lib/haml/parser.rb#223
|
1183
|
+
class Haml::Parser::ParseNode < ::Struct
|
1184
|
+
# @return [ParseNode] a new instance of ParseNode
|
1185
|
+
#
|
1186
|
+
# source://haml//lib/haml/parser.rb#224
|
1187
|
+
def initialize(*args); end
|
1188
|
+
|
1189
|
+
# Returns the value of attribute children
|
1190
|
+
#
|
1191
|
+
# @return [Object] the current value of children
|
1192
|
+
def children; end
|
1193
|
+
|
1194
|
+
# Sets the attribute children
|
1195
|
+
#
|
1196
|
+
# @param value [Object] the value to set the attribute children to.
|
1197
|
+
# @return [Object] the newly set value
|
1198
|
+
def children=(_); end
|
1199
|
+
|
1200
|
+
# source://haml//lib/haml/parser.rb#229
|
1201
|
+
def inspect; end
|
1202
|
+
|
1203
|
+
# Returns the value of attribute line
|
1204
|
+
#
|
1205
|
+
# @return [Object] the current value of line
|
1206
|
+
def line; end
|
1207
|
+
|
1208
|
+
# Sets the attribute line
|
1209
|
+
#
|
1210
|
+
# @param value [Object] the value to set the attribute line to.
|
1211
|
+
# @return [Object] the newly set value
|
1212
|
+
def line=(_); end
|
1213
|
+
|
1214
|
+
# Returns the value of attribute parent
|
1215
|
+
#
|
1216
|
+
# @return [Object] the current value of parent
|
1217
|
+
def parent; end
|
1218
|
+
|
1219
|
+
# Sets the attribute parent
|
1220
|
+
#
|
1221
|
+
# @param value [Object] the value to set the attribute parent to.
|
1222
|
+
# @return [Object] the newly set value
|
1223
|
+
def parent=(_); end
|
1224
|
+
|
1225
|
+
# Returns the value of attribute type
|
1226
|
+
#
|
1227
|
+
# @return [Object] the current value of type
|
1228
|
+
def type; end
|
1229
|
+
|
1230
|
+
# Sets the attribute type
|
1231
|
+
#
|
1232
|
+
# @param value [Object] the value to set the attribute type to.
|
1233
|
+
# @return [Object] the newly set value
|
1234
|
+
def type=(_); end
|
1235
|
+
|
1236
|
+
# Returns the value of attribute value
|
1237
|
+
#
|
1238
|
+
# @return [Object] the current value of value
|
1239
|
+
def value; end
|
1240
|
+
|
1241
|
+
# Sets the attribute value
|
1242
|
+
#
|
1243
|
+
# @param value [Object] the value to set the attribute value to.
|
1244
|
+
# @return [Object] the newly set value
|
1245
|
+
def value=(_); end
|
1246
|
+
|
1247
|
+
class << self
|
1248
|
+
def [](*_arg0); end
|
1249
|
+
def inspect; end
|
1250
|
+
def keyword_init?; end
|
1251
|
+
def members; end
|
1252
|
+
def new(*_arg0); end
|
1253
|
+
end
|
1254
|
+
end
|
1255
|
+
|
1256
|
+
# source://haml//lib/haml/parser.rb#952
|
1257
|
+
class Haml::Parser::ParserOptions
|
1258
|
+
# @return [ParserOptions] a new instance of ParserOptions
|
1259
|
+
#
|
1260
|
+
# source://haml//lib/haml/parser.rb#980
|
1261
|
+
def initialize(values = T.unsafe(nil)); end
|
1262
|
+
|
1263
|
+
# source://haml//lib/haml/parser.rb#964
|
1264
|
+
def autoclose; end
|
1265
|
+
|
1266
|
+
# source://haml//lib/haml/parser.rb#964
|
1267
|
+
def escape_html; end
|
1268
|
+
|
1269
|
+
# source://haml//lib/haml/parser.rb#964
|
1270
|
+
def filename; end
|
1271
|
+
|
1272
|
+
# source://haml//lib/haml/parser.rb#964
|
1273
|
+
def line; end
|
1274
|
+
|
1275
|
+
# source://haml//lib/haml/parser.rb#964
|
1276
|
+
def mime_type; end
|
1277
|
+
|
1278
|
+
# source://haml//lib/haml/parser.rb#964
|
1279
|
+
def preserve; end
|
1280
|
+
|
1281
|
+
# source://haml//lib/haml/parser.rb#964
|
1282
|
+
def remove_whitespace; end
|
1283
|
+
|
1284
|
+
# source://haml//lib/haml/parser.rb#964
|
1285
|
+
def suppress_eval; end
|
1286
|
+
end
|
1287
|
+
|
1288
|
+
# A list of options that are actually used in the parser
|
1289
|
+
#
|
1290
|
+
# source://haml//lib/haml/parser.rb#954
|
1291
|
+
Haml::Parser::ParserOptions::AVAILABLE_OPTIONS = T.let(T.unsafe(nil), Array)
|
1292
|
+
|
1293
|
+
# source://haml//lib/haml/parser.rb#967
|
1294
|
+
Haml::Parser::ParserOptions::DEFAULTS = T.let(T.unsafe(nil), Hash)
|
1295
|
+
|
1296
|
+
# Designates script that is always HTML-escaped.
|
1297
|
+
#
|
1298
|
+
# source://haml//lib/haml/parser.rb#33
|
1299
|
+
Haml::Parser::SANITIZE = T.let(T.unsafe(nil), String)
|
1300
|
+
|
1301
|
+
# Designates script, the result of which is output.
|
1302
|
+
#
|
1303
|
+
# source://haml//lib/haml/parser.rb#30
|
1304
|
+
Haml::Parser::SCRIPT = T.let(T.unsafe(nil), String)
|
1305
|
+
|
1306
|
+
# When following SILENT_SCRIPT, designates a comment that is not output.
|
1307
|
+
#
|
1308
|
+
# source://haml//lib/haml/parser.rb#42
|
1309
|
+
Haml::Parser::SILENT_COMMENT = T.let(T.unsafe(nil), String)
|
1310
|
+
|
1311
|
+
# Designates script which is run but not output.
|
1312
|
+
#
|
1313
|
+
# source://haml//lib/haml/parser.rb#39
|
1314
|
+
Haml::Parser::SILENT_SCRIPT = T.let(T.unsafe(nil), String)
|
1315
|
+
|
1316
|
+
# Keeps track of the ASCII values of the characters that begin a
|
1317
|
+
# specially-interpreted line.
|
1318
|
+
#
|
1319
|
+
# source://haml//lib/haml/parser.rb#55
|
1320
|
+
Haml::Parser::SPECIAL_CHARACTERS = T.let(T.unsafe(nil), Array)
|
1321
|
+
|
1322
|
+
# source://haml//lib/haml/parser.rb#82
|
1323
|
+
Haml::Parser::START_BLOCK_KEYWORDS = T.let(T.unsafe(nil), Array)
|
1324
|
+
|
1325
|
+
# Try to parse assignments to block starters as best as possible
|
1326
|
+
#
|
1327
|
+
# source://haml//lib/haml/parser.rb#84
|
1328
|
+
Haml::Parser::START_BLOCK_KEYWORD_REGEX = T.let(T.unsafe(nil), Regexp)
|
1329
|
+
|
1330
|
+
# source://haml//lib/haml/ruby_expression.rb#5
|
1331
|
+
class Haml::RubyExpression < ::Ripper
|
1332
|
+
private
|
1333
|
+
|
1334
|
+
# @raise [ParseError]
|
1335
|
+
#
|
1336
|
+
# source://haml//lib/haml/ruby_expression.rb#28
|
1337
|
+
def on_parse_error(*_arg0); end
|
1338
|
+
|
1339
|
+
class << self
|
1340
|
+
# @return [Boolean]
|
1341
|
+
#
|
1342
|
+
# source://haml//lib/haml/ruby_expression.rb#15
|
1343
|
+
def string_literal?(code); end
|
1344
|
+
|
1345
|
+
# @return [Boolean]
|
1346
|
+
#
|
1347
|
+
# source://haml//lib/haml/ruby_expression.rb#8
|
1348
|
+
def syntax_error?(code); end
|
1349
|
+
end
|
1350
|
+
end
|
1351
|
+
|
1352
|
+
# source://haml//lib/haml/ruby_expression.rb#6
|
1353
|
+
class Haml::RubyExpression::ParseError < ::StandardError; end
|
1354
|
+
|
1355
|
+
# Compile [:dynamic, "foo#{bar}"] to [:multi, [:static, 'foo'], [:dynamic, 'bar']]
|
1356
|
+
#
|
1357
|
+
# source://haml//lib/haml/string_splitter.rb#9
|
1358
|
+
class Haml::StringSplitter < ::Temple::Filter
|
1359
|
+
# source://haml//lib/haml/string_splitter.rb#88
|
1360
|
+
def on_dynamic(code); end
|
1361
|
+
|
1362
|
+
private
|
1363
|
+
|
1364
|
+
# @return [Boolean]
|
1365
|
+
#
|
1366
|
+
# source://haml//lib/haml/string_splitter.rb#106
|
1367
|
+
def string_literal?(code); end
|
1368
|
+
|
1369
|
+
class << self
|
1370
|
+
# `code` param must be valid string literal
|
1371
|
+
#
|
1372
|
+
# source://haml//lib/haml/string_splitter.rb#13
|
1373
|
+
def compile(code); end
|
1374
|
+
|
1375
|
+
private
|
1376
|
+
|
1377
|
+
# source://haml//lib/haml/string_splitter.rb#41
|
1378
|
+
def compile_tokens!(exps, tokens); end
|
1379
|
+
|
1380
|
+
# Some quotes are split-unsafe. Replace such quotes with null characters.
|
1381
|
+
#
|
1382
|
+
# source://haml//lib/haml/string_splitter.rb#59
|
1383
|
+
def escape_quotes(beg_str, end_str); end
|
1384
|
+
|
1385
|
+
# source://haml//lib/haml/string_splitter.rb#68
|
1386
|
+
def shift_balanced_embexpr(tokens); end
|
1387
|
+
|
1388
|
+
# source://haml//lib/haml/string_splitter.rb#27
|
1389
|
+
def strip_quotes!(tokens); end
|
1390
|
+
end
|
1391
|
+
end
|
1392
|
+
|
1393
|
+
# source://haml//lib/haml/string_splitter.rb#117
|
1394
|
+
class Haml::StringSplitter::SyntaxChecker < ::Ripper
|
1395
|
+
private
|
1396
|
+
|
1397
|
+
# @raise [ParseError]
|
1398
|
+
#
|
1399
|
+
# source://haml//lib/haml/string_splitter.rb#129
|
1400
|
+
def on_parse_error(*_arg0); end
|
1401
|
+
|
1402
|
+
class << self
|
1403
|
+
# @return [Boolean]
|
1404
|
+
#
|
1405
|
+
# source://haml//lib/haml/string_splitter.rb#120
|
1406
|
+
def syntax_error?(code); end
|
1407
|
+
end
|
1408
|
+
end
|
1409
|
+
|
1410
|
+
# source://haml//lib/haml/string_splitter.rb#118
|
1411
|
+
class Haml::StringSplitter::SyntaxChecker::ParseError < ::StandardError; end
|
1412
|
+
|
1413
|
+
# SyntaxError is the type of exception raised when Haml encounters an
|
1414
|
+
# ill-formatted document.
|
1415
|
+
# It's not particularly interesting,
|
1416
|
+
# except in that it's a subclass of {Haml::Error}.
|
1417
|
+
#
|
1418
|
+
# source://haml//lib/haml/error.rb#59
|
1419
|
+
class Haml::SyntaxError < ::Haml::Error; end
|
1420
|
+
|
1421
|
+
# source://haml//lib/haml/template.rb#0
|
1422
|
+
class Haml::Template < ::Temple::Templates::Tilt
|
1423
|
+
extend ::Haml::TemplateExtension
|
1424
|
+
end
|
1425
|
+
|
1426
|
+
# source://haml//lib/haml/template.rb#12
|
1427
|
+
module Haml::TemplateExtension
|
1428
|
+
# Activate Haml::Helpers for tilt templates.
|
1429
|
+
# https://github.com/judofyr/temple/blob/v0.7.6/lib/temple/mixins/template.rb#L7-L11
|
1430
|
+
#
|
1431
|
+
# source://haml//lib/haml/template.rb#15
|
1432
|
+
def compile(*_arg0); end
|
1433
|
+
end
|
1434
|
+
|
1435
|
+
# For backward compatibility of Tilt integration. TODO: We should deprecate this
|
1436
|
+
# and let Tilt have a native support of Haml 6. At least it generates warnings now.
|
1437
|
+
#
|
1438
|
+
# source://haml//lib/haml/engine.rb#50
|
1439
|
+
class Haml::TempleEngine < ::Haml::Engine
|
1440
|
+
# source://haml//lib/haml/engine.rb#51
|
1441
|
+
def compile(template); end
|
1442
|
+
|
1443
|
+
# source://haml//lib/haml/engine.rb#55
|
1444
|
+
def precompiled_with_ambles(_local_names, after_preamble:); end
|
1445
|
+
end
|
1446
|
+
|
1447
|
+
# A module to count lines of expected code. This would be faster than actual code generation
|
1448
|
+
# and counting newlines in it.
|
1449
|
+
#
|
1450
|
+
# source://haml//lib/haml/temple_line_counter.rb#5
|
1451
|
+
module Haml::TempleLineCounter
|
1452
|
+
class << self
|
1453
|
+
# source://haml//lib/haml/temple_line_counter.rb#8
|
1454
|
+
def count_lines(exp); end
|
1455
|
+
end
|
1456
|
+
end
|
1457
|
+
|
1458
|
+
# source://haml//lib/haml/temple_line_counter.rb#6
|
1459
|
+
class Haml::TempleLineCounter::UnexpectedExpression < ::StandardError; end
|
1460
|
+
|
1461
|
+
# A module containing various useful functions.
|
1462
|
+
#
|
1463
|
+
# source://haml//lib/haml/util.rb#14
|
1464
|
+
module Haml::Util
|
1465
|
+
extend ::Haml::Util
|
1466
|
+
|
1467
|
+
# Moves a scanner through a balanced pair of characters.
|
1468
|
+
# For example:
|
1469
|
+
#
|
1470
|
+
# Foo (Bar (Baz bang) bop) (Bang (bop bip))
|
1471
|
+
# ^ ^
|
1472
|
+
# from to
|
1473
|
+
#
|
1474
|
+
# @param scanner [StringScanner] The string scanner to move
|
1475
|
+
# @param start [String] The character opening the balanced pair.
|
1476
|
+
# @param finish [String] The character closing the balanced pair.
|
1477
|
+
# @param count [Fixnum] The number of opening characters matched
|
1478
|
+
# before calling this method
|
1479
|
+
# @return [(String, String)] The string matched within the balanced pair
|
1480
|
+
# and the rest of the string.
|
1481
|
+
# `["Foo (Bar (Baz bang) bop)", " (Bang (bop bip))"]` in the example above.
|
1482
|
+
#
|
1483
|
+
# source://haml//lib/haml/util.rb#172
|
1484
|
+
def balance(scanner, start, finish, count = T.unsafe(nil)); end
|
1485
|
+
|
1486
|
+
# Checks that the encoding of a string is valid
|
1487
|
+
# and cleans up potential encoding gotchas like the UTF-8 BOM.
|
1488
|
+
# If it's not, yields an error string describing the invalid character
|
1489
|
+
# and the line on which it occurs.
|
1490
|
+
#
|
1491
|
+
# @param str [String] The string of which to check the encoding
|
1492
|
+
# @return [String] `str`, potentially with encoding gotchas like BOMs removed
|
1493
|
+
# @yield [msg] A block in which an encoding error can be raised.
|
1494
|
+
# Only yields if there is an encoding error
|
1495
|
+
# @yieldparam msg [String] The error message to be raised
|
1496
|
+
#
|
1497
|
+
# source://haml//lib/haml/util.rb#66
|
1498
|
+
def check_encoding(str); end
|
1499
|
+
|
1500
|
+
# Like {\#check\_encoding}, but also checks for a Ruby-style `-# coding:` comment
|
1501
|
+
# at the beginning of the template and uses that encoding if it exists.
|
1502
|
+
#
|
1503
|
+
# The Haml encoding rules are simple.
|
1504
|
+
# If a `-# coding:` comment exists,
|
1505
|
+
# we assume that that's the original encoding of the document.
|
1506
|
+
# Otherwise, we use whatever encoding Ruby has.
|
1507
|
+
#
|
1508
|
+
# Haml uses the same rules for parsing coding comments as Ruby.
|
1509
|
+
# This means that it can understand Emacs-style comments
|
1510
|
+
# and also that it cannot understand non-ASCII-compatible encodings
|
1511
|
+
# such as `UTF-16` and `UTF-32`.
|
1512
|
+
#
|
1513
|
+
# @param str [String] The Haml template of which to check the encoding
|
1514
|
+
# @raise [ArgumentError] if the document declares an unknown encoding
|
1515
|
+
# @return [String] The original string encoded properly
|
1516
|
+
# @yield [msg] A block in which an encoding error can be raised.
|
1517
|
+
# Only yields if there is an encoding error
|
1518
|
+
# @yieldparam msg [String] The error message to be raised
|
1519
|
+
#
|
1520
|
+
# source://haml//lib/haml/util.rb#113
|
1521
|
+
def check_haml_encoding(str, &block); end
|
1522
|
+
|
1523
|
+
# @return [Boolean]
|
1524
|
+
#
|
1525
|
+
# source://haml//lib/haml/util.rb#201
|
1526
|
+
def contains_interpolation?(str); end
|
1527
|
+
|
1528
|
+
# Scans through a string looking for the interoplation-opening `#{`
|
1529
|
+
# and, when it's found, yields the scanner to the calling code
|
1530
|
+
# so it can handle it properly.
|
1531
|
+
#
|
1532
|
+
# The scanner will have any backslashes immediately in front of the `#{`
|
1533
|
+
# as the second capture group (`scan[2]`),
|
1534
|
+
# and the text prior to that as the first (`scan[1]`).
|
1535
|
+
#
|
1536
|
+
# @return [String] The text remaining in the scanner after all `#{`s have been processed
|
1537
|
+
# @yieldparam scan [StringScanner] The scanner scanning through the string
|
1538
|
+
#
|
1539
|
+
# source://haml//lib/haml/util.rb#151
|
1540
|
+
def handle_interpolation(str); end
|
1541
|
+
|
1542
|
+
# Formats a string for use in error messages about indentation.
|
1543
|
+
#
|
1544
|
+
# @param indentation [String] The string used for indentation
|
1545
|
+
# @return [String] The name of the indentation (e.g. `"12 spaces"`, `"1 tab"`)
|
1546
|
+
#
|
1547
|
+
# source://haml//lib/haml/util.rb#188
|
1548
|
+
def human_indentation(indentation); end
|
1549
|
+
|
1550
|
+
# Like `Object#inspect`, but preserves non-ASCII characters rather than escaping them.
|
1551
|
+
# This is necessary so that the precompiled Haml template can be `#encode`d into `@options[:encoding]`
|
1552
|
+
# before being evaluated.
|
1553
|
+
#
|
1554
|
+
# @param obj [Object]
|
1555
|
+
# @return [String]
|
1556
|
+
#
|
1557
|
+
# source://haml//lib/haml/util.rb#130
|
1558
|
+
def inspect_obj(obj); end
|
1559
|
+
|
1560
|
+
# Whether or not ActionView's XSS protection is available and enabled,
|
1561
|
+
# as is the default for Rails 3.0+, and optional for version 2.3.5+.
|
1562
|
+
# Overridden in haml/template.rb if this is the case.
|
1563
|
+
#
|
1564
|
+
# @return [Boolean]
|
1565
|
+
#
|
1566
|
+
# source://haml//lib/haml/util.rb#52
|
1567
|
+
def rails_xss_safe?; end
|
1568
|
+
|
1569
|
+
# Silence all output to STDERR within a block.
|
1570
|
+
#
|
1571
|
+
# @yield A block in which no output will be printed to STDERR
|
1572
|
+
#
|
1573
|
+
# source://haml//lib/haml/util.rb#38
|
1574
|
+
def silence_warnings; end
|
1575
|
+
|
1576
|
+
# source://haml//lib/haml/util.rb#205
|
1577
|
+
def unescape_interpolation(str, escape_html = T.unsafe(nil)); end
|
1578
|
+
|
1579
|
+
private
|
1580
|
+
|
1581
|
+
# Parses a magic comment at the beginning of a Haml file.
|
1582
|
+
# The parsing rules are basically the same as Ruby's.
|
1583
|
+
#
|
1584
|
+
# @return [(Boolean, String or nil)] Whether the document begins with a UTF-8 BOM,
|
1585
|
+
# and the declared encoding of the document (or nil if none is declared)
|
1586
|
+
#
|
1587
|
+
# source://haml//lib/haml/util.rb#237
|
1588
|
+
def parse_haml_magic_comment(str); end
|
1589
|
+
|
1590
|
+
# source://haml//lib/haml/util.rb#249
|
1591
|
+
def try_parse_haml_emacs_magic_comment(scanner); end
|
1592
|
+
|
1593
|
+
class << self
|
1594
|
+
def escape_html(_arg0); end
|
1595
|
+
|
1596
|
+
# TODO: Remove unescape_interpolation's workaround and get rid of `respond_to?`.
|
1597
|
+
#
|
1598
|
+
# source://haml//lib/haml/util.rb#30
|
1599
|
+
def escape_html_safe(html); end
|
1600
|
+
end
|
1601
|
+
end
|
1602
|
+
|
1603
|
+
# source://haml//lib/haml/version.rb#3
|
1604
|
+
Haml::VERSION = T.let(T.unsafe(nil), String)
|
1605
|
+
|
1606
|
+
# source://haml//lib/haml/whitespace.rb#3
|
1607
|
+
class Haml::Whitespace < ::Temple::Filter
|
1608
|
+
# source://haml//lib/haml/whitespace.rb#4
|
1609
|
+
def on_whitespace; end
|
1610
|
+
end
|
1611
|
+
|
1612
|
+
class Temple::Filter
|
1613
|
+
include ::Temple::Mixins::CompiledDispatcher
|
1614
|
+
include ::Temple::Mixins::CoreDispatcher
|
1615
|
+
include ::Temple::Mixins::EscapeDispatcher
|
1616
|
+
include ::Temple::Mixins::ControlFlowDispatcher
|
1617
|
+
include ::Haml::EscapeanyDispathcer
|
1618
|
+
include ::Haml::FescapeDispathcer
|
1619
|
+
end
|