herb 0.8.10-arm-linux-gnu → 0.9.1-arm-linux-gnu
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +11 -3
- data/README.md +64 -34
- data/Rakefile +48 -40
- data/config.yml +473 -34
- data/ext/herb/error_helpers.c +535 -140
- data/ext/herb/error_helpers.h +1 -0
- data/ext/herb/extconf.rb +67 -28
- data/ext/herb/extension.c +321 -51
- data/ext/herb/extension.h +1 -0
- data/ext/herb/extension_helpers.c +24 -14
- data/ext/herb/extension_helpers.h +2 -2
- data/ext/herb/nodes.c +647 -270
- data/ext/herb/nodes.h +1 -0
- data/herb.gemspec +3 -2
- data/lib/herb/3.0/herb.so +0 -0
- data/lib/herb/3.1/herb.so +0 -0
- data/lib/herb/3.2/herb.so +0 -0
- data/lib/herb/3.3/herb.so +0 -0
- data/lib/herb/3.4/herb.so +0 -0
- data/lib/herb/4.0/herb.so +0 -0
- data/lib/herb/ast/helpers.rb +3 -3
- data/lib/herb/ast/node.rb +15 -2
- data/lib/herb/ast/nodes.rb +1530 -179
- data/lib/herb/bootstrap.rb +87 -0
- data/lib/herb/cli.rb +341 -31
- data/lib/herb/configuration.rb +248 -0
- data/lib/herb/defaults.yml +32 -0
- data/lib/herb/engine/compiler.rb +78 -11
- data/lib/herb/engine/debug_visitor.rb +13 -3
- data/lib/herb/engine/error_formatter.rb +13 -9
- data/lib/herb/engine/parser_error_overlay.rb +10 -6
- data/lib/herb/engine/validator.rb +8 -3
- data/lib/herb/engine/validators/nesting_validator.rb +2 -2
- data/lib/herb/engine.rb +119 -43
- data/lib/herb/errors.rb +808 -88
- data/lib/herb/lex_result.rb +1 -0
- data/lib/herb/location.rb +7 -3
- data/lib/herb/parse_result.rb +12 -2
- data/lib/herb/parser_options.rb +62 -0
- data/lib/herb/position.rb +1 -0
- data/lib/herb/prism_inspect.rb +120 -0
- data/lib/herb/project.rb +923 -331
- data/lib/herb/range.rb +1 -0
- data/lib/herb/token.rb +7 -1
- data/lib/herb/version.rb +1 -1
- data/lib/herb/visitor.rb +47 -2
- data/lib/herb/warnings.rb +6 -1
- data/lib/herb.rb +35 -3
- data/sig/herb/ast/helpers.rbs +2 -2
- data/sig/herb/ast/node.rbs +12 -2
- data/sig/herb/ast/nodes.rbs +773 -128
- data/sig/herb/bootstrap.rbs +31 -0
- data/sig/herb/configuration.rbs +89 -0
- data/sig/herb/engine/compiler.rbs +9 -1
- data/sig/herb/engine/debug_visitor.rbs +2 -0
- data/sig/herb/engine/validator.rbs +5 -1
- data/sig/herb/engine.rbs +21 -3
- data/sig/herb/errors.rbs +372 -63
- data/sig/herb/location.rbs +4 -0
- data/sig/herb/parse_result.rbs +4 -2
- data/sig/herb/parser_options.rbs +46 -0
- data/sig/herb/position.rbs +1 -0
- data/sig/herb/prism_inspect.rbs +28 -0
- data/sig/herb/range.rbs +1 -0
- data/sig/herb/token.rbs +6 -0
- data/sig/herb/visitor.rbs +31 -4
- data/sig/herb/warnings.rbs +6 -1
- data/sig/herb.rbs +14 -0
- data/sig/herb_c_extension.rbs +5 -2
- data/sig/rubyvm.rbs +5 -0
- data/sig/serialized_ast_errors.rbs +82 -6
- data/sig/serialized_ast_nodes.rbs +91 -6
- data/src/analyze/action_view/attribute_extraction_helpers.c +303 -0
- data/src/analyze/action_view/content_tag.c +78 -0
- data/src/analyze/action_view/link_to.c +167 -0
- data/src/analyze/action_view/registry.c +83 -0
- data/src/analyze/action_view/tag.c +70 -0
- data/src/analyze/action_view/tag_helper_node_builders.c +305 -0
- data/src/analyze/action_view/tag_helpers.c +815 -0
- data/src/analyze/action_view/turbo_frame_tag.c +88 -0
- data/src/analyze/analyze.c +885 -0
- data/src/{analyzed_ruby.c → analyze/analyzed_ruby.c} +13 -11
- data/src/analyze/builders.c +343 -0
- data/src/analyze/conditional_elements.c +594 -0
- data/src/analyze/conditional_open_tags.c +640 -0
- data/src/analyze/control_type.c +250 -0
- data/src/{analyze_helpers.c → analyze/helpers.c} +48 -23
- data/src/analyze/invalid_structures.c +193 -0
- data/src/{analyze_missing_end.c → analyze/missing_end.c} +33 -22
- data/src/analyze/parse_errors.c +84 -0
- data/src/analyze/prism_annotate.c +399 -0
- data/src/analyze/render_nodes.c +761 -0
- data/src/{analyze_transform.c → analyze/transform.c} +24 -3
- data/src/ast_node.c +17 -7
- data/src/ast_nodes.c +759 -387
- data/src/ast_pretty_print.c +264 -6
- data/src/errors.c +1454 -519
- data/src/extract.c +145 -49
- data/src/herb.c +52 -34
- data/src/html_util.c +241 -12
- data/src/include/analyze/action_view/attribute_extraction_helpers.h +36 -0
- data/src/include/analyze/action_view/tag_helper_handler.h +43 -0
- data/src/include/analyze/action_view/tag_helper_node_builders.h +70 -0
- data/src/include/analyze/action_view/tag_helpers.h +38 -0
- data/src/include/{analyze.h → analyze/analyze.h} +14 -4
- data/src/include/{analyzed_ruby.h → analyze/analyzed_ruby.h} +3 -3
- data/src/include/analyze/builders.h +27 -0
- data/src/include/analyze/conditional_elements.h +9 -0
- data/src/include/analyze/conditional_open_tags.h +9 -0
- data/src/include/analyze/control_type.h +14 -0
- data/src/include/{analyze_helpers.h → analyze/helpers.h} +4 -2
- data/src/include/analyze/invalid_structures.h +11 -0
- data/src/include/analyze/prism_annotate.h +16 -0
- data/src/include/analyze/render_nodes.h +11 -0
- data/src/include/ast_node.h +11 -5
- data/src/include/ast_nodes.h +154 -38
- data/src/include/ast_pretty_print.h +5 -0
- data/src/include/element_source.h +3 -8
- data/src/include/errors.h +206 -55
- data/src/include/extract.h +21 -5
- data/src/include/herb.h +18 -6
- data/src/include/herb_prism_node.h +13 -0
- data/src/include/html_util.h +7 -2
- data/src/include/io.h +3 -1
- data/src/include/lex_helpers.h +29 -0
- data/src/include/lexer.h +1 -1
- data/src/include/lexer_peek_helpers.h +87 -13
- data/src/include/lexer_struct.h +2 -0
- data/src/include/location.h +2 -1
- data/src/include/parser.h +28 -2
- data/src/include/parser_helpers.h +19 -3
- data/src/include/pretty_print.h +10 -5
- data/src/include/prism_context.h +45 -0
- data/src/include/prism_helpers.h +10 -7
- data/src/include/prism_serialized.h +12 -0
- data/src/include/token.h +16 -4
- data/src/include/token_struct.h +10 -3
- data/src/include/utf8.h +2 -1
- data/src/include/util/hb_allocator.h +78 -0
- data/src/include/util/hb_arena.h +6 -1
- data/src/include/util/hb_arena_debug.h +12 -1
- data/src/include/util/hb_array.h +7 -3
- data/src/include/util/hb_buffer.h +6 -4
- data/src/include/util/hb_foreach.h +79 -0
- data/src/include/util/hb_narray.h +8 -4
- data/src/include/util/hb_string.h +56 -9
- data/src/include/util.h +6 -3
- data/src/include/version.h +1 -1
- data/src/io.c +3 -2
- data/src/lexer.c +42 -30
- data/src/lexer_peek_helpers.c +12 -74
- data/src/location.c +2 -2
- data/src/main.c +53 -28
- data/src/parser.c +784 -247
- data/src/parser_helpers.c +110 -23
- data/src/parser_match_tags.c +129 -48
- data/src/pretty_print.c +29 -24
- data/src/prism_helpers.c +30 -27
- data/src/ruby_parser.c +2 -0
- data/src/token.c +151 -66
- data/src/token_matchers.c +0 -1
- data/src/utf8.c +7 -6
- data/src/util/hb_allocator.c +341 -0
- data/src/util/hb_arena.c +81 -56
- data/src/util/hb_arena_debug.c +32 -17
- data/src/util/hb_array.c +30 -15
- data/src/util/hb_buffer.c +17 -21
- data/src/util/hb_narray.c +22 -7
- data/src/util/hb_string.c +49 -35
- data/src/util.c +21 -11
- data/src/visitor.c +67 -0
- data/templates/ext/herb/error_helpers.c.erb +24 -11
- data/templates/ext/herb/error_helpers.h.erb +1 -0
- data/templates/ext/herb/nodes.c.erb +50 -16
- data/templates/ext/herb/nodes.h.erb +1 -0
- data/templates/java/error_helpers.c.erb +1 -1
- data/templates/java/nodes.c.erb +30 -8
- data/templates/java/org/herb/ast/Errors.java.erb +24 -1
- data/templates/java/org/herb/ast/Nodes.java.erb +80 -21
- data/templates/javascript/packages/core/src/errors.ts.erb +16 -3
- data/templates/javascript/packages/core/src/node-type-guards.ts.erb +3 -1
- data/templates/javascript/packages/core/src/nodes.ts.erb +109 -32
- data/templates/javascript/packages/node/extension/error_helpers.cpp.erb +13 -4
- data/templates/javascript/packages/node/extension/nodes.cpp.erb +43 -4
- data/templates/lib/herb/ast/nodes.rb.erb +95 -32
- data/templates/lib/herb/errors.rb.erb +15 -3
- data/templates/lib/herb/visitor.rb.erb +2 -2
- data/templates/rust/src/ast/nodes.rs.erb +97 -44
- data/templates/rust/src/errors.rs.erb +2 -1
- data/templates/rust/src/nodes.rs.erb +168 -16
- data/templates/rust/src/union_types.rs.erb +60 -0
- data/templates/rust/src/visitor.rs.erb +81 -0
- data/templates/src/{analyze_missing_end.c.erb → analyze/missing_end.c.erb} +9 -6
- data/templates/src/{analyze_transform.c.erb → analyze/transform.c.erb} +2 -2
- data/templates/src/ast_nodes.c.erb +34 -26
- data/templates/src/ast_pretty_print.c.erb +24 -5
- data/templates/src/errors.c.erb +60 -54
- data/templates/src/include/ast_nodes.h.erb +6 -2
- data/templates/src/include/ast_pretty_print.h.erb +5 -0
- data/templates/src/include/errors.h.erb +15 -11
- data/templates/src/include/util/hb_foreach.h.erb +20 -0
- data/templates/src/parser_match_tags.c.erb +10 -4
- data/templates/src/visitor.c.erb +2 -2
- data/templates/template.rb +204 -29
- data/templates/wasm/error_helpers.cpp.erb +9 -5
- data/templates/wasm/nodes.cpp.erb +41 -4
- metadata +60 -16
- data/src/analyze.c +0 -1608
- data/src/element_source.c +0 -12
- data/src/include/util/hb_system.h +0 -9
- data/src/util/hb_system.c +0 -30
data/config.yml
CHANGED
|
@@ -12,7 +12,7 @@ errors:
|
|
|
12
12
|
types:
|
|
13
13
|
- name: UnexpectedError
|
|
14
14
|
message:
|
|
15
|
-
template: "%s. Expected:
|
|
15
|
+
template: "%s. Expected: %s, found: %s."
|
|
16
16
|
arguments:
|
|
17
17
|
- description
|
|
18
18
|
- expected
|
|
@@ -30,10 +30,10 @@ errors:
|
|
|
30
30
|
|
|
31
31
|
- name: UnexpectedTokenError
|
|
32
32
|
message:
|
|
33
|
-
template: "Found
|
|
33
|
+
template: "Found %s when expecting %s at (%u:%u)."
|
|
34
34
|
arguments:
|
|
35
|
-
-
|
|
36
|
-
-
|
|
35
|
+
- token_type_to_friendly_string(found->type)
|
|
36
|
+
- token_type_to_friendly_string(expected_type)
|
|
37
37
|
- found->location.start.line
|
|
38
38
|
- found->location.start.column
|
|
39
39
|
|
|
@@ -87,22 +87,6 @@ errors:
|
|
|
87
87
|
- name: closing_tag
|
|
88
88
|
type: token
|
|
89
89
|
|
|
90
|
-
- name: QuotesMismatchError
|
|
91
|
-
message:
|
|
92
|
-
template: "String opened with %s but closed with %s at (%u:%u)."
|
|
93
|
-
arguments:
|
|
94
|
-
- opening_quote->value
|
|
95
|
-
- closing_quote->value
|
|
96
|
-
- closing_quote->location.start.line
|
|
97
|
-
- closing_quote->location.start.column
|
|
98
|
-
|
|
99
|
-
fields:
|
|
100
|
-
- name: opening_quote
|
|
101
|
-
type: token
|
|
102
|
-
|
|
103
|
-
- name: closing_quote
|
|
104
|
-
type: token
|
|
105
|
-
|
|
106
90
|
- name: VoidElementClosingTagError
|
|
107
91
|
message:
|
|
108
92
|
template: "`%s` is a void element and should not be used as a closing tag. Use `<%s>` or `<%s />` instead of `</%s>`."
|
|
@@ -180,11 +164,252 @@ errors:
|
|
|
180
164
|
|
|
181
165
|
- name: ERBCaseWithConditionsError
|
|
182
166
|
message:
|
|
183
|
-
template: "A `case` statement with `when`/`in` in a single ERB tag cannot be formatted. Use separate tags for `case` and its conditions."
|
|
167
|
+
template: "A `case` statement with `when`/`in` conditions in a single ERB tag cannot be reliably parsed, compiled, and formatted. Use separate ERB tags for `case` and its conditions (e.g., `<% case x %>` followed by `<% when y %>`)."
|
|
184
168
|
arguments: []
|
|
185
169
|
|
|
186
170
|
fields: []
|
|
187
171
|
|
|
172
|
+
- name: ConditionalElementMultipleTagsError
|
|
173
|
+
message:
|
|
174
|
+
template: "Conditional element pattern detected at (%zu:%zu) but the conditional block contains multiple HTML tags. Each conditional element must wrap exactly one opening and one closing tag. Consider nesting the conditionals individually."
|
|
175
|
+
arguments:
|
|
176
|
+
- line
|
|
177
|
+
- column
|
|
178
|
+
|
|
179
|
+
fields:
|
|
180
|
+
- name: line
|
|
181
|
+
type: size_t
|
|
182
|
+
|
|
183
|
+
- name: column
|
|
184
|
+
type: size_t
|
|
185
|
+
|
|
186
|
+
- name: ConditionalElementConditionMismatchError
|
|
187
|
+
message:
|
|
188
|
+
template: "Conditional element `<%s>` has mismatched conditions: opening uses `%s` at (%zu:%zu) but closing uses `%s` at (%zu:%zu). Both conditions must be identical."
|
|
189
|
+
arguments:
|
|
190
|
+
- tag_name
|
|
191
|
+
- open_condition
|
|
192
|
+
- open_line
|
|
193
|
+
- open_column
|
|
194
|
+
- close_condition
|
|
195
|
+
- close_line
|
|
196
|
+
- close_column
|
|
197
|
+
|
|
198
|
+
fields:
|
|
199
|
+
- name: tag_name
|
|
200
|
+
type: string
|
|
201
|
+
|
|
202
|
+
- name: open_condition
|
|
203
|
+
type: string
|
|
204
|
+
|
|
205
|
+
- name: open_line
|
|
206
|
+
type: size_t
|
|
207
|
+
|
|
208
|
+
- name: open_column
|
|
209
|
+
type: size_t
|
|
210
|
+
|
|
211
|
+
- name: close_condition
|
|
212
|
+
type: string
|
|
213
|
+
|
|
214
|
+
- name: close_line
|
|
215
|
+
type: size_t
|
|
216
|
+
|
|
217
|
+
- name: close_column
|
|
218
|
+
type: size_t
|
|
219
|
+
|
|
220
|
+
- name: InvalidCommentClosingTagError
|
|
221
|
+
message:
|
|
222
|
+
template: "Invalid comment closing tag `%s` at (%u:%u). Use `-->` instead of `--!>`."
|
|
223
|
+
arguments:
|
|
224
|
+
- closing_tag->value
|
|
225
|
+
- closing_tag->location.start.line
|
|
226
|
+
- closing_tag->location.start.column
|
|
227
|
+
|
|
228
|
+
fields:
|
|
229
|
+
- name: closing_tag
|
|
230
|
+
type: token
|
|
231
|
+
|
|
232
|
+
- name: OmittedClosingTagError
|
|
233
|
+
message:
|
|
234
|
+
template: "Element `<%s>` at (%u:%u) has its closing tag omitted. While valid HTML, consider adding an explicit `</%s>` closing tag at (%u:%u) for clarity, or set `strict: false` to allow this."
|
|
235
|
+
arguments:
|
|
236
|
+
- opening_tag->value
|
|
237
|
+
- opening_tag->location.start.line
|
|
238
|
+
- opening_tag->location.start.column
|
|
239
|
+
- opening_tag->value
|
|
240
|
+
- insertion_point.line
|
|
241
|
+
- insertion_point.column
|
|
242
|
+
|
|
243
|
+
fields:
|
|
244
|
+
- name: opening_tag
|
|
245
|
+
type: token
|
|
246
|
+
|
|
247
|
+
- name: insertion_point
|
|
248
|
+
type: position
|
|
249
|
+
|
|
250
|
+
- name: UnclosedOpenTagError
|
|
251
|
+
message:
|
|
252
|
+
template: "Opening tag `<%s>` at (%u:%u) is missing closing `>`."
|
|
253
|
+
arguments:
|
|
254
|
+
- tag_name->value
|
|
255
|
+
- tag_name->location.start.line
|
|
256
|
+
- tag_name->location.start.column
|
|
257
|
+
|
|
258
|
+
fields:
|
|
259
|
+
- name: tag_name
|
|
260
|
+
type: token
|
|
261
|
+
|
|
262
|
+
- name: UnclosedCloseTagError
|
|
263
|
+
message:
|
|
264
|
+
template: "Closing tag `</%s>` at (%u:%u) is missing closing `>`."
|
|
265
|
+
arguments:
|
|
266
|
+
- tag_name->value
|
|
267
|
+
- tag_name->location.start.line
|
|
268
|
+
- tag_name->location.start.column
|
|
269
|
+
|
|
270
|
+
fields:
|
|
271
|
+
- name: tag_name
|
|
272
|
+
type: token
|
|
273
|
+
|
|
274
|
+
- name: UnclosedQuoteError
|
|
275
|
+
message:
|
|
276
|
+
template: "Attribute value opened with %s at (%u:%u) was never closed."
|
|
277
|
+
arguments:
|
|
278
|
+
- opening_quote->value
|
|
279
|
+
- opening_quote->location.start.line
|
|
280
|
+
- opening_quote->location.start.column
|
|
281
|
+
|
|
282
|
+
fields:
|
|
283
|
+
- name: opening_quote
|
|
284
|
+
type: token
|
|
285
|
+
|
|
286
|
+
- name: MissingAttributeValueError
|
|
287
|
+
message:
|
|
288
|
+
template: "Attribute `%s` at (%u:%u) is missing a value after the equals sign."
|
|
289
|
+
arguments:
|
|
290
|
+
- attribute_name
|
|
291
|
+
- start.line
|
|
292
|
+
- start.column
|
|
293
|
+
|
|
294
|
+
fields:
|
|
295
|
+
- name: attribute_name
|
|
296
|
+
type: string
|
|
297
|
+
|
|
298
|
+
- name: UnclosedERBTagError
|
|
299
|
+
message:
|
|
300
|
+
template: "ERB tag `%s` at (%u:%u) is missing closing `%%>`."
|
|
301
|
+
arguments:
|
|
302
|
+
- opening_tag->value
|
|
303
|
+
- opening_tag->location.start.line
|
|
304
|
+
- opening_tag->location.start.column
|
|
305
|
+
|
|
306
|
+
fields:
|
|
307
|
+
- name: opening_tag
|
|
308
|
+
type: token
|
|
309
|
+
|
|
310
|
+
- name: StrayERBClosingTagError
|
|
311
|
+
message:
|
|
312
|
+
template: "Stray `%%>` found at (%u:%u). This closing delimiter is not part of an ERB tag and will be treated as plain text. If you want a literal `%%>`, use the HTML entities `%>` instead."
|
|
313
|
+
arguments:
|
|
314
|
+
- start.line
|
|
315
|
+
- start.column
|
|
316
|
+
|
|
317
|
+
fields: []
|
|
318
|
+
|
|
319
|
+
- name: NestedERBTagError
|
|
320
|
+
message:
|
|
321
|
+
template: "ERB tag `%s` at (%u:%u) was terminated by nested `<%%` tag at (%zu:%zu). Nesting `<%%` tags is not supported."
|
|
322
|
+
arguments:
|
|
323
|
+
- opening_tag->value
|
|
324
|
+
- opening_tag->location.start.line
|
|
325
|
+
- opening_tag->location.start.column
|
|
326
|
+
- nested_tag_line
|
|
327
|
+
- nested_tag_column
|
|
328
|
+
|
|
329
|
+
fields:
|
|
330
|
+
- name: opening_tag
|
|
331
|
+
type: token
|
|
332
|
+
|
|
333
|
+
- name: nested_tag_line
|
|
334
|
+
type: size_t
|
|
335
|
+
|
|
336
|
+
- name: nested_tag_column
|
|
337
|
+
type: size_t
|
|
338
|
+
|
|
339
|
+
- name: RenderAmbiguousLocalsError
|
|
340
|
+
message:
|
|
341
|
+
template: "Did you mean `render partial: '%s', locals: { ... }`? Using `render '%s', locals: { ... }` passes a local variable named `locals` to the partial instead of setting the `locals:` option."
|
|
342
|
+
arguments:
|
|
343
|
+
- partial
|
|
344
|
+
- partial
|
|
345
|
+
|
|
346
|
+
fields:
|
|
347
|
+
- name: partial
|
|
348
|
+
type: string
|
|
349
|
+
|
|
350
|
+
- name: RenderMissingLocalsError
|
|
351
|
+
message:
|
|
352
|
+
template: "Wrap `%s` in `locals: { ... }` when using `partial:`. Use `render partial: '%s', locals: { %s }` instead. Without `locals:`, these keyword arguments are ignored."
|
|
353
|
+
arguments:
|
|
354
|
+
- keywords
|
|
355
|
+
- partial
|
|
356
|
+
- keywords
|
|
357
|
+
|
|
358
|
+
fields:
|
|
359
|
+
- name: partial
|
|
360
|
+
type: string
|
|
361
|
+
|
|
362
|
+
- name: keywords
|
|
363
|
+
type: string
|
|
364
|
+
|
|
365
|
+
- name: RenderNoArgumentsError
|
|
366
|
+
message:
|
|
367
|
+
template: "No arguments passed to `render`. It needs a partial name, a keyword argument like `partial:`, `template:`, or `layout:`, or a renderable object."
|
|
368
|
+
arguments: []
|
|
369
|
+
|
|
370
|
+
fields: []
|
|
371
|
+
|
|
372
|
+
- name: RenderConflictingPartialError
|
|
373
|
+
message:
|
|
374
|
+
template: "Both a positional partial `'%s'` and a keyword `partial: '%s'` were passed to `render`. Use one form or the other, not both."
|
|
375
|
+
arguments:
|
|
376
|
+
- positional_partial
|
|
377
|
+
- keyword_partial
|
|
378
|
+
|
|
379
|
+
fields:
|
|
380
|
+
- name: positional_partial
|
|
381
|
+
type: string
|
|
382
|
+
|
|
383
|
+
- name: keyword_partial
|
|
384
|
+
type: string
|
|
385
|
+
|
|
386
|
+
- name: RenderInvalidAsOptionError
|
|
387
|
+
message:
|
|
388
|
+
template: "The `as:` value `'%s'` is not a valid Ruby identifier. Use a name that starts with a lowercase letter or underscore, like `as: :item`."
|
|
389
|
+
arguments:
|
|
390
|
+
- as_value
|
|
391
|
+
|
|
392
|
+
fields:
|
|
393
|
+
- name: as_value
|
|
394
|
+
type: string
|
|
395
|
+
|
|
396
|
+
- name: RenderObjectAndCollectionError
|
|
397
|
+
message:
|
|
398
|
+
template: "The `object:` and `collection:` options are mutually exclusive. Use one or the other in your `render` call."
|
|
399
|
+
arguments: []
|
|
400
|
+
|
|
401
|
+
fields: []
|
|
402
|
+
|
|
403
|
+
- name: RenderLayoutWithoutBlockError
|
|
404
|
+
message:
|
|
405
|
+
template: "Layout rendering needs a block. Use `render layout: '%s' do ... end` so the layout has content to wrap."
|
|
406
|
+
arguments:
|
|
407
|
+
- layout
|
|
408
|
+
|
|
409
|
+
fields:
|
|
410
|
+
- name: layout
|
|
411
|
+
type: string
|
|
412
|
+
|
|
188
413
|
warnings:
|
|
189
414
|
fields: []
|
|
190
415
|
types: []
|
|
@@ -218,6 +443,12 @@ nodes:
|
|
|
218
443
|
type: array
|
|
219
444
|
kind: Node
|
|
220
445
|
|
|
446
|
+
- name: prism_context
|
|
447
|
+
type: prism_context
|
|
448
|
+
|
|
449
|
+
- name: prism_node
|
|
450
|
+
type: prism_node
|
|
451
|
+
|
|
221
452
|
- name: LiteralNode
|
|
222
453
|
fields:
|
|
223
454
|
- name: content
|
|
@@ -241,6 +472,20 @@ nodes:
|
|
|
241
472
|
- name: is_void
|
|
242
473
|
type: boolean
|
|
243
474
|
|
|
475
|
+
- name: HTMLConditionalOpenTagNode
|
|
476
|
+
fields:
|
|
477
|
+
- name: conditional
|
|
478
|
+
type: node
|
|
479
|
+
kind:
|
|
480
|
+
- ERBIfNode
|
|
481
|
+
- ERBUnlessNode
|
|
482
|
+
|
|
483
|
+
- name: tag_name
|
|
484
|
+
type: token
|
|
485
|
+
|
|
486
|
+
- name: is_void
|
|
487
|
+
type: boolean
|
|
488
|
+
|
|
244
489
|
- name: HTMLCloseTagNode
|
|
245
490
|
fields:
|
|
246
491
|
- name: tag_opening
|
|
@@ -251,16 +496,29 @@ nodes:
|
|
|
251
496
|
|
|
252
497
|
- name: children
|
|
253
498
|
type: array
|
|
254
|
-
kind:
|
|
499
|
+
kind: WhitespaceNode
|
|
255
500
|
|
|
256
501
|
- name: tag_closing
|
|
257
502
|
type: token
|
|
258
503
|
|
|
504
|
+
- name: HTMLOmittedCloseTagNode
|
|
505
|
+
fields:
|
|
506
|
+
- name: tag_name
|
|
507
|
+
type: token
|
|
508
|
+
|
|
509
|
+
- name: HTMLVirtualCloseTagNode
|
|
510
|
+
fields:
|
|
511
|
+
- name: tag_name
|
|
512
|
+
type: token
|
|
513
|
+
|
|
259
514
|
- name: HTMLElementNode
|
|
260
515
|
fields:
|
|
261
516
|
- name: open_tag
|
|
262
517
|
type: node
|
|
263
|
-
kind:
|
|
518
|
+
kind:
|
|
519
|
+
- HTMLOpenTagNode
|
|
520
|
+
- HTMLConditionalOpenTagNode
|
|
521
|
+
- ERBOpenTagNode
|
|
264
522
|
|
|
265
523
|
- name: tag_name
|
|
266
524
|
type: token
|
|
@@ -271,12 +529,53 @@ nodes:
|
|
|
271
529
|
|
|
272
530
|
- name: close_tag
|
|
273
531
|
type: node
|
|
274
|
-
kind:
|
|
532
|
+
kind:
|
|
533
|
+
- HTMLCloseTagNode
|
|
534
|
+
- HTMLOmittedCloseTagNode
|
|
535
|
+
- HTMLVirtualCloseTagNode
|
|
536
|
+
- ERBEndNode
|
|
275
537
|
|
|
276
538
|
- name: is_void
|
|
277
539
|
type: boolean
|
|
278
540
|
|
|
279
|
-
- name:
|
|
541
|
+
- name: element_source
|
|
542
|
+
type: element_source
|
|
543
|
+
|
|
544
|
+
- name: HTMLConditionalElementNode
|
|
545
|
+
fields:
|
|
546
|
+
- name: condition
|
|
547
|
+
type: string
|
|
548
|
+
|
|
549
|
+
- name: open_conditional
|
|
550
|
+
type: node
|
|
551
|
+
kind:
|
|
552
|
+
- ERBIfNode
|
|
553
|
+
- ERBUnlessNode
|
|
554
|
+
|
|
555
|
+
- name: open_tag
|
|
556
|
+
type: borrowed_node
|
|
557
|
+
kind: HTMLOpenTagNode
|
|
558
|
+
|
|
559
|
+
- name: body
|
|
560
|
+
type: array
|
|
561
|
+
kind: Node
|
|
562
|
+
|
|
563
|
+
- name: close_tag
|
|
564
|
+
type: borrowed_node
|
|
565
|
+
kind:
|
|
566
|
+
- HTMLCloseTagNode
|
|
567
|
+
- HTMLOmittedCloseTagNode
|
|
568
|
+
|
|
569
|
+
- name: close_conditional
|
|
570
|
+
type: node
|
|
571
|
+
kind:
|
|
572
|
+
- ERBIfNode
|
|
573
|
+
- ERBUnlessNode
|
|
574
|
+
|
|
575
|
+
- name: tag_name
|
|
576
|
+
type: token
|
|
577
|
+
|
|
578
|
+
- name: element_source
|
|
280
579
|
type: element_source
|
|
281
580
|
|
|
282
581
|
- name: HTMLAttributeValueNode
|
|
@@ -298,11 +597,9 @@ nodes:
|
|
|
298
597
|
fields:
|
|
299
598
|
- name: children
|
|
300
599
|
type: array
|
|
301
|
-
kind:
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
# - ERBContentNode
|
|
305
|
-
# - WhitespaceNode
|
|
600
|
+
kind:
|
|
601
|
+
- LiteralNode
|
|
602
|
+
- ERBContentNode
|
|
306
603
|
|
|
307
604
|
- name: HTMLAttributeNode
|
|
308
605
|
fields:
|
|
@@ -317,6 +614,37 @@ nodes:
|
|
|
317
614
|
type: node
|
|
318
615
|
kind: HTMLAttributeValueNode
|
|
319
616
|
|
|
617
|
+
- name: RubyLiteralNode
|
|
618
|
+
fields:
|
|
619
|
+
- name: content
|
|
620
|
+
type: string
|
|
621
|
+
|
|
622
|
+
- name: RubyHTMLAttributesSplatNode
|
|
623
|
+
fields:
|
|
624
|
+
- name: content
|
|
625
|
+
type: string
|
|
626
|
+
|
|
627
|
+
- name: prefix
|
|
628
|
+
type: string
|
|
629
|
+
|
|
630
|
+
- name: ERBOpenTagNode
|
|
631
|
+
fields:
|
|
632
|
+
- name: tag_opening
|
|
633
|
+
type: token
|
|
634
|
+
|
|
635
|
+
- name: content
|
|
636
|
+
type: token
|
|
637
|
+
|
|
638
|
+
- name: tag_closing
|
|
639
|
+
type: token
|
|
640
|
+
|
|
641
|
+
- name: tag_name
|
|
642
|
+
type: token
|
|
643
|
+
|
|
644
|
+
- name: children
|
|
645
|
+
type: array
|
|
646
|
+
kind: Node
|
|
647
|
+
|
|
320
648
|
- name: HTMLTextNode
|
|
321
649
|
fields:
|
|
322
650
|
- name: content
|
|
@@ -395,6 +723,9 @@ nodes:
|
|
|
395
723
|
- name: valid
|
|
396
724
|
type: boolean
|
|
397
725
|
|
|
726
|
+
- name: prism_node
|
|
727
|
+
type: prism_node
|
|
728
|
+
|
|
398
729
|
- name: ERBEndNode
|
|
399
730
|
fields:
|
|
400
731
|
- name: tag_opening
|
|
@@ -438,16 +769,18 @@ nodes:
|
|
|
438
769
|
# - name: predicate
|
|
439
770
|
# type: prism_node
|
|
440
771
|
|
|
772
|
+
- name: prism_node
|
|
773
|
+
type: prism_node
|
|
774
|
+
|
|
441
775
|
- name: statements
|
|
442
776
|
type: array
|
|
443
777
|
kind: Node
|
|
444
778
|
|
|
445
779
|
- name: subsequent
|
|
446
780
|
type: node
|
|
447
|
-
kind:
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
# - ERBElseNode
|
|
781
|
+
kind:
|
|
782
|
+
- ERBIfNode
|
|
783
|
+
- ERBElseNode
|
|
451
784
|
|
|
452
785
|
- name: end_node
|
|
453
786
|
type: node
|
|
@@ -470,6 +803,9 @@ nodes:
|
|
|
470
803
|
# - name: opener
|
|
471
804
|
# type: prism_node
|
|
472
805
|
|
|
806
|
+
- name: prism_node
|
|
807
|
+
type: prism_node
|
|
808
|
+
|
|
473
809
|
- name: body
|
|
474
810
|
type: array
|
|
475
811
|
kind: Node
|
|
@@ -518,6 +854,9 @@ nodes:
|
|
|
518
854
|
# - name: predicate
|
|
519
855
|
# type: prism_node
|
|
520
856
|
|
|
857
|
+
- name: prism_node
|
|
858
|
+
type: prism_node
|
|
859
|
+
|
|
521
860
|
- name: conditions
|
|
522
861
|
type: array
|
|
523
862
|
kind: ERBWhenNode
|
|
@@ -548,6 +887,9 @@ nodes:
|
|
|
548
887
|
# - name: predicate
|
|
549
888
|
# type: prism_node
|
|
550
889
|
|
|
890
|
+
- name: prism_node
|
|
891
|
+
type: prism_node
|
|
892
|
+
|
|
551
893
|
- name: conditions
|
|
552
894
|
type: array
|
|
553
895
|
kind: ERBInNode
|
|
@@ -574,6 +916,9 @@ nodes:
|
|
|
574
916
|
# - name: predicate
|
|
575
917
|
# type: prism_node
|
|
576
918
|
|
|
919
|
+
- name: prism_node
|
|
920
|
+
type: prism_node
|
|
921
|
+
|
|
577
922
|
- name: statements
|
|
578
923
|
type: array
|
|
579
924
|
kind: Node
|
|
@@ -596,6 +941,9 @@ nodes:
|
|
|
596
941
|
# - name: predicate
|
|
597
942
|
# type: prism_node
|
|
598
943
|
|
|
944
|
+
- name: prism_node
|
|
945
|
+
type: prism_node
|
|
946
|
+
|
|
599
947
|
- name: statements
|
|
600
948
|
type: array
|
|
601
949
|
kind: Node
|
|
@@ -621,6 +969,9 @@ nodes:
|
|
|
621
969
|
# - name: collection
|
|
622
970
|
# type: prism_node
|
|
623
971
|
|
|
972
|
+
- name: prism_node
|
|
973
|
+
type: prism_node
|
|
974
|
+
|
|
624
975
|
- name: statements
|
|
625
976
|
type: array
|
|
626
977
|
kind: Node
|
|
@@ -681,6 +1032,9 @@ nodes:
|
|
|
681
1032
|
- name: tag_closing
|
|
682
1033
|
type: token
|
|
683
1034
|
|
|
1035
|
+
- name: prism_node
|
|
1036
|
+
type: prism_node
|
|
1037
|
+
|
|
684
1038
|
- name: statements
|
|
685
1039
|
type: array
|
|
686
1040
|
kind: Node
|
|
@@ -718,6 +1072,9 @@ nodes:
|
|
|
718
1072
|
# - name: predicate
|
|
719
1073
|
# type: prism_node
|
|
720
1074
|
|
|
1075
|
+
- name: prism_node
|
|
1076
|
+
type: prism_node
|
|
1077
|
+
|
|
721
1078
|
- name: statements
|
|
722
1079
|
type: array
|
|
723
1080
|
kind: Node
|
|
@@ -730,6 +1087,88 @@ nodes:
|
|
|
730
1087
|
type: node
|
|
731
1088
|
kind: ERBEndNode
|
|
732
1089
|
|
|
1090
|
+
- name: RubyRenderLocalNode
|
|
1091
|
+
fields:
|
|
1092
|
+
- name: name
|
|
1093
|
+
type: token
|
|
1094
|
+
|
|
1095
|
+
- name: value
|
|
1096
|
+
type: node
|
|
1097
|
+
kind: RubyLiteralNode
|
|
1098
|
+
|
|
1099
|
+
- name: ERBRenderNode
|
|
1100
|
+
fields:
|
|
1101
|
+
- name: tag_opening
|
|
1102
|
+
type: token
|
|
1103
|
+
|
|
1104
|
+
- name: content
|
|
1105
|
+
type: token
|
|
1106
|
+
|
|
1107
|
+
- name: tag_closing
|
|
1108
|
+
type: token
|
|
1109
|
+
|
|
1110
|
+
- name: analyzed_ruby
|
|
1111
|
+
type: analyzed_ruby
|
|
1112
|
+
|
|
1113
|
+
- name: prism_node
|
|
1114
|
+
type: prism_node
|
|
1115
|
+
|
|
1116
|
+
- name: partial
|
|
1117
|
+
type: token
|
|
1118
|
+
|
|
1119
|
+
- name: template_path
|
|
1120
|
+
type: token
|
|
1121
|
+
|
|
1122
|
+
- name: layout
|
|
1123
|
+
type: token
|
|
1124
|
+
|
|
1125
|
+
- name: file
|
|
1126
|
+
type: token
|
|
1127
|
+
|
|
1128
|
+
- name: inline_template
|
|
1129
|
+
type: token
|
|
1130
|
+
|
|
1131
|
+
- name: body
|
|
1132
|
+
type: token
|
|
1133
|
+
|
|
1134
|
+
- name: plain
|
|
1135
|
+
type: token
|
|
1136
|
+
|
|
1137
|
+
- name: html
|
|
1138
|
+
type: token
|
|
1139
|
+
|
|
1140
|
+
- name: renderable
|
|
1141
|
+
type: token
|
|
1142
|
+
|
|
1143
|
+
- name: collection
|
|
1144
|
+
type: token
|
|
1145
|
+
|
|
1146
|
+
- name: object
|
|
1147
|
+
type: token
|
|
1148
|
+
|
|
1149
|
+
- name: as_name
|
|
1150
|
+
type: token
|
|
1151
|
+
|
|
1152
|
+
- name: spacer_template
|
|
1153
|
+
type: token
|
|
1154
|
+
|
|
1155
|
+
- name: formats
|
|
1156
|
+
type: token
|
|
1157
|
+
|
|
1158
|
+
- name: variants
|
|
1159
|
+
type: token
|
|
1160
|
+
|
|
1161
|
+
- name: handlers
|
|
1162
|
+
type: token
|
|
1163
|
+
|
|
1164
|
+
- name: content_type
|
|
1165
|
+
type: token
|
|
1166
|
+
|
|
1167
|
+
- name: locals
|
|
1168
|
+
type: array
|
|
1169
|
+
kind:
|
|
1170
|
+
- RubyRenderLocalNode
|
|
1171
|
+
|
|
733
1172
|
- name: ERBYieldNode
|
|
734
1173
|
fields:
|
|
735
1174
|
- name: tag_opening
|