herb 0.8.10-arm-linux-gnu → 0.9.0-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.
Files changed (209) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +11 -3
  3. data/README.md +64 -34
  4. data/Rakefile +48 -40
  5. data/config.yml +317 -34
  6. data/ext/herb/error_helpers.c +367 -140
  7. data/ext/herb/error_helpers.h +1 -0
  8. data/ext/herb/extconf.rb +67 -28
  9. data/ext/herb/extension.c +317 -51
  10. data/ext/herb/extension.h +1 -0
  11. data/ext/herb/extension_helpers.c +23 -14
  12. data/ext/herb/extension_helpers.h +2 -2
  13. data/ext/herb/nodes.c +537 -270
  14. data/ext/herb/nodes.h +1 -0
  15. data/herb.gemspec +3 -2
  16. data/lib/herb/3.0/herb.so +0 -0
  17. data/lib/herb/3.1/herb.so +0 -0
  18. data/lib/herb/3.2/herb.so +0 -0
  19. data/lib/herb/3.3/herb.so +0 -0
  20. data/lib/herb/3.4/herb.so +0 -0
  21. data/lib/herb/4.0/herb.so +0 -0
  22. data/lib/herb/ast/helpers.rb +3 -3
  23. data/lib/herb/ast/node.rb +15 -2
  24. data/lib/herb/ast/nodes.rb +1132 -157
  25. data/lib/herb/bootstrap.rb +87 -0
  26. data/lib/herb/cli.rb +341 -31
  27. data/lib/herb/configuration.rb +248 -0
  28. data/lib/herb/defaults.yml +32 -0
  29. data/lib/herb/engine/compiler.rb +78 -11
  30. data/lib/herb/engine/debug_visitor.rb +13 -3
  31. data/lib/herb/engine/error_formatter.rb +13 -9
  32. data/lib/herb/engine/parser_error_overlay.rb +10 -6
  33. data/lib/herb/engine/validator.rb +8 -3
  34. data/lib/herb/engine/validators/nesting_validator.rb +2 -2
  35. data/lib/herb/engine.rb +82 -35
  36. data/lib/herb/errors.rb +563 -88
  37. data/lib/herb/lex_result.rb +1 -0
  38. data/lib/herb/location.rb +7 -3
  39. data/lib/herb/parse_result.rb +12 -2
  40. data/lib/herb/parser_options.rb +57 -0
  41. data/lib/herb/position.rb +1 -0
  42. data/lib/herb/prism_inspect.rb +116 -0
  43. data/lib/herb/project.rb +923 -331
  44. data/lib/herb/range.rb +1 -0
  45. data/lib/herb/token.rb +7 -1
  46. data/lib/herb/version.rb +1 -1
  47. data/lib/herb/visitor.rb +37 -2
  48. data/lib/herb/warnings.rb +6 -1
  49. data/lib/herb.rb +35 -3
  50. data/sig/herb/ast/helpers.rbs +2 -2
  51. data/sig/herb/ast/node.rbs +12 -2
  52. data/sig/herb/ast/nodes.rbs +641 -128
  53. data/sig/herb/bootstrap.rbs +31 -0
  54. data/sig/herb/configuration.rbs +89 -0
  55. data/sig/herb/engine/compiler.rbs +9 -1
  56. data/sig/herb/engine/debug_visitor.rbs +2 -0
  57. data/sig/herb/engine/validator.rbs +5 -1
  58. data/sig/herb/engine.rbs +17 -3
  59. data/sig/herb/errors.rbs +258 -63
  60. data/sig/herb/location.rbs +4 -0
  61. data/sig/herb/parse_result.rbs +4 -2
  62. data/sig/herb/parser_options.rbs +42 -0
  63. data/sig/herb/position.rbs +1 -0
  64. data/sig/herb/prism_inspect.rbs +28 -0
  65. data/sig/herb/range.rbs +1 -0
  66. data/sig/herb/token.rbs +6 -0
  67. data/sig/herb/visitor.rbs +25 -4
  68. data/sig/herb/warnings.rbs +6 -1
  69. data/sig/herb.rbs +14 -0
  70. data/sig/herb_c_extension.rbs +5 -2
  71. data/sig/serialized_ast_errors.rbs +54 -6
  72. data/sig/serialized_ast_nodes.rbs +60 -6
  73. data/src/analyze/action_view/attribute_extraction_helpers.c +290 -0
  74. data/src/analyze/action_view/content_tag.c +70 -0
  75. data/src/analyze/action_view/link_to.c +143 -0
  76. data/src/analyze/action_view/registry.c +60 -0
  77. data/src/analyze/action_view/tag.c +64 -0
  78. data/src/analyze/action_view/tag_helper_node_builders.c +305 -0
  79. data/src/analyze/action_view/tag_helpers.c +748 -0
  80. data/src/analyze/action_view/turbo_frame_tag.c +88 -0
  81. data/src/analyze/analyze.c +882 -0
  82. data/src/{analyzed_ruby.c → analyze/analyzed_ruby.c} +13 -11
  83. data/src/analyze/builders.c +343 -0
  84. data/src/analyze/conditional_elements.c +594 -0
  85. data/src/analyze/conditional_open_tags.c +640 -0
  86. data/src/analyze/control_type.c +250 -0
  87. data/src/{analyze_helpers.c → analyze/helpers.c} +48 -23
  88. data/src/analyze/invalid_structures.c +193 -0
  89. data/src/{analyze_missing_end.c → analyze/missing_end.c} +33 -22
  90. data/src/analyze/parse_errors.c +84 -0
  91. data/src/analyze/prism_annotate.c +397 -0
  92. data/src/{analyze_transform.c → analyze/transform.c} +17 -3
  93. data/src/ast_node.c +17 -7
  94. data/src/ast_nodes.c +662 -387
  95. data/src/ast_pretty_print.c +190 -6
  96. data/src/errors.c +1076 -520
  97. data/src/extract.c +145 -49
  98. data/src/herb.c +52 -34
  99. data/src/html_util.c +241 -12
  100. data/src/include/analyze/action_view/attribute_extraction_helpers.h +36 -0
  101. data/src/include/analyze/action_view/tag_helper_handler.h +41 -0
  102. data/src/include/analyze/action_view/tag_helper_node_builders.h +70 -0
  103. data/src/include/analyze/action_view/tag_helpers.h +38 -0
  104. data/src/include/{analyze.h → analyze/analyze.h} +14 -4
  105. data/src/include/{analyzed_ruby.h → analyze/analyzed_ruby.h} +3 -3
  106. data/src/include/analyze/builders.h +27 -0
  107. data/src/include/analyze/conditional_elements.h +9 -0
  108. data/src/include/analyze/conditional_open_tags.h +9 -0
  109. data/src/include/analyze/control_type.h +14 -0
  110. data/src/include/{analyze_helpers.h → analyze/helpers.h} +4 -2
  111. data/src/include/analyze/invalid_structures.h +11 -0
  112. data/src/include/analyze/prism_annotate.h +16 -0
  113. data/src/include/ast_node.h +11 -5
  114. data/src/include/ast_nodes.h +117 -38
  115. data/src/include/ast_pretty_print.h +5 -0
  116. data/src/include/element_source.h +3 -8
  117. data/src/include/errors.h +148 -55
  118. data/src/include/extract.h +21 -5
  119. data/src/include/herb.h +18 -6
  120. data/src/include/herb_prism_node.h +13 -0
  121. data/src/include/html_util.h +7 -2
  122. data/src/include/io.h +3 -1
  123. data/src/include/lex_helpers.h +29 -0
  124. data/src/include/lexer.h +1 -1
  125. data/src/include/lexer_peek_helpers.h +87 -13
  126. data/src/include/lexer_struct.h +2 -0
  127. data/src/include/location.h +2 -1
  128. data/src/include/parser.h +27 -2
  129. data/src/include/parser_helpers.h +19 -3
  130. data/src/include/pretty_print.h +10 -5
  131. data/src/include/prism_context.h +45 -0
  132. data/src/include/prism_helpers.h +10 -7
  133. data/src/include/prism_serialized.h +12 -0
  134. data/src/include/token.h +16 -4
  135. data/src/include/token_struct.h +10 -3
  136. data/src/include/utf8.h +2 -1
  137. data/src/include/util/hb_allocator.h +78 -0
  138. data/src/include/util/hb_arena.h +6 -1
  139. data/src/include/util/hb_arena_debug.h +12 -1
  140. data/src/include/util/hb_array.h +7 -3
  141. data/src/include/util/hb_buffer.h +6 -4
  142. data/src/include/util/hb_foreach.h +79 -0
  143. data/src/include/util/hb_narray.h +8 -4
  144. data/src/include/util/hb_string.h +56 -9
  145. data/src/include/util.h +6 -3
  146. data/src/include/version.h +1 -1
  147. data/src/io.c +3 -2
  148. data/src/lexer.c +42 -30
  149. data/src/lexer_peek_helpers.c +12 -74
  150. data/src/location.c +2 -2
  151. data/src/main.c +53 -28
  152. data/src/parser.c +783 -247
  153. data/src/parser_helpers.c +110 -23
  154. data/src/parser_match_tags.c +109 -48
  155. data/src/pretty_print.c +29 -24
  156. data/src/prism_helpers.c +30 -27
  157. data/src/ruby_parser.c +2 -0
  158. data/src/token.c +151 -66
  159. data/src/token_matchers.c +0 -1
  160. data/src/utf8.c +7 -6
  161. data/src/util/hb_allocator.c +341 -0
  162. data/src/util/hb_arena.c +81 -56
  163. data/src/util/hb_arena_debug.c +32 -17
  164. data/src/util/hb_array.c +30 -15
  165. data/src/util/hb_buffer.c +17 -21
  166. data/src/util/hb_narray.c +22 -7
  167. data/src/util/hb_string.c +49 -35
  168. data/src/util.c +21 -11
  169. data/src/visitor.c +47 -0
  170. data/templates/ext/herb/error_helpers.c.erb +24 -11
  171. data/templates/ext/herb/error_helpers.h.erb +1 -0
  172. data/templates/ext/herb/nodes.c.erb +50 -16
  173. data/templates/ext/herb/nodes.h.erb +1 -0
  174. data/templates/java/error_helpers.c.erb +1 -1
  175. data/templates/java/nodes.c.erb +30 -8
  176. data/templates/java/org/herb/ast/Errors.java.erb +24 -1
  177. data/templates/java/org/herb/ast/Nodes.java.erb +80 -21
  178. data/templates/javascript/packages/core/src/errors.ts.erb +16 -3
  179. data/templates/javascript/packages/core/src/node-type-guards.ts.erb +3 -1
  180. data/templates/javascript/packages/core/src/nodes.ts.erb +109 -32
  181. data/templates/javascript/packages/node/extension/error_helpers.cpp.erb +13 -4
  182. data/templates/javascript/packages/node/extension/nodes.cpp.erb +43 -4
  183. data/templates/lib/herb/ast/nodes.rb.erb +88 -31
  184. data/templates/lib/herb/errors.rb.erb +15 -3
  185. data/templates/lib/herb/visitor.rb.erb +2 -2
  186. data/templates/rust/src/ast/nodes.rs.erb +97 -44
  187. data/templates/rust/src/errors.rs.erb +2 -1
  188. data/templates/rust/src/nodes.rs.erb +167 -15
  189. data/templates/rust/src/union_types.rs.erb +60 -0
  190. data/templates/rust/src/visitor.rs.erb +81 -0
  191. data/templates/src/{analyze_missing_end.c.erb → analyze/missing_end.c.erb} +9 -6
  192. data/templates/src/{analyze_transform.c.erb → analyze/transform.c.erb} +2 -2
  193. data/templates/src/ast_nodes.c.erb +34 -26
  194. data/templates/src/ast_pretty_print.c.erb +24 -5
  195. data/templates/src/errors.c.erb +60 -54
  196. data/templates/src/include/ast_nodes.h.erb +6 -2
  197. data/templates/src/include/ast_pretty_print.h.erb +5 -0
  198. data/templates/src/include/errors.h.erb +15 -11
  199. data/templates/src/include/util/hb_foreach.h.erb +20 -0
  200. data/templates/src/parser_match_tags.c.erb +10 -4
  201. data/templates/src/visitor.c.erb +2 -2
  202. data/templates/template.rb +204 -29
  203. data/templates/wasm/error_helpers.cpp.erb +9 -5
  204. data/templates/wasm/nodes.cpp.erb +41 -4
  205. metadata +57 -16
  206. data/src/analyze.c +0 -1608
  207. data/src/element_source.c +0 -12
  208. data/src/include/util/hb_system.h +0 -9
  209. 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: `%s`, found: `%s`."
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 `%s` when expecting `%s` at (%u:%u)."
33
+ template: "Found %s when expecting %s at (%u:%u)."
34
34
  arguments:
35
- - token_type_to_string(found->type)
36
- - token_type_to_string(expected_type)
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,178 @@ 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 `&percnt;&gt;` 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
+
188
339
  warnings:
189
340
  fields: []
190
341
  types: []
@@ -218,6 +369,12 @@ nodes:
218
369
  type: array
219
370
  kind: Node
220
371
 
372
+ - name: prism_context
373
+ type: prism_context
374
+
375
+ - name: prism_node
376
+ type: prism_node
377
+
221
378
  - name: LiteralNode
222
379
  fields:
223
380
  - name: content
@@ -241,6 +398,20 @@ nodes:
241
398
  - name: is_void
242
399
  type: boolean
243
400
 
401
+ - name: HTMLConditionalOpenTagNode
402
+ fields:
403
+ - name: conditional
404
+ type: node
405
+ kind:
406
+ - ERBIfNode
407
+ - ERBUnlessNode
408
+
409
+ - name: tag_name
410
+ type: token
411
+
412
+ - name: is_void
413
+ type: boolean
414
+
244
415
  - name: HTMLCloseTagNode
245
416
  fields:
246
417
  - name: tag_opening
@@ -251,16 +422,29 @@ nodes:
251
422
 
252
423
  - name: children
253
424
  type: array
254
- kind: Node
425
+ kind: WhitespaceNode
255
426
 
256
427
  - name: tag_closing
257
428
  type: token
258
429
 
430
+ - name: HTMLOmittedCloseTagNode
431
+ fields:
432
+ - name: tag_name
433
+ type: token
434
+
435
+ - name: HTMLVirtualCloseTagNode
436
+ fields:
437
+ - name: tag_name
438
+ type: token
439
+
259
440
  - name: HTMLElementNode
260
441
  fields:
261
442
  - name: open_tag
262
443
  type: node
263
- kind: HTMLOpenTagNode
444
+ kind:
445
+ - HTMLOpenTagNode
446
+ - HTMLConditionalOpenTagNode
447
+ - ERBOpenTagNode
264
448
 
265
449
  - name: tag_name
266
450
  type: token
@@ -271,12 +455,53 @@ nodes:
271
455
 
272
456
  - name: close_tag
273
457
  type: node
274
- kind: HTMLCloseTagNode
458
+ kind:
459
+ - HTMLCloseTagNode
460
+ - HTMLOmittedCloseTagNode
461
+ - HTMLVirtualCloseTagNode
462
+ - ERBEndNode
275
463
 
276
464
  - name: is_void
277
465
  type: boolean
278
466
 
279
- - name: source
467
+ - name: element_source
468
+ type: element_source
469
+
470
+ - name: HTMLConditionalElementNode
471
+ fields:
472
+ - name: condition
473
+ type: string
474
+
475
+ - name: open_conditional
476
+ type: node
477
+ kind:
478
+ - ERBIfNode
479
+ - ERBUnlessNode
480
+
481
+ - name: open_tag
482
+ type: borrowed_node
483
+ kind: HTMLOpenTagNode
484
+
485
+ - name: body
486
+ type: array
487
+ kind: Node
488
+
489
+ - name: close_tag
490
+ type: borrowed_node
491
+ kind:
492
+ - HTMLCloseTagNode
493
+ - HTMLOmittedCloseTagNode
494
+
495
+ - name: close_conditional
496
+ type: node
497
+ kind:
498
+ - ERBIfNode
499
+ - ERBUnlessNode
500
+
501
+ - name: tag_name
502
+ type: token
503
+
504
+ - name: element_source
280
505
  type: element_source
281
506
 
282
507
  - name: HTMLAttributeValueNode
@@ -298,11 +523,9 @@ nodes:
298
523
  fields:
299
524
  - name: children
300
525
  type: array
301
- kind: Node
302
- # kind:
303
- # - LiteralNode
304
- # - ERBContentNode
305
- # - WhitespaceNode
526
+ kind:
527
+ - LiteralNode
528
+ - ERBContentNode
306
529
 
307
530
  - name: HTMLAttributeNode
308
531
  fields:
@@ -317,6 +540,37 @@ nodes:
317
540
  type: node
318
541
  kind: HTMLAttributeValueNode
319
542
 
543
+ - name: RubyLiteralNode
544
+ fields:
545
+ - name: content
546
+ type: string
547
+
548
+ - name: RubyHTMLAttributesSplatNode
549
+ fields:
550
+ - name: content
551
+ type: string
552
+
553
+ - name: prefix
554
+ type: string
555
+
556
+ - name: ERBOpenTagNode
557
+ fields:
558
+ - name: tag_opening
559
+ type: token
560
+
561
+ - name: content
562
+ type: token
563
+
564
+ - name: tag_closing
565
+ type: token
566
+
567
+ - name: tag_name
568
+ type: token
569
+
570
+ - name: children
571
+ type: array
572
+ kind: Node
573
+
320
574
  - name: HTMLTextNode
321
575
  fields:
322
576
  - name: content
@@ -395,6 +649,9 @@ nodes:
395
649
  - name: valid
396
650
  type: boolean
397
651
 
652
+ - name: prism_node
653
+ type: prism_node
654
+
398
655
  - name: ERBEndNode
399
656
  fields:
400
657
  - name: tag_opening
@@ -438,16 +695,18 @@ nodes:
438
695
  # - name: predicate
439
696
  # type: prism_node
440
697
 
698
+ - name: prism_node
699
+ type: prism_node
700
+
441
701
  - name: statements
442
702
  type: array
443
703
  kind: Node
444
704
 
445
705
  - name: subsequent
446
706
  type: node
447
- kind: Node
448
- # kind:
449
- # - ERBIfNode
450
- # - ERBElseNode
707
+ kind:
708
+ - ERBIfNode
709
+ - ERBElseNode
451
710
 
452
711
  - name: end_node
453
712
  type: node
@@ -470,6 +729,9 @@ nodes:
470
729
  # - name: opener
471
730
  # type: prism_node
472
731
 
732
+ - name: prism_node
733
+ type: prism_node
734
+
473
735
  - name: body
474
736
  type: array
475
737
  kind: Node
@@ -518,6 +780,9 @@ nodes:
518
780
  # - name: predicate
519
781
  # type: prism_node
520
782
 
783
+ - name: prism_node
784
+ type: prism_node
785
+
521
786
  - name: conditions
522
787
  type: array
523
788
  kind: ERBWhenNode
@@ -548,6 +813,9 @@ nodes:
548
813
  # - name: predicate
549
814
  # type: prism_node
550
815
 
816
+ - name: prism_node
817
+ type: prism_node
818
+
551
819
  - name: conditions
552
820
  type: array
553
821
  kind: ERBInNode
@@ -574,6 +842,9 @@ nodes:
574
842
  # - name: predicate
575
843
  # type: prism_node
576
844
 
845
+ - name: prism_node
846
+ type: prism_node
847
+
577
848
  - name: statements
578
849
  type: array
579
850
  kind: Node
@@ -596,6 +867,9 @@ nodes:
596
867
  # - name: predicate
597
868
  # type: prism_node
598
869
 
870
+ - name: prism_node
871
+ type: prism_node
872
+
599
873
  - name: statements
600
874
  type: array
601
875
  kind: Node
@@ -621,6 +895,9 @@ nodes:
621
895
  # - name: collection
622
896
  # type: prism_node
623
897
 
898
+ - name: prism_node
899
+ type: prism_node
900
+
624
901
  - name: statements
625
902
  type: array
626
903
  kind: Node
@@ -681,6 +958,9 @@ nodes:
681
958
  - name: tag_closing
682
959
  type: token
683
960
 
961
+ - name: prism_node
962
+ type: prism_node
963
+
684
964
  - name: statements
685
965
  type: array
686
966
  kind: Node
@@ -718,6 +998,9 @@ nodes:
718
998
  # - name: predicate
719
999
  # type: prism_node
720
1000
 
1001
+ - name: prism_node
1002
+ type: prism_node
1003
+
721
1004
  - name: statements
722
1005
  type: array
723
1006
  kind: Node