@herb-tools/node 0.8.10 → 0.9.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.
- package/CHANGELOG.md +19 -0
- package/binding.gyp +26 -8
- package/dist/herb-node.cjs +41 -12
- package/dist/herb-node.cjs.map +1 -1
- package/dist/herb-node.esm.js +8 -1
- package/dist/herb-node.esm.js.map +1 -1
- package/dist/types/node-backend.d.ts +3 -1
- package/extension/error_helpers.cpp +395 -73
- package/extension/error_helpers.h +13 -3
- package/extension/extension_helpers.cpp +38 -35
- package/extension/extension_helpers.h +2 -2
- package/extension/herb.cpp +183 -64
- package/extension/libherb/analyze/action_view/attribute_extraction_helpers.c +290 -0
- package/extension/libherb/analyze/action_view/attribute_extraction_helpers.h +36 -0
- package/extension/libherb/analyze/action_view/content_tag.c +70 -0
- package/extension/libherb/analyze/action_view/link_to.c +143 -0
- package/extension/libherb/analyze/action_view/registry.c +60 -0
- package/extension/libherb/analyze/action_view/tag.c +64 -0
- package/extension/libherb/analyze/action_view/tag_helper_handler.h +41 -0
- package/extension/libherb/analyze/action_view/tag_helper_node_builders.c +305 -0
- package/extension/libherb/analyze/action_view/tag_helper_node_builders.h +70 -0
- package/extension/libherb/analyze/action_view/tag_helpers.c +748 -0
- package/extension/libherb/analyze/action_view/tag_helpers.h +38 -0
- package/extension/libherb/analyze/action_view/turbo_frame_tag.c +88 -0
- package/extension/libherb/analyze/analyze.c +882 -0
- package/extension/libherb/{include → analyze}/analyze.h +14 -4
- package/extension/libherb/{analyzed_ruby.c → analyze/analyzed_ruby.c} +13 -11
- package/extension/libherb/{analyzed_ruby.h → analyze/analyzed_ruby.h} +3 -3
- package/extension/libherb/analyze/builders.c +343 -0
- package/extension/libherb/analyze/builders.h +27 -0
- package/extension/libherb/analyze/conditional_elements.c +594 -0
- package/extension/libherb/analyze/conditional_elements.h +9 -0
- package/extension/libherb/analyze/conditional_open_tags.c +640 -0
- package/extension/libherb/analyze/conditional_open_tags.h +9 -0
- package/extension/libherb/analyze/control_type.c +250 -0
- package/extension/libherb/analyze/control_type.h +14 -0
- package/extension/libherb/{analyze_helpers.c → analyze/helpers.c} +48 -23
- package/extension/libherb/{analyze_helpers.h → analyze/helpers.h} +4 -2
- package/extension/libherb/analyze/invalid_structures.c +193 -0
- package/extension/libherb/analyze/invalid_structures.h +11 -0
- package/extension/libherb/{analyze_missing_end.c → analyze/missing_end.c} +33 -22
- package/extension/libherb/analyze/parse_errors.c +84 -0
- package/extension/libherb/analyze/prism_annotate.c +397 -0
- package/extension/libherb/analyze/prism_annotate.h +16 -0
- package/extension/libherb/{analyze_transform.c → analyze/transform.c} +17 -3
- package/extension/libherb/ast_node.c +17 -7
- package/extension/libherb/ast_node.h +11 -5
- package/extension/libherb/ast_nodes.c +663 -388
- package/extension/libherb/ast_nodes.h +118 -39
- package/extension/libherb/ast_pretty_print.c +191 -7
- package/extension/libherb/ast_pretty_print.h +6 -1
- package/extension/libherb/element_source.h +3 -8
- package/extension/libherb/errors.c +1077 -521
- package/extension/libherb/errors.h +149 -56
- package/extension/libherb/extract.c +145 -49
- package/extension/libherb/extract.h +21 -5
- package/extension/libherb/herb.c +52 -34
- package/extension/libherb/herb.h +18 -6
- package/extension/libherb/herb_prism_node.h +13 -0
- package/extension/libherb/html_util.c +241 -12
- package/extension/libherb/html_util.h +7 -2
- package/extension/libherb/include/analyze/action_view/attribute_extraction_helpers.h +36 -0
- package/extension/libherb/include/analyze/action_view/tag_helper_handler.h +41 -0
- package/extension/libherb/include/analyze/action_view/tag_helper_node_builders.h +70 -0
- package/extension/libherb/include/analyze/action_view/tag_helpers.h +38 -0
- package/extension/libherb/{analyze.h → include/analyze/analyze.h} +14 -4
- package/extension/libherb/include/{analyzed_ruby.h → analyze/analyzed_ruby.h} +3 -3
- package/extension/libherb/include/analyze/builders.h +27 -0
- package/extension/libherb/include/analyze/conditional_elements.h +9 -0
- package/extension/libherb/include/analyze/conditional_open_tags.h +9 -0
- package/extension/libherb/include/analyze/control_type.h +14 -0
- package/extension/libherb/include/{analyze_helpers.h → analyze/helpers.h} +4 -2
- package/extension/libherb/include/analyze/invalid_structures.h +11 -0
- package/extension/libherb/include/analyze/prism_annotate.h +16 -0
- package/extension/libherb/include/ast_node.h +11 -5
- package/extension/libherb/include/ast_nodes.h +118 -39
- package/extension/libherb/include/ast_pretty_print.h +6 -1
- package/extension/libherb/include/element_source.h +3 -8
- package/extension/libherb/include/errors.h +149 -56
- package/extension/libherb/include/extract.h +21 -5
- package/extension/libherb/include/herb.h +18 -6
- package/extension/libherb/include/herb_prism_node.h +13 -0
- package/extension/libherb/include/html_util.h +7 -2
- package/extension/libherb/include/io.h +3 -1
- package/extension/libherb/include/lex_helpers.h +29 -0
- package/extension/libherb/include/lexer.h +1 -1
- package/extension/libherb/include/lexer_peek_helpers.h +87 -13
- package/extension/libherb/include/lexer_struct.h +2 -0
- package/extension/libherb/include/location.h +2 -1
- package/extension/libherb/include/parser.h +27 -2
- package/extension/libherb/include/parser_helpers.h +19 -3
- package/extension/libherb/include/pretty_print.h +10 -5
- package/extension/libherb/include/prism_context.h +45 -0
- package/extension/libherb/include/prism_helpers.h +10 -7
- package/extension/libherb/include/prism_serialized.h +12 -0
- package/extension/libherb/include/token.h +16 -4
- package/extension/libherb/include/token_struct.h +10 -3
- package/extension/libherb/include/utf8.h +2 -1
- package/extension/libherb/include/util/hb_allocator.h +78 -0
- package/extension/libherb/include/util/hb_arena.h +6 -1
- package/extension/libherb/include/util/hb_arena_debug.h +12 -1
- package/extension/libherb/include/util/hb_array.h +7 -3
- package/extension/libherb/include/util/hb_buffer.h +6 -4
- package/extension/libherb/include/util/hb_foreach.h +79 -0
- package/extension/libherb/include/util/hb_narray.h +8 -4
- package/extension/libherb/include/util/hb_string.h +56 -9
- package/extension/libherb/include/util.h +6 -3
- package/extension/libherb/include/version.h +1 -1
- package/extension/libherb/io.c +3 -2
- package/extension/libherb/io.h +3 -1
- package/extension/libherb/lex_helpers.h +29 -0
- package/extension/libherb/lexer.c +42 -30
- package/extension/libherb/lexer.h +1 -1
- package/extension/libherb/lexer_peek_helpers.c +12 -74
- package/extension/libherb/lexer_peek_helpers.h +87 -13
- package/extension/libherb/lexer_struct.h +2 -0
- package/extension/libherb/location.c +2 -2
- package/extension/libherb/location.h +2 -1
- package/extension/libherb/main.c +53 -28
- package/extension/libherb/parser.c +783 -247
- package/extension/libherb/parser.h +27 -2
- package/extension/libherb/parser_helpers.c +110 -23
- package/extension/libherb/parser_helpers.h +19 -3
- package/extension/libherb/parser_match_tags.c +110 -49
- package/extension/libherb/pretty_print.c +29 -24
- package/extension/libherb/pretty_print.h +10 -5
- package/extension/libherb/prism_context.h +45 -0
- package/extension/libherb/prism_helpers.c +30 -27
- package/extension/libherb/prism_helpers.h +10 -7
- package/extension/libherb/prism_serialized.h +12 -0
- package/extension/libherb/ruby_parser.c +2 -0
- package/extension/libherb/token.c +151 -66
- package/extension/libherb/token.h +16 -4
- package/extension/libherb/token_matchers.c +0 -1
- package/extension/libherb/token_struct.h +10 -3
- package/extension/libherb/utf8.c +7 -6
- package/extension/libherb/utf8.h +2 -1
- package/extension/libherb/util/hb_allocator.c +341 -0
- package/extension/libherb/util/hb_allocator.h +78 -0
- package/extension/libherb/util/hb_arena.c +81 -56
- package/extension/libherb/util/hb_arena.h +6 -1
- package/extension/libherb/util/hb_arena_debug.c +32 -17
- package/extension/libherb/util/hb_arena_debug.h +12 -1
- package/extension/libherb/util/hb_array.c +30 -15
- package/extension/libherb/util/hb_array.h +7 -3
- package/extension/libherb/util/hb_buffer.c +17 -21
- package/extension/libherb/util/hb_buffer.h +6 -4
- package/extension/libherb/util/hb_foreach.h +79 -0
- package/extension/libherb/util/hb_narray.c +22 -7
- package/extension/libherb/util/hb_narray.h +8 -4
- package/extension/libherb/util/hb_string.c +49 -35
- package/extension/libherb/util/hb_string.h +56 -9
- package/extension/libherb/util.c +21 -11
- package/extension/libherb/util.h +6 -3
- package/extension/libherb/version.h +1 -1
- package/extension/libherb/visitor.c +48 -1
- package/extension/nodes.cpp +451 -6
- package/extension/nodes.h +8 -1
- package/package.json +12 -8
- package/src/node-backend.ts +11 -1
- package/dist/types/index-cjs.d.cts +0 -1
- package/extension/libherb/analyze.c +0 -1608
- package/extension/libherb/element_source.c +0 -12
- package/extension/libherb/include/util/hb_system.h +0 -9
- package/extension/libherb/util/hb_system.c +0 -30
- package/extension/libherb/util/hb_system.h +0 -9
- package/src/index-cjs.cts +0 -22
- /package/dist/types/{index-esm.d.mts → index.d.ts} +0 -0
- /package/src/{index-esm.mts → index.ts} +0 -0
|
@@ -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.
|
|
2
|
+
// be modified manually. See /Users/marcoroth/Development/herb-release-0.9.0/templates/javascript/packages/node/extension/error_helpers.cpp.erb
|
|
3
3
|
|
|
4
4
|
#include <node_api.h>
|
|
5
5
|
#include "error_helpers.h"
|
|
@@ -28,22 +28,22 @@ napi_value UnexpectedErrorFromCStruct(napi_env env, UNEXPECTED_ERROR_T* unexpect
|
|
|
28
28
|
napi_value result;
|
|
29
29
|
napi_create_object(env, &result);
|
|
30
30
|
|
|
31
|
-
napi_value type =
|
|
31
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&unexpected_error->base));
|
|
32
32
|
napi_set_named_property(env, result, "type", type);
|
|
33
33
|
|
|
34
|
-
napi_value message =
|
|
34
|
+
napi_value message = CreateStringFromHbString(env, unexpected_error->base.message);
|
|
35
35
|
napi_set_named_property(env, result, "message", message);
|
|
36
36
|
|
|
37
37
|
napi_value location = CreateLocation(env, unexpected_error->base.location);
|
|
38
38
|
napi_set_named_property(env, result, "location", location);
|
|
39
39
|
|
|
40
|
-
napi_value description =
|
|
40
|
+
napi_value description = CreateStringFromHbString(env, unexpected_error->description);
|
|
41
41
|
napi_set_named_property(env, result, "description", description);
|
|
42
42
|
|
|
43
|
-
napi_value expected =
|
|
43
|
+
napi_value expected = CreateStringFromHbString(env, unexpected_error->expected);
|
|
44
44
|
napi_set_named_property(env, result, "expected", expected);
|
|
45
45
|
|
|
46
|
-
napi_value found =
|
|
46
|
+
napi_value found = CreateStringFromHbString(env, unexpected_error->found);
|
|
47
47
|
napi_set_named_property(env, result, "found", found);
|
|
48
48
|
|
|
49
49
|
|
|
@@ -60,16 +60,16 @@ napi_value UnexpectedTokenErrorFromCStruct(napi_env env, UNEXPECTED_TOKEN_ERROR_
|
|
|
60
60
|
napi_value result;
|
|
61
61
|
napi_create_object(env, &result);
|
|
62
62
|
|
|
63
|
-
napi_value type =
|
|
63
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&unexpected_token_error->base));
|
|
64
64
|
napi_set_named_property(env, result, "type", type);
|
|
65
65
|
|
|
66
|
-
napi_value message =
|
|
66
|
+
napi_value message = CreateStringFromHbString(env, unexpected_token_error->base.message);
|
|
67
67
|
napi_set_named_property(env, result, "message", message);
|
|
68
68
|
|
|
69
69
|
napi_value location = CreateLocation(env, unexpected_token_error->base.location);
|
|
70
70
|
napi_set_named_property(env, result, "location", location);
|
|
71
71
|
|
|
72
|
-
napi_value expected_type =
|
|
72
|
+
napi_value expected_type = CreateStringFromHbString(env, token_type_to_string(unexpected_token_error->expected_type));
|
|
73
73
|
napi_set_named_property(env, result, "expected_type", expected_type);
|
|
74
74
|
|
|
75
75
|
napi_value found = CreateToken(env, unexpected_token_error->found);
|
|
@@ -89,10 +89,10 @@ napi_value MissingOpeningTagErrorFromCStruct(napi_env env, MISSING_OPENING_TAG_E
|
|
|
89
89
|
napi_value result;
|
|
90
90
|
napi_create_object(env, &result);
|
|
91
91
|
|
|
92
|
-
napi_value type =
|
|
92
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&missing_opening_tag_error->base));
|
|
93
93
|
napi_set_named_property(env, result, "type", type);
|
|
94
94
|
|
|
95
|
-
napi_value message =
|
|
95
|
+
napi_value message = CreateStringFromHbString(env, missing_opening_tag_error->base.message);
|
|
96
96
|
napi_set_named_property(env, result, "message", message);
|
|
97
97
|
|
|
98
98
|
napi_value location = CreateLocation(env, missing_opening_tag_error->base.location);
|
|
@@ -115,10 +115,10 @@ napi_value MissingClosingTagErrorFromCStruct(napi_env env, MISSING_CLOSING_TAG_E
|
|
|
115
115
|
napi_value result;
|
|
116
116
|
napi_create_object(env, &result);
|
|
117
117
|
|
|
118
|
-
napi_value type =
|
|
118
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&missing_closing_tag_error->base));
|
|
119
119
|
napi_set_named_property(env, result, "type", type);
|
|
120
120
|
|
|
121
|
-
napi_value message =
|
|
121
|
+
napi_value message = CreateStringFromHbString(env, missing_closing_tag_error->base.message);
|
|
122
122
|
napi_set_named_property(env, result, "message", message);
|
|
123
123
|
|
|
124
124
|
napi_value location = CreateLocation(env, missing_closing_tag_error->base.location);
|
|
@@ -141,10 +141,10 @@ napi_value TagNamesMismatchErrorFromCStruct(napi_env env, TAG_NAMES_MISMATCH_ERR
|
|
|
141
141
|
napi_value result;
|
|
142
142
|
napi_create_object(env, &result);
|
|
143
143
|
|
|
144
|
-
napi_value type =
|
|
144
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&tag_names_mismatch_error->base));
|
|
145
145
|
napi_set_named_property(env, result, "type", type);
|
|
146
146
|
|
|
147
|
-
napi_value message =
|
|
147
|
+
napi_value message = CreateStringFromHbString(env, tag_names_mismatch_error->base.message);
|
|
148
148
|
napi_set_named_property(env, result, "message", message);
|
|
149
149
|
|
|
150
150
|
napi_value location = CreateLocation(env, tag_names_mismatch_error->base.location);
|
|
@@ -160,35 +160,6 @@ napi_value TagNamesMismatchErrorFromCStruct(napi_env env, TAG_NAMES_MISMATCH_ERR
|
|
|
160
160
|
return result;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
napi_value QuotesMismatchErrorFromCStruct(napi_env env, QUOTES_MISMATCH_ERROR_T* quotes_mismatch_error) {
|
|
164
|
-
if (!quotes_mismatch_error) {
|
|
165
|
-
napi_value null_value;
|
|
166
|
-
napi_get_null(env, &null_value);
|
|
167
|
-
return null_value;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
napi_value result;
|
|
171
|
-
napi_create_object(env, &result);
|
|
172
|
-
|
|
173
|
-
napi_value type = CreateString(env, error_type_to_string("es_mismatch_error->base));
|
|
174
|
-
napi_set_named_property(env, result, "type", type);
|
|
175
|
-
|
|
176
|
-
napi_value message = CreateString(env, quotes_mismatch_error->base.message);
|
|
177
|
-
napi_set_named_property(env, result, "message", message);
|
|
178
|
-
|
|
179
|
-
napi_value location = CreateLocation(env, quotes_mismatch_error->base.location);
|
|
180
|
-
napi_set_named_property(env, result, "location", location);
|
|
181
|
-
|
|
182
|
-
napi_value opening_quote = CreateToken(env, quotes_mismatch_error->opening_quote);
|
|
183
|
-
napi_set_named_property(env, result, "opening_quote", opening_quote);
|
|
184
|
-
|
|
185
|
-
napi_value closing_quote = CreateToken(env, quotes_mismatch_error->closing_quote);
|
|
186
|
-
napi_set_named_property(env, result, "closing_quote", closing_quote);
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
return result;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
163
|
napi_value VoidElementClosingTagErrorFromCStruct(napi_env env, VOID_ELEMENT_CLOSING_TAG_ERROR_T* void_element_closing_tag_error) {
|
|
193
164
|
if (!void_element_closing_tag_error) {
|
|
194
165
|
napi_value null_value;
|
|
@@ -199,10 +170,10 @@ napi_value VoidElementClosingTagErrorFromCStruct(napi_env env, VOID_ELEMENT_CLOS
|
|
|
199
170
|
napi_value result;
|
|
200
171
|
napi_create_object(env, &result);
|
|
201
172
|
|
|
202
|
-
napi_value type =
|
|
173
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&void_element_closing_tag_error->base));
|
|
203
174
|
napi_set_named_property(env, result, "type", type);
|
|
204
175
|
|
|
205
|
-
napi_value message =
|
|
176
|
+
napi_value message = CreateStringFromHbString(env, void_element_closing_tag_error->base.message);
|
|
206
177
|
napi_set_named_property(env, result, "message", message);
|
|
207
178
|
|
|
208
179
|
napi_value location = CreateLocation(env, void_element_closing_tag_error->base.location);
|
|
@@ -211,10 +182,10 @@ napi_value VoidElementClosingTagErrorFromCStruct(napi_env env, VOID_ELEMENT_CLOS
|
|
|
211
182
|
napi_value tag_name = CreateToken(env, void_element_closing_tag_error->tag_name);
|
|
212
183
|
napi_set_named_property(env, result, "tag_name", tag_name);
|
|
213
184
|
|
|
214
|
-
napi_value expected =
|
|
185
|
+
napi_value expected = CreateStringFromHbString(env, void_element_closing_tag_error->expected);
|
|
215
186
|
napi_set_named_property(env, result, "expected", expected);
|
|
216
187
|
|
|
217
|
-
napi_value found =
|
|
188
|
+
napi_value found = CreateStringFromHbString(env, void_element_closing_tag_error->found);
|
|
218
189
|
napi_set_named_property(env, result, "found", found);
|
|
219
190
|
|
|
220
191
|
|
|
@@ -231,10 +202,10 @@ napi_value UnclosedElementErrorFromCStruct(napi_env env, UNCLOSED_ELEMENT_ERROR_
|
|
|
231
202
|
napi_value result;
|
|
232
203
|
napi_create_object(env, &result);
|
|
233
204
|
|
|
234
|
-
napi_value type =
|
|
205
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&unclosed_element_error->base));
|
|
235
206
|
napi_set_named_property(env, result, "type", type);
|
|
236
207
|
|
|
237
|
-
napi_value message =
|
|
208
|
+
napi_value message = CreateStringFromHbString(env, unclosed_element_error->base.message);
|
|
238
209
|
napi_set_named_property(env, result, "message", message);
|
|
239
210
|
|
|
240
211
|
napi_value location = CreateLocation(env, unclosed_element_error->base.location);
|
|
@@ -257,22 +228,22 @@ napi_value RubyParseErrorFromCStruct(napi_env env, RUBY_PARSE_ERROR_T* ruby_pars
|
|
|
257
228
|
napi_value result;
|
|
258
229
|
napi_create_object(env, &result);
|
|
259
230
|
|
|
260
|
-
napi_value type =
|
|
231
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&ruby_parse_error->base));
|
|
261
232
|
napi_set_named_property(env, result, "type", type);
|
|
262
233
|
|
|
263
|
-
napi_value message =
|
|
234
|
+
napi_value message = CreateStringFromHbString(env, ruby_parse_error->base.message);
|
|
264
235
|
napi_set_named_property(env, result, "message", message);
|
|
265
236
|
|
|
266
237
|
napi_value location = CreateLocation(env, ruby_parse_error->base.location);
|
|
267
238
|
napi_set_named_property(env, result, "location", location);
|
|
268
239
|
|
|
269
|
-
napi_value error_message =
|
|
240
|
+
napi_value error_message = CreateStringFromHbString(env, ruby_parse_error->error_message);
|
|
270
241
|
napi_set_named_property(env, result, "error_message", error_message);
|
|
271
242
|
|
|
272
|
-
napi_value diagnostic_id =
|
|
243
|
+
napi_value diagnostic_id = CreateStringFromHbString(env, ruby_parse_error->diagnostic_id);
|
|
273
244
|
napi_set_named_property(env, result, "diagnostic_id", diagnostic_id);
|
|
274
245
|
|
|
275
|
-
napi_value level =
|
|
246
|
+
napi_value level = CreateStringFromHbString(env, ruby_parse_error->level);
|
|
276
247
|
napi_set_named_property(env, result, "level", level);
|
|
277
248
|
|
|
278
249
|
|
|
@@ -289,24 +260,24 @@ napi_value ERBControlFlowScopeErrorFromCStruct(napi_env env, ERB_CONTROL_FLOW_SC
|
|
|
289
260
|
napi_value result;
|
|
290
261
|
napi_create_object(env, &result);
|
|
291
262
|
|
|
292
|
-
napi_value type =
|
|
263
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&erb_control_flow_scope_error->base));
|
|
293
264
|
napi_set_named_property(env, result, "type", type);
|
|
294
265
|
|
|
295
|
-
napi_value message =
|
|
266
|
+
napi_value message = CreateStringFromHbString(env, erb_control_flow_scope_error->base.message);
|
|
296
267
|
napi_set_named_property(env, result, "message", message);
|
|
297
268
|
|
|
298
269
|
napi_value location = CreateLocation(env, erb_control_flow_scope_error->base.location);
|
|
299
270
|
napi_set_named_property(env, result, "location", location);
|
|
300
271
|
|
|
301
|
-
napi_value keyword =
|
|
272
|
+
napi_value keyword = CreateStringFromHbString(env, erb_control_flow_scope_error->keyword);
|
|
302
273
|
napi_set_named_property(env, result, "keyword", keyword);
|
|
303
274
|
|
|
304
275
|
|
|
305
276
|
return result;
|
|
306
277
|
}
|
|
307
278
|
|
|
308
|
-
napi_value MissingERBEndTagErrorFromCStruct(napi_env env,
|
|
309
|
-
if (!
|
|
279
|
+
napi_value MissingERBEndTagErrorFromCStruct(napi_env env, MISSING_ERB_END_TAG_ERROR_T* missing_erb_end_tag_error) {
|
|
280
|
+
if (!missing_erb_end_tag_error) {
|
|
310
281
|
napi_value null_value;
|
|
311
282
|
napi_get_null(env, &null_value);
|
|
312
283
|
return null_value;
|
|
@@ -315,16 +286,16 @@ napi_value MissingERBEndTagErrorFromCStruct(napi_env env, MISSINGERB_END_TAG_ERR
|
|
|
315
286
|
napi_value result;
|
|
316
287
|
napi_create_object(env, &result);
|
|
317
288
|
|
|
318
|
-
napi_value type =
|
|
289
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&missing_erb_end_tag_error->base));
|
|
319
290
|
napi_set_named_property(env, result, "type", type);
|
|
320
291
|
|
|
321
|
-
napi_value message =
|
|
292
|
+
napi_value message = CreateStringFromHbString(env, missing_erb_end_tag_error->base.message);
|
|
322
293
|
napi_set_named_property(env, result, "message", message);
|
|
323
294
|
|
|
324
|
-
napi_value location = CreateLocation(env,
|
|
295
|
+
napi_value location = CreateLocation(env, missing_erb_end_tag_error->base.location);
|
|
325
296
|
napi_set_named_property(env, result, "location", location);
|
|
326
297
|
|
|
327
|
-
napi_value keyword =
|
|
298
|
+
napi_value keyword = CreateStringFromHbString(env, missing_erb_end_tag_error->keyword);
|
|
328
299
|
napi_set_named_property(env, result, "keyword", keyword);
|
|
329
300
|
|
|
330
301
|
|
|
@@ -341,10 +312,10 @@ napi_value ERBMultipleBlocksInTagErrorFromCStruct(napi_env env, ERB_MULTIPLE_BLO
|
|
|
341
312
|
napi_value result;
|
|
342
313
|
napi_create_object(env, &result);
|
|
343
314
|
|
|
344
|
-
napi_value type =
|
|
315
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&erb_multiple_blocks_in_tag_error->base));
|
|
345
316
|
napi_set_named_property(env, result, "type", type);
|
|
346
317
|
|
|
347
|
-
napi_value message =
|
|
318
|
+
napi_value message = CreateStringFromHbString(env, erb_multiple_blocks_in_tag_error->base.message);
|
|
348
319
|
napi_set_named_property(env, result, "message", message);
|
|
349
320
|
|
|
350
321
|
napi_value location = CreateLocation(env, erb_multiple_blocks_in_tag_error->base.location);
|
|
@@ -364,10 +335,10 @@ napi_value ERBCaseWithConditionsErrorFromCStruct(napi_env env, ERB_CASE_WITH_CON
|
|
|
364
335
|
napi_value result;
|
|
365
336
|
napi_create_object(env, &result);
|
|
366
337
|
|
|
367
|
-
napi_value type =
|
|
338
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&erb_case_with_conditions_error->base));
|
|
368
339
|
napi_set_named_property(env, result, "type", type);
|
|
369
340
|
|
|
370
|
-
napi_value message =
|
|
341
|
+
napi_value message = CreateStringFromHbString(env, erb_case_with_conditions_error->base.message);
|
|
371
342
|
napi_set_named_property(env, result, "message", message);
|
|
372
343
|
|
|
373
344
|
napi_value location = CreateLocation(env, erb_case_with_conditions_error->base.location);
|
|
@@ -377,6 +348,327 @@ napi_value ERBCaseWithConditionsErrorFromCStruct(napi_env env, ERB_CASE_WITH_CON
|
|
|
377
348
|
return result;
|
|
378
349
|
}
|
|
379
350
|
|
|
351
|
+
napi_value ConditionalElementMultipleTagsErrorFromCStruct(napi_env env, CONDITIONAL_ELEMENT_MULTIPLE_TAGS_ERROR_T* conditional_element_multiple_tags_error) {
|
|
352
|
+
if (!conditional_element_multiple_tags_error) {
|
|
353
|
+
napi_value null_value;
|
|
354
|
+
napi_get_null(env, &null_value);
|
|
355
|
+
return null_value;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
napi_value result;
|
|
359
|
+
napi_create_object(env, &result);
|
|
360
|
+
|
|
361
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&conditional_element_multiple_tags_error->base));
|
|
362
|
+
napi_set_named_property(env, result, "type", type);
|
|
363
|
+
|
|
364
|
+
napi_value message = CreateStringFromHbString(env, conditional_element_multiple_tags_error->base.message);
|
|
365
|
+
napi_set_named_property(env, result, "message", message);
|
|
366
|
+
|
|
367
|
+
napi_value location = CreateLocation(env, conditional_element_multiple_tags_error->base.location);
|
|
368
|
+
napi_set_named_property(env, result, "location", location);
|
|
369
|
+
|
|
370
|
+
napi_value line;
|
|
371
|
+
napi_create_uint32(env, (uint32_t)conditional_element_multiple_tags_error->line, &line);
|
|
372
|
+
napi_set_named_property(env, result, "line", line);
|
|
373
|
+
|
|
374
|
+
napi_value column;
|
|
375
|
+
napi_create_uint32(env, (uint32_t)conditional_element_multiple_tags_error->column, &column);
|
|
376
|
+
napi_set_named_property(env, result, "column", column);
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
return result;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
napi_value ConditionalElementConditionMismatchErrorFromCStruct(napi_env env, CONDITIONAL_ELEMENT_CONDITION_MISMATCH_ERROR_T* conditional_element_condition_mismatch_error) {
|
|
383
|
+
if (!conditional_element_condition_mismatch_error) {
|
|
384
|
+
napi_value null_value;
|
|
385
|
+
napi_get_null(env, &null_value);
|
|
386
|
+
return null_value;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
napi_value result;
|
|
390
|
+
napi_create_object(env, &result);
|
|
391
|
+
|
|
392
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&conditional_element_condition_mismatch_error->base));
|
|
393
|
+
napi_set_named_property(env, result, "type", type);
|
|
394
|
+
|
|
395
|
+
napi_value message = CreateStringFromHbString(env, conditional_element_condition_mismatch_error->base.message);
|
|
396
|
+
napi_set_named_property(env, result, "message", message);
|
|
397
|
+
|
|
398
|
+
napi_value location = CreateLocation(env, conditional_element_condition_mismatch_error->base.location);
|
|
399
|
+
napi_set_named_property(env, result, "location", location);
|
|
400
|
+
|
|
401
|
+
napi_value tag_name = CreateStringFromHbString(env, conditional_element_condition_mismatch_error->tag_name);
|
|
402
|
+
napi_set_named_property(env, result, "tag_name", tag_name);
|
|
403
|
+
|
|
404
|
+
napi_value open_condition = CreateStringFromHbString(env, conditional_element_condition_mismatch_error->open_condition);
|
|
405
|
+
napi_set_named_property(env, result, "open_condition", open_condition);
|
|
406
|
+
|
|
407
|
+
napi_value open_line;
|
|
408
|
+
napi_create_uint32(env, (uint32_t)conditional_element_condition_mismatch_error->open_line, &open_line);
|
|
409
|
+
napi_set_named_property(env, result, "open_line", open_line);
|
|
410
|
+
|
|
411
|
+
napi_value open_column;
|
|
412
|
+
napi_create_uint32(env, (uint32_t)conditional_element_condition_mismatch_error->open_column, &open_column);
|
|
413
|
+
napi_set_named_property(env, result, "open_column", open_column);
|
|
414
|
+
|
|
415
|
+
napi_value close_condition = CreateStringFromHbString(env, conditional_element_condition_mismatch_error->close_condition);
|
|
416
|
+
napi_set_named_property(env, result, "close_condition", close_condition);
|
|
417
|
+
|
|
418
|
+
napi_value close_line;
|
|
419
|
+
napi_create_uint32(env, (uint32_t)conditional_element_condition_mismatch_error->close_line, &close_line);
|
|
420
|
+
napi_set_named_property(env, result, "close_line", close_line);
|
|
421
|
+
|
|
422
|
+
napi_value close_column;
|
|
423
|
+
napi_create_uint32(env, (uint32_t)conditional_element_condition_mismatch_error->close_column, &close_column);
|
|
424
|
+
napi_set_named_property(env, result, "close_column", close_column);
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
return result;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
napi_value InvalidCommentClosingTagErrorFromCStruct(napi_env env, INVALID_COMMENT_CLOSING_TAG_ERROR_T* invalid_comment_closing_tag_error) {
|
|
431
|
+
if (!invalid_comment_closing_tag_error) {
|
|
432
|
+
napi_value null_value;
|
|
433
|
+
napi_get_null(env, &null_value);
|
|
434
|
+
return null_value;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
napi_value result;
|
|
438
|
+
napi_create_object(env, &result);
|
|
439
|
+
|
|
440
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&invalid_comment_closing_tag_error->base));
|
|
441
|
+
napi_set_named_property(env, result, "type", type);
|
|
442
|
+
|
|
443
|
+
napi_value message = CreateStringFromHbString(env, invalid_comment_closing_tag_error->base.message);
|
|
444
|
+
napi_set_named_property(env, result, "message", message);
|
|
445
|
+
|
|
446
|
+
napi_value location = CreateLocation(env, invalid_comment_closing_tag_error->base.location);
|
|
447
|
+
napi_set_named_property(env, result, "location", location);
|
|
448
|
+
|
|
449
|
+
napi_value closing_tag = CreateToken(env, invalid_comment_closing_tag_error->closing_tag);
|
|
450
|
+
napi_set_named_property(env, result, "closing_tag", closing_tag);
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
return result;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
napi_value OmittedClosingTagErrorFromCStruct(napi_env env, OMITTED_CLOSING_TAG_ERROR_T* omitted_closing_tag_error) {
|
|
457
|
+
if (!omitted_closing_tag_error) {
|
|
458
|
+
napi_value null_value;
|
|
459
|
+
napi_get_null(env, &null_value);
|
|
460
|
+
return null_value;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
napi_value result;
|
|
464
|
+
napi_create_object(env, &result);
|
|
465
|
+
|
|
466
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&omitted_closing_tag_error->base));
|
|
467
|
+
napi_set_named_property(env, result, "type", type);
|
|
468
|
+
|
|
469
|
+
napi_value message = CreateStringFromHbString(env, omitted_closing_tag_error->base.message);
|
|
470
|
+
napi_set_named_property(env, result, "message", message);
|
|
471
|
+
|
|
472
|
+
napi_value location = CreateLocation(env, omitted_closing_tag_error->base.location);
|
|
473
|
+
napi_set_named_property(env, result, "location", location);
|
|
474
|
+
|
|
475
|
+
napi_value opening_tag = CreateToken(env, omitted_closing_tag_error->opening_tag);
|
|
476
|
+
napi_set_named_property(env, result, "opening_tag", opening_tag);
|
|
477
|
+
|
|
478
|
+
napi_value insertion_point = CreatePosition(env, omitted_closing_tag_error->insertion_point);
|
|
479
|
+
napi_set_named_property(env, result, "insertion_point", insertion_point);
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
return result;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
napi_value UnclosedOpenTagErrorFromCStruct(napi_env env, UNCLOSED_OPEN_TAG_ERROR_T* unclosed_open_tag_error) {
|
|
486
|
+
if (!unclosed_open_tag_error) {
|
|
487
|
+
napi_value null_value;
|
|
488
|
+
napi_get_null(env, &null_value);
|
|
489
|
+
return null_value;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
napi_value result;
|
|
493
|
+
napi_create_object(env, &result);
|
|
494
|
+
|
|
495
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&unclosed_open_tag_error->base));
|
|
496
|
+
napi_set_named_property(env, result, "type", type);
|
|
497
|
+
|
|
498
|
+
napi_value message = CreateStringFromHbString(env, unclosed_open_tag_error->base.message);
|
|
499
|
+
napi_set_named_property(env, result, "message", message);
|
|
500
|
+
|
|
501
|
+
napi_value location = CreateLocation(env, unclosed_open_tag_error->base.location);
|
|
502
|
+
napi_set_named_property(env, result, "location", location);
|
|
503
|
+
|
|
504
|
+
napi_value tag_name = CreateToken(env, unclosed_open_tag_error->tag_name);
|
|
505
|
+
napi_set_named_property(env, result, "tag_name", tag_name);
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
return result;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
napi_value UnclosedCloseTagErrorFromCStruct(napi_env env, UNCLOSED_CLOSE_TAG_ERROR_T* unclosed_close_tag_error) {
|
|
512
|
+
if (!unclosed_close_tag_error) {
|
|
513
|
+
napi_value null_value;
|
|
514
|
+
napi_get_null(env, &null_value);
|
|
515
|
+
return null_value;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
napi_value result;
|
|
519
|
+
napi_create_object(env, &result);
|
|
520
|
+
|
|
521
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&unclosed_close_tag_error->base));
|
|
522
|
+
napi_set_named_property(env, result, "type", type);
|
|
523
|
+
|
|
524
|
+
napi_value message = CreateStringFromHbString(env, unclosed_close_tag_error->base.message);
|
|
525
|
+
napi_set_named_property(env, result, "message", message);
|
|
526
|
+
|
|
527
|
+
napi_value location = CreateLocation(env, unclosed_close_tag_error->base.location);
|
|
528
|
+
napi_set_named_property(env, result, "location", location);
|
|
529
|
+
|
|
530
|
+
napi_value tag_name = CreateToken(env, unclosed_close_tag_error->tag_name);
|
|
531
|
+
napi_set_named_property(env, result, "tag_name", tag_name);
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
return result;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
napi_value UnclosedQuoteErrorFromCStruct(napi_env env, UNCLOSED_QUOTE_ERROR_T* unclosed_quote_error) {
|
|
538
|
+
if (!unclosed_quote_error) {
|
|
539
|
+
napi_value null_value;
|
|
540
|
+
napi_get_null(env, &null_value);
|
|
541
|
+
return null_value;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
napi_value result;
|
|
545
|
+
napi_create_object(env, &result);
|
|
546
|
+
|
|
547
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&unclosed_quote_error->base));
|
|
548
|
+
napi_set_named_property(env, result, "type", type);
|
|
549
|
+
|
|
550
|
+
napi_value message = CreateStringFromHbString(env, unclosed_quote_error->base.message);
|
|
551
|
+
napi_set_named_property(env, result, "message", message);
|
|
552
|
+
|
|
553
|
+
napi_value location = CreateLocation(env, unclosed_quote_error->base.location);
|
|
554
|
+
napi_set_named_property(env, result, "location", location);
|
|
555
|
+
|
|
556
|
+
napi_value opening_quote = CreateToken(env, unclosed_quote_error->opening_quote);
|
|
557
|
+
napi_set_named_property(env, result, "opening_quote", opening_quote);
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
return result;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
napi_value MissingAttributeValueErrorFromCStruct(napi_env env, MISSING_ATTRIBUTE_VALUE_ERROR_T* missing_attribute_value_error) {
|
|
564
|
+
if (!missing_attribute_value_error) {
|
|
565
|
+
napi_value null_value;
|
|
566
|
+
napi_get_null(env, &null_value);
|
|
567
|
+
return null_value;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
napi_value result;
|
|
571
|
+
napi_create_object(env, &result);
|
|
572
|
+
|
|
573
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&missing_attribute_value_error->base));
|
|
574
|
+
napi_set_named_property(env, result, "type", type);
|
|
575
|
+
|
|
576
|
+
napi_value message = CreateStringFromHbString(env, missing_attribute_value_error->base.message);
|
|
577
|
+
napi_set_named_property(env, result, "message", message);
|
|
578
|
+
|
|
579
|
+
napi_value location = CreateLocation(env, missing_attribute_value_error->base.location);
|
|
580
|
+
napi_set_named_property(env, result, "location", location);
|
|
581
|
+
|
|
582
|
+
napi_value attribute_name = CreateStringFromHbString(env, missing_attribute_value_error->attribute_name);
|
|
583
|
+
napi_set_named_property(env, result, "attribute_name", attribute_name);
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
return result;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
napi_value UnclosedERBTagErrorFromCStruct(napi_env env, UNCLOSED_ERB_TAG_ERROR_T* unclosed_erb_tag_error) {
|
|
590
|
+
if (!unclosed_erb_tag_error) {
|
|
591
|
+
napi_value null_value;
|
|
592
|
+
napi_get_null(env, &null_value);
|
|
593
|
+
return null_value;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
napi_value result;
|
|
597
|
+
napi_create_object(env, &result);
|
|
598
|
+
|
|
599
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&unclosed_erb_tag_error->base));
|
|
600
|
+
napi_set_named_property(env, result, "type", type);
|
|
601
|
+
|
|
602
|
+
napi_value message = CreateStringFromHbString(env, unclosed_erb_tag_error->base.message);
|
|
603
|
+
napi_set_named_property(env, result, "message", message);
|
|
604
|
+
|
|
605
|
+
napi_value location = CreateLocation(env, unclosed_erb_tag_error->base.location);
|
|
606
|
+
napi_set_named_property(env, result, "location", location);
|
|
607
|
+
|
|
608
|
+
napi_value opening_tag = CreateToken(env, unclosed_erb_tag_error->opening_tag);
|
|
609
|
+
napi_set_named_property(env, result, "opening_tag", opening_tag);
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
return result;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
napi_value StrayERBClosingTagErrorFromCStruct(napi_env env, STRAY_ERB_CLOSING_TAG_ERROR_T* stray_erb_closing_tag_error) {
|
|
616
|
+
if (!stray_erb_closing_tag_error) {
|
|
617
|
+
napi_value null_value;
|
|
618
|
+
napi_get_null(env, &null_value);
|
|
619
|
+
return null_value;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
napi_value result;
|
|
623
|
+
napi_create_object(env, &result);
|
|
624
|
+
|
|
625
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&stray_erb_closing_tag_error->base));
|
|
626
|
+
napi_set_named_property(env, result, "type", type);
|
|
627
|
+
|
|
628
|
+
napi_value message = CreateStringFromHbString(env, stray_erb_closing_tag_error->base.message);
|
|
629
|
+
napi_set_named_property(env, result, "message", message);
|
|
630
|
+
|
|
631
|
+
napi_value location = CreateLocation(env, stray_erb_closing_tag_error->base.location);
|
|
632
|
+
napi_set_named_property(env, result, "location", location);
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
return result;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
napi_value NestedERBTagErrorFromCStruct(napi_env env, NESTED_ERB_TAG_ERROR_T* nested_erb_tag_error) {
|
|
639
|
+
if (!nested_erb_tag_error) {
|
|
640
|
+
napi_value null_value;
|
|
641
|
+
napi_get_null(env, &null_value);
|
|
642
|
+
return null_value;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
napi_value result;
|
|
646
|
+
napi_create_object(env, &result);
|
|
647
|
+
|
|
648
|
+
napi_value type = CreateStringFromHbString(env, error_type_to_string(&nested_erb_tag_error->base));
|
|
649
|
+
napi_set_named_property(env, result, "type", type);
|
|
650
|
+
|
|
651
|
+
napi_value message = CreateStringFromHbString(env, nested_erb_tag_error->base.message);
|
|
652
|
+
napi_set_named_property(env, result, "message", message);
|
|
653
|
+
|
|
654
|
+
napi_value location = CreateLocation(env, nested_erb_tag_error->base.location);
|
|
655
|
+
napi_set_named_property(env, result, "location", location);
|
|
656
|
+
|
|
657
|
+
napi_value opening_tag = CreateToken(env, nested_erb_tag_error->opening_tag);
|
|
658
|
+
napi_set_named_property(env, result, "opening_tag", opening_tag);
|
|
659
|
+
|
|
660
|
+
napi_value nested_tag_line;
|
|
661
|
+
napi_create_uint32(env, (uint32_t)nested_erb_tag_error->nested_tag_line, &nested_tag_line);
|
|
662
|
+
napi_set_named_property(env, result, "nested_tag_line", nested_tag_line);
|
|
663
|
+
|
|
664
|
+
napi_value nested_tag_column;
|
|
665
|
+
napi_create_uint32(env, (uint32_t)nested_erb_tag_error->nested_tag_column, &nested_tag_column);
|
|
666
|
+
napi_set_named_property(env, result, "nested_tag_column", nested_tag_column);
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
return result;
|
|
670
|
+
}
|
|
671
|
+
|
|
380
672
|
|
|
381
673
|
napi_value ErrorsArrayFromCArray(napi_env env, hb_array_T* array) {
|
|
382
674
|
napi_value result;
|
|
@@ -418,9 +710,6 @@ napi_value ErrorFromCStruct(napi_env env, ERROR_T* error) {
|
|
|
418
710
|
case TAG_NAMES_MISMATCH_ERROR:
|
|
419
711
|
return TagNamesMismatchErrorFromCStruct(env, (TAG_NAMES_MISMATCH_ERROR_T*) error);
|
|
420
712
|
break;
|
|
421
|
-
case QUOTES_MISMATCH_ERROR:
|
|
422
|
-
return QuotesMismatchErrorFromCStruct(env, (QUOTES_MISMATCH_ERROR_T*) error);
|
|
423
|
-
break;
|
|
424
713
|
case VOID_ELEMENT_CLOSING_TAG_ERROR:
|
|
425
714
|
return VoidElementClosingTagErrorFromCStruct(env, (VOID_ELEMENT_CLOSING_TAG_ERROR_T*) error);
|
|
426
715
|
break;
|
|
@@ -433,8 +722,8 @@ napi_value ErrorFromCStruct(napi_env env, ERROR_T* error) {
|
|
|
433
722
|
case ERB_CONTROL_FLOW_SCOPE_ERROR:
|
|
434
723
|
return ERBControlFlowScopeErrorFromCStruct(env, (ERB_CONTROL_FLOW_SCOPE_ERROR_T*) error);
|
|
435
724
|
break;
|
|
436
|
-
case
|
|
437
|
-
return MissingERBEndTagErrorFromCStruct(env, (
|
|
725
|
+
case MISSING_ERB_END_TAG_ERROR:
|
|
726
|
+
return MissingERBEndTagErrorFromCStruct(env, (MISSING_ERB_END_TAG_ERROR_T*) error);
|
|
438
727
|
break;
|
|
439
728
|
case ERB_MULTIPLE_BLOCKS_IN_TAG_ERROR:
|
|
440
729
|
return ERBMultipleBlocksInTagErrorFromCStruct(env, (ERB_MULTIPLE_BLOCKS_IN_TAG_ERROR_T*) error);
|
|
@@ -442,6 +731,39 @@ napi_value ErrorFromCStruct(napi_env env, ERROR_T* error) {
|
|
|
442
731
|
case ERB_CASE_WITH_CONDITIONS_ERROR:
|
|
443
732
|
return ERBCaseWithConditionsErrorFromCStruct(env, (ERB_CASE_WITH_CONDITIONS_ERROR_T*) error);
|
|
444
733
|
break;
|
|
734
|
+
case CONDITIONAL_ELEMENT_MULTIPLE_TAGS_ERROR:
|
|
735
|
+
return ConditionalElementMultipleTagsErrorFromCStruct(env, (CONDITIONAL_ELEMENT_MULTIPLE_TAGS_ERROR_T*) error);
|
|
736
|
+
break;
|
|
737
|
+
case CONDITIONAL_ELEMENT_CONDITION_MISMATCH_ERROR:
|
|
738
|
+
return ConditionalElementConditionMismatchErrorFromCStruct(env, (CONDITIONAL_ELEMENT_CONDITION_MISMATCH_ERROR_T*) error);
|
|
739
|
+
break;
|
|
740
|
+
case INVALID_COMMENT_CLOSING_TAG_ERROR:
|
|
741
|
+
return InvalidCommentClosingTagErrorFromCStruct(env, (INVALID_COMMENT_CLOSING_TAG_ERROR_T*) error);
|
|
742
|
+
break;
|
|
743
|
+
case OMITTED_CLOSING_TAG_ERROR:
|
|
744
|
+
return OmittedClosingTagErrorFromCStruct(env, (OMITTED_CLOSING_TAG_ERROR_T*) error);
|
|
745
|
+
break;
|
|
746
|
+
case UNCLOSED_OPEN_TAG_ERROR:
|
|
747
|
+
return UnclosedOpenTagErrorFromCStruct(env, (UNCLOSED_OPEN_TAG_ERROR_T*) error);
|
|
748
|
+
break;
|
|
749
|
+
case UNCLOSED_CLOSE_TAG_ERROR:
|
|
750
|
+
return UnclosedCloseTagErrorFromCStruct(env, (UNCLOSED_CLOSE_TAG_ERROR_T*) error);
|
|
751
|
+
break;
|
|
752
|
+
case UNCLOSED_QUOTE_ERROR:
|
|
753
|
+
return UnclosedQuoteErrorFromCStruct(env, (UNCLOSED_QUOTE_ERROR_T*) error);
|
|
754
|
+
break;
|
|
755
|
+
case MISSING_ATTRIBUTE_VALUE_ERROR:
|
|
756
|
+
return MissingAttributeValueErrorFromCStruct(env, (MISSING_ATTRIBUTE_VALUE_ERROR_T*) error);
|
|
757
|
+
break;
|
|
758
|
+
case UNCLOSED_ERB_TAG_ERROR:
|
|
759
|
+
return UnclosedERBTagErrorFromCStruct(env, (UNCLOSED_ERB_TAG_ERROR_T*) error);
|
|
760
|
+
break;
|
|
761
|
+
case STRAY_ERB_CLOSING_TAG_ERROR:
|
|
762
|
+
return StrayERBClosingTagErrorFromCStruct(env, (STRAY_ERB_CLOSING_TAG_ERROR_T*) error);
|
|
763
|
+
break;
|
|
764
|
+
case NESTED_ERB_TAG_ERROR:
|
|
765
|
+
return NestedERBTagErrorFromCStruct(env, (NESTED_ERB_TAG_ERROR_T*) error);
|
|
766
|
+
break;
|
|
445
767
|
default:
|
|
446
768
|
napi_value null_value;
|
|
447
769
|
napi_get_null(env, &null_value);
|