@herb-tools/node 0.9.0 → 0.9.1

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 (44) hide show
  1. package/binding.gyp +1 -0
  2. package/dist/herb-node.cjs +1 -1
  3. package/dist/herb-node.esm.js +1 -1
  4. package/extension/error_helpers.cpp +204 -1
  5. package/extension/error_helpers.h +8 -1
  6. package/extension/extension_helpers.cpp +3 -1
  7. package/extension/herb.cpp +11 -0
  8. package/extension/libherb/analyze/action_view/attribute_extraction_helpers.c +14 -1
  9. package/extension/libherb/analyze/action_view/content_tag.c +19 -11
  10. package/extension/libherb/analyze/action_view/link_to.c +25 -1
  11. package/extension/libherb/analyze/action_view/registry.c +23 -0
  12. package/extension/libherb/analyze/action_view/tag.c +14 -8
  13. package/extension/libherb/analyze/action_view/tag_helper_handler.h +2 -0
  14. package/extension/libherb/analyze/action_view/tag_helpers.c +78 -11
  15. package/extension/libherb/analyze/analyze.c +3 -0
  16. package/extension/libherb/analyze/missing_end.c +1 -1
  17. package/extension/libherb/analyze/prism_annotate.c +4 -2
  18. package/extension/libherb/analyze/render_nodes.c +761 -0
  19. package/extension/libherb/analyze/render_nodes.h +11 -0
  20. package/extension/libherb/analyze/transform.c +8 -1
  21. package/extension/libherb/ast_nodes.c +98 -1
  22. package/extension/libherb/ast_nodes.h +38 -1
  23. package/extension/libherb/ast_pretty_print.c +75 -1
  24. package/extension/libherb/ast_pretty_print.h +1 -1
  25. package/extension/libherb/errors.c +380 -1
  26. package/extension/libherb/errors.h +59 -1
  27. package/extension/libherb/include/analyze/action_view/tag_helper_handler.h +2 -0
  28. package/extension/libherb/include/analyze/render_nodes.h +11 -0
  29. package/extension/libherb/include/ast_nodes.h +38 -1
  30. package/extension/libherb/include/ast_pretty_print.h +1 -1
  31. package/extension/libherb/include/errors.h +59 -1
  32. package/extension/libherb/include/parser.h +1 -0
  33. package/extension/libherb/include/util/hb_foreach.h +1 -1
  34. package/extension/libherb/include/version.h +1 -1
  35. package/extension/libherb/parser.c +1 -0
  36. package/extension/libherb/parser.h +1 -0
  37. package/extension/libherb/parser_match_tags.c +21 -1
  38. package/extension/libherb/util/hb_foreach.h +1 -1
  39. package/extension/libherb/version.h +1 -1
  40. package/extension/libherb/visitor.c +21 -1
  41. package/extension/nodes.cpp +143 -1
  42. package/extension/nodes.h +3 -1
  43. package/package.json +2 -2
  44. package/CHANGELOG.md +0 -19
@@ -0,0 +1,11 @@
1
+ #ifndef HERB_ANALYZE_RENDER_NODES_H
2
+ #define HERB_ANALYZE_RENDER_NODES_H
3
+
4
+ #include "../ast_nodes.h"
5
+ #include "analyze.h"
6
+
7
+ #include <stdbool.h>
8
+
9
+ bool transform_render_nodes(const AST_NODE_T* node, void* data);
10
+
11
+ #endif
@@ -1,5 +1,5 @@
1
1
  // NOTE: This file is generated by the templates/template.rb script and should not
2
- // be modified manually. See /Users/marcoroth/Development/herb-release-0.9.0/templates/src/analyze/transform.c.erb
2
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.9.1/templates/src/analyze/transform.c.erb
3
3
 
4
4
  #include "../include/analyze/analyze.h"
5
5
  #include "../include/visitor.h"
@@ -197,6 +197,13 @@ bool transform_erb_nodes(const AST_NODE_T* node, void* data) {
197
197
  hb_array_free(&old_array);
198
198
  }
199
199
 
200
+ if (node->type == AST_ERB_RENDER_NODE) {
201
+ AST_ERB_RENDER_NODE_T* erb_render_node = (AST_ERB_RENDER_NODE_T*) node;
202
+ hb_array_T* old_array = erb_render_node->locals;
203
+ erb_render_node->locals = rewrite_node_array((AST_NODE_T*) node, erb_render_node->locals, context);
204
+ hb_array_free(&old_array);
205
+ }
206
+
200
207
  if (node->type == AST_ERB_IN_NODE) {
201
208
  AST_ERB_IN_NODE_T* erb_in_node = (AST_ERB_IN_NODE_T*) node;
202
209
  hb_array_T* old_array = erb_in_node->statements;
@@ -1,5 +1,5 @@
1
1
  // NOTE: This file is generated by the templates/template.rb script and should not
2
- // be modified manually. See /Users/marcoroth/Development/herb-release-0.9.0/templates/src/ast_nodes.c.erb
2
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.9.1/templates/src/ast_nodes.c.erb
3
3
 
4
4
  #include <stdio.h>
5
5
  #include <stdbool.h>
@@ -568,6 +568,53 @@ AST_ERB_UNLESS_NODE_T* ast_erb_unless_node_init(token_T* tag_opening, token_T* c
568
568
  return erb_unless_node;
569
569
  }
570
570
 
571
+ AST_RUBY_RENDER_LOCAL_NODE_T* ast_ruby_render_local_node_init(token_T* name, struct AST_RUBY_LITERAL_NODE_STRUCT* value, position_T start_position, position_T end_position, hb_array_T* errors, hb_allocator_T* allocator) {
572
+ AST_RUBY_RENDER_LOCAL_NODE_T* ruby_render_local_node = hb_allocator_alloc(allocator, sizeof(AST_RUBY_RENDER_LOCAL_NODE_T));
573
+
574
+ if (!ruby_render_local_node) { return NULL; }
575
+
576
+ ast_node_init(&ruby_render_local_node->base, AST_RUBY_RENDER_LOCAL_NODE, start_position, end_position, errors, allocator);
577
+
578
+ ruby_render_local_node->name = token_copy(name, allocator);
579
+ ruby_render_local_node->value = value;
580
+
581
+ return ruby_render_local_node;
582
+ }
583
+
584
+ AST_ERB_RENDER_NODE_T* ast_erb_render_node_init(token_T* tag_opening, token_T* content, token_T* tag_closing, analyzed_ruby_T* analyzed_ruby, herb_prism_node_T prism_node, token_T* partial, token_T* template_path, token_T* layout, token_T* file, token_T* inline_template, token_T* body, token_T* plain, token_T* html, token_T* renderable, token_T* collection, token_T* object, token_T* as_name, token_T* spacer_template, token_T* formats, token_T* variants, token_T* handlers, token_T* content_type, hb_array_T* locals, position_T start_position, position_T end_position, hb_array_T* errors, hb_allocator_T* allocator) {
585
+ AST_ERB_RENDER_NODE_T* erb_render_node = hb_allocator_alloc(allocator, sizeof(AST_ERB_RENDER_NODE_T));
586
+
587
+ if (!erb_render_node) { return NULL; }
588
+
589
+ ast_node_init(&erb_render_node->base, AST_ERB_RENDER_NODE, start_position, end_position, errors, allocator);
590
+
591
+ erb_render_node->tag_opening = token_copy(tag_opening, allocator);
592
+ erb_render_node->content = token_copy(content, allocator);
593
+ erb_render_node->tag_closing = token_copy(tag_closing, allocator);
594
+ erb_render_node->analyzed_ruby = analyzed_ruby;
595
+ erb_render_node->prism_node = prism_node;
596
+ erb_render_node->partial = token_copy(partial, allocator);
597
+ erb_render_node->template_path = token_copy(template_path, allocator);
598
+ erb_render_node->layout = token_copy(layout, allocator);
599
+ erb_render_node->file = token_copy(file, allocator);
600
+ erb_render_node->inline_template = token_copy(inline_template, allocator);
601
+ erb_render_node->body = token_copy(body, allocator);
602
+ erb_render_node->plain = token_copy(plain, allocator);
603
+ erb_render_node->html = token_copy(html, allocator);
604
+ erb_render_node->renderable = token_copy(renderable, allocator);
605
+ erb_render_node->collection = token_copy(collection, allocator);
606
+ erb_render_node->object = token_copy(object, allocator);
607
+ erb_render_node->as_name = token_copy(as_name, allocator);
608
+ erb_render_node->spacer_template = token_copy(spacer_template, allocator);
609
+ erb_render_node->formats = token_copy(formats, allocator);
610
+ erb_render_node->variants = token_copy(variants, allocator);
611
+ erb_render_node->handlers = token_copy(handlers, allocator);
612
+ erb_render_node->content_type = token_copy(content_type, allocator);
613
+ erb_render_node->locals = locals;
614
+
615
+ return erb_render_node;
616
+ }
617
+
571
618
  AST_ERB_YIELD_NODE_T* ast_erb_yield_node_init(token_T* tag_opening, token_T* content, token_T* tag_closing, position_T start_position, position_T end_position, hb_array_T* errors, hb_allocator_T* allocator) {
572
619
  AST_ERB_YIELD_NODE_T* erb_yield_node = hb_allocator_alloc(allocator, sizeof(AST_ERB_YIELD_NODE_T));
573
620
 
@@ -636,6 +683,8 @@ hb_string_T ast_node_type_to_string(AST_NODE_T* node) {
636
683
  case AST_ERB_ENSURE_NODE: return hb_string("AST_ERB_ENSURE_NODE");
637
684
  case AST_ERB_BEGIN_NODE: return hb_string("AST_ERB_BEGIN_NODE");
638
685
  case AST_ERB_UNLESS_NODE: return hb_string("AST_ERB_UNLESS_NODE");
686
+ case AST_RUBY_RENDER_LOCAL_NODE: return hb_string("AST_RUBY_RENDER_LOCAL_NODE");
687
+ case AST_ERB_RENDER_NODE: return hb_string("AST_ERB_RENDER_NODE");
639
688
  case AST_ERB_YIELD_NODE: return hb_string("AST_ERB_YIELD_NODE");
640
689
  case AST_ERB_IN_NODE: return hb_string("AST_ERB_IN_NODE");
641
690
  }
@@ -681,6 +730,8 @@ hb_string_T ast_node_human_type(AST_NODE_T* node) {
681
730
  case AST_ERB_ENSURE_NODE: return hb_string("ERBEnsureNode");
682
731
  case AST_ERB_BEGIN_NODE: return hb_string("ERBBeginNode");
683
732
  case AST_ERB_UNLESS_NODE: return hb_string("ERBUnlessNode");
733
+ case AST_RUBY_RENDER_LOCAL_NODE: return hb_string("RubyRenderLocalNode");
734
+ case AST_ERB_RENDER_NODE: return hb_string("ERBRenderNode");
684
735
  case AST_ERB_YIELD_NODE: return hb_string("ERBYieldNode");
685
736
  case AST_ERB_IN_NODE: return hb_string("ERBInNode");
686
737
  }
@@ -1222,6 +1273,50 @@ static void ast_free_erb_unless_node(AST_ERB_UNLESS_NODE_T* erb_unless_node, hb_
1222
1273
  ast_free_base_node(&erb_unless_node->base, allocator);
1223
1274
  }
1224
1275
 
1276
+ static void ast_free_ruby_render_local_node(AST_RUBY_RENDER_LOCAL_NODE_T* ruby_render_local_node, hb_allocator_T* allocator) {
1277
+ if (ruby_render_local_node->name != NULL) { token_free(ruby_render_local_node->name, allocator); }
1278
+ ast_node_free((AST_NODE_T*) ruby_render_local_node->value, allocator);
1279
+
1280
+ ast_free_base_node(&ruby_render_local_node->base, allocator);
1281
+ }
1282
+
1283
+ static void ast_free_erb_render_node(AST_ERB_RENDER_NODE_T* erb_render_node, hb_allocator_T* allocator) {
1284
+ if (erb_render_node->tag_opening != NULL) { token_free(erb_render_node->tag_opening, allocator); }
1285
+ if (erb_render_node->content != NULL) { token_free(erb_render_node->content, allocator); }
1286
+ if (erb_render_node->tag_closing != NULL) { token_free(erb_render_node->tag_closing, allocator); }
1287
+ if (erb_render_node->analyzed_ruby != NULL) {
1288
+ free_analyzed_ruby(erb_render_node->analyzed_ruby);
1289
+ }
1290
+ /* prism_node is a borrowed reference into the prism context, not freed here */
1291
+ if (erb_render_node->partial != NULL) { token_free(erb_render_node->partial, allocator); }
1292
+ if (erb_render_node->template_path != NULL) { token_free(erb_render_node->template_path, allocator); }
1293
+ if (erb_render_node->layout != NULL) { token_free(erb_render_node->layout, allocator); }
1294
+ if (erb_render_node->file != NULL) { token_free(erb_render_node->file, allocator); }
1295
+ if (erb_render_node->inline_template != NULL) { token_free(erb_render_node->inline_template, allocator); }
1296
+ if (erb_render_node->body != NULL) { token_free(erb_render_node->body, allocator); }
1297
+ if (erb_render_node->plain != NULL) { token_free(erb_render_node->plain, allocator); }
1298
+ if (erb_render_node->html != NULL) { token_free(erb_render_node->html, allocator); }
1299
+ if (erb_render_node->renderable != NULL) { token_free(erb_render_node->renderable, allocator); }
1300
+ if (erb_render_node->collection != NULL) { token_free(erb_render_node->collection, allocator); }
1301
+ if (erb_render_node->object != NULL) { token_free(erb_render_node->object, allocator); }
1302
+ if (erb_render_node->as_name != NULL) { token_free(erb_render_node->as_name, allocator); }
1303
+ if (erb_render_node->spacer_template != NULL) { token_free(erb_render_node->spacer_template, allocator); }
1304
+ if (erb_render_node->formats != NULL) { token_free(erb_render_node->formats, allocator); }
1305
+ if (erb_render_node->variants != NULL) { token_free(erb_render_node->variants, allocator); }
1306
+ if (erb_render_node->handlers != NULL) { token_free(erb_render_node->handlers, allocator); }
1307
+ if (erb_render_node->content_type != NULL) { token_free(erb_render_node->content_type, allocator); }
1308
+ if (erb_render_node->locals != NULL) {
1309
+ for (size_t i = 0; i < hb_array_size(erb_render_node->locals); i++) {
1310
+ AST_NODE_T* child = hb_array_get(erb_render_node->locals, i);
1311
+ if (child) { ast_node_free(child, allocator); }
1312
+ }
1313
+
1314
+ hb_array_free(&erb_render_node->locals);
1315
+ }
1316
+
1317
+ ast_free_base_node(&erb_render_node->base, allocator);
1318
+ }
1319
+
1225
1320
  static void ast_free_erb_yield_node(AST_ERB_YIELD_NODE_T* erb_yield_node, hb_allocator_T* allocator) {
1226
1321
  if (erb_yield_node->tag_opening != NULL) { token_free(erb_yield_node->tag_opening, allocator); }
1227
1322
  if (erb_yield_node->content != NULL) { token_free(erb_yield_node->content, allocator); }
@@ -1287,6 +1382,8 @@ void ast_node_free(AST_NODE_T* node, hb_allocator_T* allocator) {
1287
1382
  case AST_ERB_ENSURE_NODE: ast_free_erb_ensure_node((AST_ERB_ENSURE_NODE_T*) node, allocator); break;
1288
1383
  case AST_ERB_BEGIN_NODE: ast_free_erb_begin_node((AST_ERB_BEGIN_NODE_T*) node, allocator); break;
1289
1384
  case AST_ERB_UNLESS_NODE: ast_free_erb_unless_node((AST_ERB_UNLESS_NODE_T*) node, allocator); break;
1385
+ case AST_RUBY_RENDER_LOCAL_NODE: ast_free_ruby_render_local_node((AST_RUBY_RENDER_LOCAL_NODE_T*) node, allocator); break;
1386
+ case AST_ERB_RENDER_NODE: ast_free_erb_render_node((AST_ERB_RENDER_NODE_T*) node, allocator); break;
1290
1387
  case AST_ERB_YIELD_NODE: ast_free_erb_yield_node((AST_ERB_YIELD_NODE_T*) node, allocator); break;
1291
1388
  case AST_ERB_IN_NODE: ast_free_erb_in_node((AST_ERB_IN_NODE_T*) node, allocator); break;
1292
1389
  }
@@ -1,5 +1,5 @@
1
1
  // NOTE: This file is generated by the templates/template.rb script and should not
2
- // be modified manually. See /Users/marcoroth/Development/herb-release-0.9.0/templates/src/include/ast_nodes.h.erb
2
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.9.1/templates/src/include/ast_nodes.h.erb
3
3
 
4
4
  #ifndef HERB_AST_NODES_H
5
5
  #define HERB_AST_NODES_H
@@ -57,6 +57,8 @@ typedef enum {
57
57
  AST_ERB_ENSURE_NODE,
58
58
  AST_ERB_BEGIN_NODE,
59
59
  AST_ERB_UNLESS_NODE,
60
+ AST_RUBY_RENDER_LOCAL_NODE,
61
+ AST_ERB_RENDER_NODE,
60
62
  AST_ERB_YIELD_NODE,
61
63
  AST_ERB_IN_NODE,
62
64
  } ast_node_type_T;
@@ -368,6 +370,39 @@ typedef struct AST_ERB_UNLESS_NODE_STRUCT {
368
370
  struct AST_ERB_END_NODE_STRUCT* end_node;
369
371
  } AST_ERB_UNLESS_NODE_T;
370
372
 
373
+ typedef struct AST_RUBY_RENDER_LOCAL_NODE_STRUCT {
374
+ AST_NODE_T base;
375
+ token_T* name;
376
+ struct AST_RUBY_LITERAL_NODE_STRUCT* value;
377
+ } AST_RUBY_RENDER_LOCAL_NODE_T;
378
+
379
+ typedef struct AST_ERB_RENDER_NODE_STRUCT {
380
+ AST_NODE_T base;
381
+ token_T* tag_opening;
382
+ token_T* content;
383
+ token_T* tag_closing;
384
+ analyzed_ruby_T* analyzed_ruby;
385
+ herb_prism_node_T prism_node;
386
+ token_T* partial;
387
+ token_T* template_path;
388
+ token_T* layout;
389
+ token_T* file;
390
+ token_T* inline_template;
391
+ token_T* body;
392
+ token_T* plain;
393
+ token_T* html;
394
+ token_T* renderable;
395
+ token_T* collection;
396
+ token_T* object;
397
+ token_T* as_name;
398
+ token_T* spacer_template;
399
+ token_T* formats;
400
+ token_T* variants;
401
+ token_T* handlers;
402
+ token_T* content_type;
403
+ hb_array_T* locals;
404
+ } AST_ERB_RENDER_NODE_T;
405
+
371
406
  typedef struct AST_ERB_YIELD_NODE_STRUCT {
372
407
  AST_NODE_T base;
373
408
  token_T* tag_opening;
@@ -420,6 +455,8 @@ AST_ERB_RESCUE_NODE_T* ast_erb_rescue_node_init(token_T* tag_opening, token_T* c
420
455
  AST_ERB_ENSURE_NODE_T* ast_erb_ensure_node_init(token_T* tag_opening, token_T* content, token_T* tag_closing, hb_array_T* statements, position_T start_position, position_T end_position, hb_array_T* errors, hb_allocator_T* allocator);
421
456
  AST_ERB_BEGIN_NODE_T* ast_erb_begin_node_init(token_T* tag_opening, token_T* content, token_T* tag_closing, herb_prism_node_T prism_node, hb_array_T* statements, struct AST_ERB_RESCUE_NODE_STRUCT* rescue_clause, struct AST_ERB_ELSE_NODE_STRUCT* else_clause, struct AST_ERB_ENSURE_NODE_STRUCT* ensure_clause, struct AST_ERB_END_NODE_STRUCT* end_node, position_T start_position, position_T end_position, hb_array_T* errors, hb_allocator_T* allocator);
422
457
  AST_ERB_UNLESS_NODE_T* ast_erb_unless_node_init(token_T* tag_opening, token_T* content, token_T* tag_closing, location_T* then_keyword, herb_prism_node_T prism_node, hb_array_T* statements, struct AST_ERB_ELSE_NODE_STRUCT* else_clause, struct AST_ERB_END_NODE_STRUCT* end_node, position_T start_position, position_T end_position, hb_array_T* errors, hb_allocator_T* allocator);
458
+ AST_RUBY_RENDER_LOCAL_NODE_T* ast_ruby_render_local_node_init(token_T* name, struct AST_RUBY_LITERAL_NODE_STRUCT* value, position_T start_position, position_T end_position, hb_array_T* errors, hb_allocator_T* allocator);
459
+ AST_ERB_RENDER_NODE_T* ast_erb_render_node_init(token_T* tag_opening, token_T* content, token_T* tag_closing, analyzed_ruby_T* analyzed_ruby, herb_prism_node_T prism_node, token_T* partial, token_T* template_path, token_T* layout, token_T* file, token_T* inline_template, token_T* body, token_T* plain, token_T* html, token_T* renderable, token_T* collection, token_T* object, token_T* as_name, token_T* spacer_template, token_T* formats, token_T* variants, token_T* handlers, token_T* content_type, hb_array_T* locals, position_T start_position, position_T end_position, hb_array_T* errors, hb_allocator_T* allocator);
423
460
  AST_ERB_YIELD_NODE_T* ast_erb_yield_node_init(token_T* tag_opening, token_T* content, token_T* tag_closing, position_T start_position, position_T end_position, hb_array_T* errors, hb_allocator_T* allocator);
424
461
  AST_ERB_IN_NODE_T* ast_erb_in_node_init(token_T* tag_opening, token_T* content, token_T* tag_closing, location_T* then_keyword, hb_array_T* statements, position_T start_position, position_T end_position, hb_array_T* errors, hb_allocator_T* allocator);
425
462
 
@@ -1,5 +1,5 @@
1
1
  // NOTE: This file is generated by the templates/template.rb script and should not
2
- // be modified manually. See /Users/marcoroth/Development/herb-release-0.9.0/templates/src/ast_pretty_print.c.erb
2
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.9.1/templates/src/ast_pretty_print.c.erb
3
3
 
4
4
  #ifdef HERB_EXCLUDE_PRETTYPRINT
5
5
  // Pretty print support excluded
@@ -856,6 +856,80 @@ void ast_pretty_print_node(AST_NODE_T* node, const size_t indent, const size_t r
856
856
 
857
857
  } break;
858
858
 
859
+ case AST_RUBY_RENDER_LOCAL_NODE: {
860
+ const AST_RUBY_RENDER_LOCAL_NODE_T* ruby_render_local_node = (AST_RUBY_RENDER_LOCAL_NODE_T*) node;
861
+
862
+ pretty_print_errors(node, indent, relative_indent, false, buffer);
863
+ pretty_print_token_property(ruby_render_local_node->name, hb_string("name"), indent, relative_indent, false, buffer);
864
+
865
+ pretty_print_label(hb_string("value"), indent, relative_indent, true, buffer);
866
+
867
+ if (ruby_render_local_node->value) {
868
+ hb_buffer_append(buffer, "\n");
869
+ pretty_print_indent(buffer, indent);
870
+ pretty_print_indent(buffer, relative_indent + 1);
871
+
872
+ hb_buffer_append(buffer, "└── ");
873
+ ast_pretty_print_node((AST_NODE_T*) ruby_render_local_node->value, indent, relative_indent + 2, buffer);
874
+ } else {
875
+ hb_buffer_append(buffer, " ∅\n");
876
+ }
877
+ hb_buffer_append(buffer, "\n");
878
+
879
+ } break;
880
+
881
+ case AST_ERB_RENDER_NODE: {
882
+ const AST_ERB_RENDER_NODE_T* erb_render_node = (AST_ERB_RENDER_NODE_T*) node;
883
+
884
+ pretty_print_errors(node, indent, relative_indent, false, buffer);
885
+ pretty_print_token_property(erb_render_node->tag_opening, hb_string("tag_opening"), indent, relative_indent, false, buffer);
886
+ pretty_print_token_property(erb_render_node->content, hb_string("content"), indent, relative_indent, false, buffer);
887
+ pretty_print_token_property(erb_render_node->tag_closing, hb_string("tag_closing"), indent, relative_indent, false, buffer);
888
+ if (erb_render_node->analyzed_ruby) {
889
+ pretty_print_boolean_property(hb_string("if_node"), has_if_node(erb_render_node->analyzed_ruby), indent, relative_indent, false, buffer);
890
+ pretty_print_boolean_property(hb_string("elsif_node"), has_elsif_node(erb_render_node->analyzed_ruby), indent, relative_indent, false, buffer);
891
+ pretty_print_boolean_property(hb_string("else_node"), has_else_node(erb_render_node->analyzed_ruby), indent, relative_indent, false, buffer);
892
+ pretty_print_boolean_property(hb_string("end"), has_end(erb_render_node->analyzed_ruby), indent, relative_indent, false, buffer);
893
+ pretty_print_boolean_property(hb_string("block_node"), has_block_node(erb_render_node->analyzed_ruby), indent, relative_indent, false, buffer);
894
+ pretty_print_boolean_property(hb_string("block_closing"), has_block_closing(erb_render_node->analyzed_ruby), indent, relative_indent, false, buffer);
895
+ pretty_print_boolean_property(hb_string("case_node"), has_case_node(erb_render_node->analyzed_ruby), indent, relative_indent, false, buffer);
896
+ pretty_print_boolean_property(hb_string("when_node"), has_when_node(erb_render_node->analyzed_ruby), indent, relative_indent, false, buffer);
897
+ pretty_print_boolean_property(hb_string("for_node"), has_for_node(erb_render_node->analyzed_ruby), indent, relative_indent, false, buffer);
898
+ pretty_print_boolean_property(hb_string("while_node"), has_while_node(erb_render_node->analyzed_ruby), indent, relative_indent, false, buffer);
899
+ pretty_print_boolean_property(hb_string("until_node"), has_until_node(erb_render_node->analyzed_ruby), indent, relative_indent, false, buffer);
900
+ pretty_print_boolean_property(hb_string("begin_node"), has_begin_node(erb_render_node->analyzed_ruby), indent, relative_indent, false, buffer);
901
+ pretty_print_boolean_property(hb_string("rescue_node"), has_rescue_node(erb_render_node->analyzed_ruby), indent, relative_indent, false, buffer);
902
+ pretty_print_boolean_property(hb_string("ensure_node"), has_ensure_node(erb_render_node->analyzed_ruby), indent, relative_indent, false, buffer);
903
+ pretty_print_boolean_property(hb_string("unless_node"), has_unless_node(erb_render_node->analyzed_ruby), indent, relative_indent, false, buffer);
904
+ } else {
905
+ pretty_print_label(hb_string("analyzed_ruby"), indent, relative_indent, false, buffer);
906
+ hb_buffer_append(buffer, " ∅\n");
907
+ }
908
+
909
+ if (erb_render_node->prism_node.node != NULL) {
910
+ pretty_print_label(hb_string("prism_node"), indent, relative_indent, false, buffer);
911
+ hb_buffer_append(buffer, " (pm_node_t*)\n");
912
+ }
913
+ pretty_print_token_property(erb_render_node->partial, hb_string("partial"), indent, relative_indent, false, buffer);
914
+ pretty_print_token_property(erb_render_node->template_path, hb_string("template_path"), indent, relative_indent, false, buffer);
915
+ pretty_print_token_property(erb_render_node->layout, hb_string("layout"), indent, relative_indent, false, buffer);
916
+ pretty_print_token_property(erb_render_node->file, hb_string("file"), indent, relative_indent, false, buffer);
917
+ pretty_print_token_property(erb_render_node->inline_template, hb_string("inline_template"), indent, relative_indent, false, buffer);
918
+ pretty_print_token_property(erb_render_node->body, hb_string("body"), indent, relative_indent, false, buffer);
919
+ pretty_print_token_property(erb_render_node->plain, hb_string("plain"), indent, relative_indent, false, buffer);
920
+ pretty_print_token_property(erb_render_node->html, hb_string("html"), indent, relative_indent, false, buffer);
921
+ pretty_print_token_property(erb_render_node->renderable, hb_string("renderable"), indent, relative_indent, false, buffer);
922
+ pretty_print_token_property(erb_render_node->collection, hb_string("collection"), indent, relative_indent, false, buffer);
923
+ pretty_print_token_property(erb_render_node->object, hb_string("object"), indent, relative_indent, false, buffer);
924
+ pretty_print_token_property(erb_render_node->as_name, hb_string("as_name"), indent, relative_indent, false, buffer);
925
+ pretty_print_token_property(erb_render_node->spacer_template, hb_string("spacer_template"), indent, relative_indent, false, buffer);
926
+ pretty_print_token_property(erb_render_node->formats, hb_string("formats"), indent, relative_indent, false, buffer);
927
+ pretty_print_token_property(erb_render_node->variants, hb_string("variants"), indent, relative_indent, false, buffer);
928
+ pretty_print_token_property(erb_render_node->handlers, hb_string("handlers"), indent, relative_indent, false, buffer);
929
+ pretty_print_token_property(erb_render_node->content_type, hb_string("content_type"), indent, relative_indent, false, buffer);
930
+ pretty_print_array(hb_string("locals"), erb_render_node->locals, indent, relative_indent, true, buffer);
931
+ } break;
932
+
859
933
  case AST_ERB_YIELD_NODE: {
860
934
  const AST_ERB_YIELD_NODE_T* erb_yield_node = (AST_ERB_YIELD_NODE_T*) node;
861
935
 
@@ -1,5 +1,5 @@
1
1
  // NOTE: This file is generated by the templates/template.rb script and should not
2
- // be modified manually. See /Users/marcoroth/Development/herb-release-0.9.0/templates/src/include/ast_pretty_print.h.erb
2
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.9.1/templates/src/include/ast_pretty_print.h.erb
3
3
 
4
4
  #ifndef HERB_AST_PRETTY_PRINT_H
5
5
  #define HERB_AST_PRETTY_PRINT_H