herb 0.5.0 → 0.6.0

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.
data/src/token.c CHANGED
@@ -47,6 +47,10 @@ const char* token_type_to_string(const token_type_T type) {
47
47
  case TOKEN_NEWLINE: return "TOKEN_NEWLINE";
48
48
  case TOKEN_IDENTIFIER: return "TOKEN_IDENTIFIER";
49
49
  case TOKEN_HTML_DOCTYPE: return "TOKEN_HTML_DOCTYPE";
50
+ case TOKEN_XML_DECLARATION: return "TOKEN_XML_DECLARATION";
51
+ case TOKEN_XML_DECLARATION_END: return "TOKEN_XML_DECLARATION_END";
52
+ case TOKEN_CDATA_START: return "TOKEN_CDATA_START";
53
+ case TOKEN_CDATA_END: return "TOKEN_CDATA_END";
50
54
  case TOKEN_HTML_TAG_START: return "TOKEN_HTML_TAG_START";
51
55
  case TOKEN_HTML_TAG_END: return "TOKEN_HTML_TAG_END";
52
56
  case TOKEN_HTML_TAG_START_CLOSE: return "TOKEN_HTML_TAG_START_CLOSE";
@@ -56,6 +60,7 @@ const char* token_type_to_string(const token_type_T type) {
56
60
  case TOKEN_EQUALS: return "TOKEN_EQUALS";
57
61
  case TOKEN_QUOTE: return "TOKEN_QUOTE";
58
62
  case TOKEN_BACKTICK: return "TOKEN_BACKTICK";
63
+ case TOKEN_BACKSLASH: return "TOKEN_BACKSLASH";
59
64
  case TOKEN_DASH: return "TOKEN_DASH";
60
65
  case TOKEN_UNDERSCORE: return "TOKEN_UNDERSCORE";
61
66
  case TOKEN_EXCLAMATION: return "TOKEN_EXCLAMATION";
data/src/visitor.c CHANGED
@@ -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.5.0/templates/src/visitor.c.erb
2
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.6.0/templates/src/visitor.c.erb
3
3
 
4
4
  #include <stdio.h>
5
5
 
@@ -42,12 +42,12 @@ void herb_visit_child_nodes(const AST_NODE_T *node, bool (*visitor)(const AST_NO
42
42
 
43
43
  } break;
44
44
 
45
- case AST_HTML_SELF_CLOSE_TAG_NODE: {
46
- const AST_HTML_SELF_CLOSE_TAG_NODE_T* html_self_close_tag_node = ((const AST_HTML_SELF_CLOSE_TAG_NODE_T *) node);
45
+ case AST_HTML_CLOSE_TAG_NODE: {
46
+ const AST_HTML_CLOSE_TAG_NODE_T* html_close_tag_node = ((const AST_HTML_CLOSE_TAG_NODE_T *) node);
47
47
 
48
- if (html_self_close_tag_node->attributes != NULL) {
49
- for (size_t index = 0; index < array_size(html_self_close_tag_node->attributes); index++) {
50
- herb_visit_node(array_get(html_self_close_tag_node->attributes, index), visitor, data);
48
+ if (html_close_tag_node->children != NULL) {
49
+ for (size_t index = 0; index < array_size(html_close_tag_node->children); index++) {
50
+ herb_visit_node(array_get(html_close_tag_node->children, index), visitor, data);
51
51
  }
52
52
  }
53
53
 
@@ -83,6 +83,17 @@ void herb_visit_child_nodes(const AST_NODE_T *node, bool (*visitor)(const AST_NO
83
83
 
84
84
  } break;
85
85
 
86
+ case AST_HTML_ATTRIBUTE_NAME_NODE: {
87
+ const AST_HTML_ATTRIBUTE_NAME_NODE_T* html_attribute_name_node = ((const AST_HTML_ATTRIBUTE_NAME_NODE_T *) node);
88
+
89
+ if (html_attribute_name_node->children != NULL) {
90
+ for (size_t index = 0; index < array_size(html_attribute_name_node->children); index++) {
91
+ herb_visit_node(array_get(html_attribute_name_node->children, index), visitor, data);
92
+ }
93
+ }
94
+
95
+ } break;
96
+
86
97
  case AST_HTML_ATTRIBUTE_NODE: {
87
98
  const AST_HTML_ATTRIBUTE_NODE_T* html_attribute_node = ((const AST_HTML_ATTRIBUTE_NODE_T *) node);
88
99
 
@@ -118,6 +129,28 @@ void herb_visit_child_nodes(const AST_NODE_T *node, bool (*visitor)(const AST_NO
118
129
 
119
130
  } break;
120
131
 
132
+ case AST_XML_DECLARATION_NODE: {
133
+ const AST_XML_DECLARATION_NODE_T* xml_declaration_node = ((const AST_XML_DECLARATION_NODE_T *) node);
134
+
135
+ if (xml_declaration_node->children != NULL) {
136
+ for (size_t index = 0; index < array_size(xml_declaration_node->children); index++) {
137
+ herb_visit_node(array_get(xml_declaration_node->children, index), visitor, data);
138
+ }
139
+ }
140
+
141
+ } break;
142
+
143
+ case AST_CDATA_NODE: {
144
+ const AST_CDATA_NODE_T* cdata_node = ((const AST_CDATA_NODE_T *) node);
145
+
146
+ if (cdata_node->children != NULL) {
147
+ for (size_t index = 0; index < array_size(cdata_node->children); index++) {
148
+ herb_visit_node(array_get(cdata_node->children, index), visitor, data);
149
+ }
150
+ }
151
+
152
+ } break;
153
+
121
154
  case AST_ERB_ELSE_NODE: {
122
155
  const AST_ERB_ELSE_NODE_T* erb_else_node = ((const AST_ERB_ELSE_NODE_T *) node);
123
156
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: herb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Roth
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-08-17 00:00:00.000000000 Z
10
+ date: 2025-08-25 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: Powerful and seamless HTML-aware ERB parsing and tooling.
13
13
  email: