Herb C Reference
Loading...
Searching...
No Matches
errors.h
Go to the documentation of this file.
1// NOTE: This file is generated by the templates/template.rb script and should not
2// be modified manually. See /home/runner/work/herb/herb/templates/src/include/errors.h.erb
3
4#ifndef HERB_ERRORS_H
5#define HERB_ERRORS_H
6
7#include "errors.h"
8#include "location/location.h"
9#include "location/position.h"
10#include "lexer/token.h"
11#include "lib/hb_allocator.h"
12#include "lib/hb_array.h"
13#include "lib/hb_buffer.h"
14#include "lib/hb_string.h"
15
57
58typedef struct ERROR_STRUCT {
60 location_T location;
61 hb_string_T message;
63
64
65typedef struct {
67 hb_string_T description;
68 hb_string_T expected;
69 hb_string_T found;
71
72typedef struct {
74 token_type_T expected_type;
75 token_T* found;
77
82
87
88typedef struct {
90 token_T* opening_tag;
91 token_T* closing_tag;
93
94typedef struct {
96 token_T* tag_name;
97 hb_string_T expected;
98 hb_string_T found;
100
105
106typedef struct {
108 hb_string_T error_message;
109 hb_string_T diagnostic_id;
110 hb_string_T level;
112
113typedef struct {
115 hb_string_T keyword;
117
118typedef struct {
120 hb_string_T keyword;
122
123typedef struct {
125 /* no additional fields */
127
128typedef struct {
130 /* no additional fields */
132
138
149
154
160
161typedef struct {
163 token_T* tag_name;
165
166typedef struct {
168 token_T* tag_name;
170
175
180
185
191
192typedef struct {
194 /* no additional fields */
196
203
204typedef struct {
206 hb_string_T partial;
208
209typedef struct {
211 hb_string_T partial;
212 hb_string_T keywords;
214
215typedef struct {
217 /* no additional fields */
219
225
230
231typedef struct {
233 /* no additional fields */
235
240
245
250
255
260
261typedef struct {
263 /* no additional fields */
265
266typedef struct {
268 token_T* tag_name;
269 hb_string_T helper_name;
270 hb_string_T content_type;
272
273typedef struct {
275 token_T* segment;
277
278typedef struct {
282
283UNEXPECTED_ERROR_T* unexpected_error_init(hb_string_T description, hb_string_T expected, hb_string_T found, position_T start, position_T end, hb_allocator_T* allocator);
284void append_unexpected_error(hb_string_T description, hb_string_T expected, hb_string_T found, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
285UNEXPECTED_TOKEN_ERROR_T* unexpected_token_error_init(token_type_T expected_type, token_T* found, position_T start, position_T end, hb_allocator_T* allocator);
286void append_unexpected_token_error(token_type_T expected_type, token_T* found, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
287MISSING_OPENING_TAG_ERROR_T* missing_opening_tag_error_init(token_T* closing_tag, position_T start, position_T end, hb_allocator_T* allocator);
288void append_missing_opening_tag_error(token_T* closing_tag, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
289MISSING_CLOSING_TAG_ERROR_T* missing_closing_tag_error_init(token_T* opening_tag, position_T start, position_T end, hb_allocator_T* allocator);
290void append_missing_closing_tag_error(token_T* opening_tag, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
291TAG_NAMES_MISMATCH_ERROR_T* tag_names_mismatch_error_init(token_T* opening_tag, token_T* closing_tag, position_T start, position_T end, hb_allocator_T* allocator);
292void append_tag_names_mismatch_error(token_T* opening_tag, token_T* closing_tag, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
293VOID_ELEMENT_CLOSING_TAG_ERROR_T* void_element_closing_tag_error_init(token_T* tag_name, hb_string_T expected, hb_string_T found, position_T start, position_T end, hb_allocator_T* allocator);
294void append_void_element_closing_tag_error(token_T* tag_name, hb_string_T expected, hb_string_T found, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
295UNCLOSED_ELEMENT_ERROR_T* unclosed_element_error_init(token_T* opening_tag, position_T start, position_T end, hb_allocator_T* allocator);
296void append_unclosed_element_error(token_T* opening_tag, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
297RUBY_PARSE_ERROR_T* ruby_parse_error_init(hb_string_T error_message, hb_string_T diagnostic_id, hb_string_T level, position_T start, position_T end, hb_allocator_T* allocator);
298void append_ruby_parse_error(hb_string_T error_message, hb_string_T diagnostic_id, hb_string_T level, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
299ERB_CONTROL_FLOW_SCOPE_ERROR_T* erb_control_flow_scope_error_init(hb_string_T keyword, position_T start, position_T end, hb_allocator_T* allocator);
300void append_erb_control_flow_scope_error(hb_string_T keyword, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
301MISSING_ERB_END_TAG_ERROR_T* missing_erb_end_tag_error_init(hb_string_T keyword, position_T start, position_T end, hb_allocator_T* allocator);
302void append_missing_erb_end_tag_error(hb_string_T keyword, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
303ERB_MULTIPLE_BLOCKS_IN_TAG_ERROR_T* erb_multiple_blocks_in_tag_error_init(position_T start, position_T end, hb_allocator_T* allocator);
304void append_erb_multiple_blocks_in_tag_error(position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
305ERB_CASE_WITH_CONDITIONS_ERROR_T* erb_case_with_conditions_error_init(position_T start, position_T end, hb_allocator_T* allocator);
306void append_erb_case_with_conditions_error(position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
307CONDITIONAL_ELEMENT_MULTIPLE_TAGS_ERROR_T* conditional_element_multiple_tags_error_init(size_t line, size_t column, position_T start, position_T end, hb_allocator_T* allocator);
308void append_conditional_element_multiple_tags_error(size_t line, size_t column, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
309CONDITIONAL_ELEMENT_CONDITION_MISMATCH_ERROR_T* conditional_element_condition_mismatch_error_init(hb_string_T tag_name, hb_string_T open_condition, size_t open_line, size_t open_column, hb_string_T close_condition, size_t close_line, size_t close_column, position_T start, position_T end, hb_allocator_T* allocator);
310void append_conditional_element_condition_mismatch_error(hb_string_T tag_name, hb_string_T open_condition, size_t open_line, size_t open_column, hb_string_T close_condition, size_t close_line, size_t close_column, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
311INVALID_COMMENT_CLOSING_TAG_ERROR_T* invalid_comment_closing_tag_error_init(token_T* closing_tag, position_T start, position_T end, hb_allocator_T* allocator);
312void append_invalid_comment_closing_tag_error(token_T* closing_tag, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
313OMITTED_CLOSING_TAG_ERROR_T* omitted_closing_tag_error_init(token_T* opening_tag, position_T insertion_point, position_T start, position_T end, hb_allocator_T* allocator);
314void append_omitted_closing_tag_error(token_T* opening_tag, position_T insertion_point, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
315UNCLOSED_OPEN_TAG_ERROR_T* unclosed_open_tag_error_init(token_T* tag_name, position_T start, position_T end, hb_allocator_T* allocator);
316void append_unclosed_open_tag_error(token_T* tag_name, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
317UNCLOSED_CLOSE_TAG_ERROR_T* unclosed_close_tag_error_init(token_T* tag_name, position_T start, position_T end, hb_allocator_T* allocator);
318void append_unclosed_close_tag_error(token_T* tag_name, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
319UNCLOSED_QUOTE_ERROR_T* unclosed_quote_error_init(token_T* opening_quote, position_T start, position_T end, hb_allocator_T* allocator);
320void append_unclosed_quote_error(token_T* opening_quote, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
321MISSING_ATTRIBUTE_VALUE_ERROR_T* missing_attribute_value_error_init(hb_string_T attribute_name, position_T start, position_T end, hb_allocator_T* allocator);
322void append_missing_attribute_value_error(hb_string_T attribute_name, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
323UNCLOSED_ERB_TAG_ERROR_T* unclosed_erb_tag_error_init(token_T* opening_tag, position_T start, position_T end, hb_allocator_T* allocator);
324void append_unclosed_erb_tag_error(token_T* opening_tag, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
325MALFORMED_ERB_CLOSING_TAG_ERROR_T* malformed_erb_closing_tag_error_init(token_T* opening_tag, token_T* closing_tag, position_T start, position_T end, hb_allocator_T* allocator);
326void append_malformed_erb_closing_tag_error(token_T* opening_tag, token_T* closing_tag, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
327STRAY_ERB_CLOSING_TAG_ERROR_T* stray_erb_closing_tag_error_init(position_T start, position_T end, hb_allocator_T* allocator);
328void append_stray_erb_closing_tag_error(position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
329NESTED_ERB_TAG_ERROR_T* nested_erb_tag_error_init(token_T* opening_tag, size_t nested_tag_line, size_t nested_tag_column, position_T start, position_T end, hb_allocator_T* allocator);
330void append_nested_erb_tag_error(token_T* opening_tag, size_t nested_tag_line, size_t nested_tag_column, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
331RENDER_AMBIGUOUS_LOCALS_ERROR_T* render_ambiguous_locals_error_init(hb_string_T partial, position_T start, position_T end, hb_allocator_T* allocator);
332void append_render_ambiguous_locals_error(hb_string_T partial, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
333RENDER_MISSING_LOCALS_ERROR_T* render_missing_locals_error_init(hb_string_T partial, hb_string_T keywords, position_T start, position_T end, hb_allocator_T* allocator);
334void append_render_missing_locals_error(hb_string_T partial, hb_string_T keywords, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
335RENDER_NO_ARGUMENTS_ERROR_T* render_no_arguments_error_init(position_T start, position_T end, hb_allocator_T* allocator);
336void append_render_no_arguments_error(position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
337RENDER_CONFLICTING_PARTIAL_ERROR_T* render_conflicting_partial_error_init(hb_string_T positional_partial, hb_string_T keyword_partial, position_T start, position_T end, hb_allocator_T* allocator);
338void append_render_conflicting_partial_error(hb_string_T positional_partial, hb_string_T keyword_partial, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
339RENDER_INVALID_AS_OPTION_ERROR_T* render_invalid_as_option_error_init(hb_string_T as_value, position_T start, position_T end, hb_allocator_T* allocator);
340void append_render_invalid_as_option_error(hb_string_T as_value, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
341RENDER_OBJECT_AND_COLLECTION_ERROR_T* render_object_and_collection_error_init(position_T start, position_T end, hb_allocator_T* allocator);
342void append_render_object_and_collection_error(position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
343RENDER_LAYOUT_WITHOUT_BLOCK_ERROR_T* render_layout_without_block_error_init(hb_string_T layout, position_T start, position_T end, hb_allocator_T* allocator);
344void append_render_layout_without_block_error(hb_string_T layout, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
345STRICT_LOCALS_POSITIONAL_ARGUMENT_ERROR_T* strict_locals_positional_argument_error_init(hb_string_T name, position_T start, position_T end, hb_allocator_T* allocator);
346void append_strict_locals_positional_argument_error(hb_string_T name, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
347STRICT_LOCALS_BLOCK_ARGUMENT_ERROR_T* strict_locals_block_argument_error_init(hb_string_T name, position_T start, position_T end, hb_allocator_T* allocator);
348void append_strict_locals_block_argument_error(hb_string_T name, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
349STRICT_LOCALS_SPLAT_ARGUMENT_ERROR_T* strict_locals_splat_argument_error_init(hb_string_T name, position_T start, position_T end, hb_allocator_T* allocator);
350void append_strict_locals_splat_argument_error(hb_string_T name, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
351STRICT_LOCALS_MISSING_PARENTHESIS_ERROR_T* strict_locals_missing_parenthesis_error_init(hb_string_T rest, position_T start, position_T end, hb_allocator_T* allocator);
352void append_strict_locals_missing_parenthesis_error(hb_string_T rest, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
353STRICT_LOCALS_DUPLICATE_DECLARATION_ERROR_T* strict_locals_duplicate_declaration_error_init(position_T start, position_T end, hb_allocator_T* allocator);
354void append_strict_locals_duplicate_declaration_error(position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
355VOID_ELEMENT_CONTENT_ERROR_T* void_element_content_error_init(token_T* tag_name, hb_string_T helper_name, hb_string_T content_type, position_T start, position_T end, hb_allocator_T* allocator);
356void append_void_element_content_error(token_T* tag_name, hb_string_T helper_name, hb_string_T content_type, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
357DOT_NOTATION_CASING_ERROR_T* dot_notation_casing_error_init(token_T* segment, position_T start, position_T end, hb_allocator_T* allocator);
358void append_dot_notation_casing_error(token_T* segment, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
359TIMEOUT_ERROR_T* timeout_error_init(size_t timeout_ms, position_T start, position_T end, hb_allocator_T* allocator);
360void append_timeout_error(size_t timeout_ms, position_T start, position_T end, hb_allocator_T* allocator, hb_array_T** errors);
361
362void error_init(ERROR_T* error, error_type_T type, position_T start, position_T end);
363
364size_t error_sizeof(void);
366
367hb_string_T error_message(ERROR_T* error);
368
369hb_string_T error_type_to_string(ERROR_T* error);
370hb_string_T error_human_type(ERROR_T* error);
371
372void error_free(ERROR_T* error, hb_allocator_T* allocator);
373
374#ifndef HERB_EXCLUDE_PRETTYPRINT
375 void error_pretty_print(ERROR_T* error, size_t indent, size_t relative_indent, hb_buffer_T* buffer);
376
378 const char* name, hb_array_T* array, size_t indent, size_t relative_indent, bool last_property,
379 hb_buffer_T* buffer
380 );
381#endif
382
383#endif
RENDER_NO_ARGUMENTS_ERROR_T * render_no_arguments_error_init(position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:942
void append_ruby_parse_error(hb_string_T error_message, hb_string_T diagnostic_id, hb_string_T level, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:342
error_type_T error_type(ERROR_T *error)
MISSING_ERB_END_TAG_ERROR_T * missing_erb_end_tag_error_init(hb_string_T keyword, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:377
STRICT_LOCALS_DUPLICATE_DECLARATION_ERROR_T * strict_locals_duplicate_declaration_error_init(position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:1202
UNCLOSED_ERB_TAG_ERROR_T * unclosed_erb_tag_error_init(token_T *opening_tag, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:726
TAG_NAMES_MISMATCH_ERROR_T * tag_names_mismatch_error_init(token_T *opening_tag, token_T *closing_tag, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:186
STRICT_LOCALS_POSITIONAL_ARGUMENT_ERROR_T * strict_locals_positional_argument_error_init(hb_string_T name, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:1073
void append_unexpected_error(hb_string_T description, hb_string_T expected, hb_string_T found, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:72
void append_strict_locals_missing_parenthesis_error(hb_string_T rest, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:1198
void append_malformed_erb_closing_tag_error(token_T *opening_tag, token_T *closing_tag, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:796
ERB_CONTROL_FLOW_SCOPE_ERROR_T * erb_control_flow_scope_error_init(hb_string_T keyword, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:346
void append_nested_erb_tag_error(token_T *opening_tag, size_t nested_tag_line, size_t nested_tag_column, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:860
void append_strict_locals_block_argument_error(hb_string_T name, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:1136
UNCLOSED_QUOTE_ERROR_T * unclosed_quote_error_init(token_T *opening_quote, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:660
void append_conditional_element_multiple_tags_error(size_t line, size_t column, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:465
void append_conditional_element_condition_mismatch_error(hb_string_T tag_name, hb_string_T open_condition, size_t open_line, size_t open_column, hb_string_T close_condition, size_t close_line, size_t close_column, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:516
void append_omitted_closing_tag_error(token_T *opening_tag, position_T insertion_point, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:590
ERB_CASE_WITH_CONDITIONS_ERROR_T * erb_case_with_conditions_error_init(position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:424
UNCLOSED_CLOSE_TAG_ERROR_T * unclosed_close_tag_error_init(token_T *tag_name, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:627
RENDER_LAYOUT_WITHOUT_BLOCK_ERROR_T * render_layout_without_block_error_init(hb_string_T layout, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:1042
NESTED_ERB_TAG_ERROR_T * nested_erb_tag_error_init(token_T *opening_tag, size_t nested_tag_line, size_t nested_tag_column, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:827
void append_tag_names_mismatch_error(token_T *opening_tag, token_T *closing_tag, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:223
void append_render_invalid_as_option_error(hb_string_T as_value, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:1022
void append_unclosed_open_tag_error(token_T *tag_name, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:623
MISSING_CLOSING_TAG_ERROR_T * missing_closing_tag_error_init(token_T *opening_tag, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:148
void append_unclosed_erb_tag_error(token_T *opening_tag, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:755
RENDER_AMBIGUOUS_LOCALS_ERROR_T * render_ambiguous_locals_error_init(hb_string_T partial, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:864
void append_strict_locals_positional_argument_error(hb_string_T name, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:1105
ERB_MULTIPLE_BLOCKS_IN_TAG_ERROR_T * erb_multiple_blocks_in_tag_error_init(position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:408
hb_string_T error_message(ERROR_T *error)
STRICT_LOCALS_MISSING_PARENTHESIS_ERROR_T * strict_locals_missing_parenthesis_error_init(hb_string_T rest, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:1171
void append_missing_closing_tag_error(token_T *opening_tag, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:182
RENDER_MISSING_LOCALS_ERROR_T * render_missing_locals_error_init(hb_string_T partial, hb_string_T keywords, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:900
STRAY_ERB_CLOSING_TAG_ERROR_T * stray_erb_closing_tag_error_init(position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:800
void append_unclosed_close_tag_error(token_T *tag_name, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:656
void append_missing_attribute_value_error(hb_string_T attribute_name, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:722
struct ERROR_STRUCT ERROR_T
void append_stray_erb_closing_tag_error(position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:823
void error_pretty_print(ERROR_T *error, size_t indent, size_t relative_indent, hb_buffer_T *buffer)
Definition errors.c:2331
void append_render_object_and_collection_error(position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:1038
void append_void_element_content_error(token_T *tag_name, hb_string_T helper_name, hb_string_T content_type, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:1257
void append_dot_notation_casing_error(token_T *segment, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:1288
void append_strict_locals_splat_argument_error(hb_string_T name, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:1167
UNEXPECTED_ERROR_T * unexpected_error_init(hb_string_T description, hb_string_T expected, hb_string_T found, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:33
void append_render_layout_without_block_error(hb_string_T layout, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:1069
error_type_T
Definition errors.h:16
@ CONDITIONAL_ELEMENT_MULTIPLE_TAGS_ERROR
Definition errors.h:29
@ RENDER_MISSING_LOCALS_ERROR
Definition errors.h:42
@ RENDER_OBJECT_AND_COLLECTION_ERROR
Definition errors.h:46
@ RENDER_AMBIGUOUS_LOCALS_ERROR
Definition errors.h:41
@ UNEXPECTED_ERROR
Definition errors.h:17
@ STRICT_LOCALS_POSITIONAL_ARGUMENT_ERROR
Definition errors.h:48
@ UNCLOSED_OPEN_TAG_ERROR
Definition errors.h:33
@ RENDER_NO_ARGUMENTS_ERROR
Definition errors.h:43
@ STRICT_LOCALS_DUPLICATE_DECLARATION_ERROR
Definition errors.h:52
@ DOT_NOTATION_CASING_ERROR
Definition errors.h:54
@ RENDER_CONFLICTING_PARTIAL_ERROR
Definition errors.h:44
@ ERB_CASE_WITH_CONDITIONS_ERROR
Definition errors.h:28
@ STRICT_LOCALS_SPLAT_ARGUMENT_ERROR
Definition errors.h:50
@ UNEXPECTED_TOKEN_ERROR
Definition errors.h:18
@ STRICT_LOCALS_BLOCK_ARGUMENT_ERROR
Definition errors.h:49
@ VOID_ELEMENT_CLOSING_TAG_ERROR
Definition errors.h:22
@ MISSING_CLOSING_TAG_ERROR
Definition errors.h:20
@ TIMEOUT_ERROR
Definition errors.h:55
@ VOID_ELEMENT_CONTENT_ERROR
Definition errors.h:53
@ MISSING_ATTRIBUTE_VALUE_ERROR
Definition errors.h:36
@ OMITTED_CLOSING_TAG_ERROR
Definition errors.h:32
@ NESTED_ERB_TAG_ERROR
Definition errors.h:40
@ RUBY_PARSE_ERROR
Definition errors.h:24
@ INVALID_COMMENT_CLOSING_TAG_ERROR
Definition errors.h:31
@ STRAY_ERB_CLOSING_TAG_ERROR
Definition errors.h:39
@ TAG_NAMES_MISMATCH_ERROR
Definition errors.h:21
@ CONDITIONAL_ELEMENT_CONDITION_MISMATCH_ERROR
Definition errors.h:30
@ UNCLOSED_ELEMENT_ERROR
Definition errors.h:23
@ MISSING_ERB_END_TAG_ERROR
Definition errors.h:26
@ ERB_CONTROL_FLOW_SCOPE_ERROR
Definition errors.h:25
@ STRICT_LOCALS_MISSING_PARENTHESIS_ERROR
Definition errors.h:51
@ RENDER_INVALID_AS_OPTION_ERROR
Definition errors.h:45
@ UNCLOSED_QUOTE_ERROR
Definition errors.h:35
@ MALFORMED_ERB_CLOSING_TAG_ERROR
Definition errors.h:38
@ UNCLOSED_ERB_TAG_ERROR
Definition errors.h:37
@ UNCLOSED_CLOSE_TAG_ERROR
Definition errors.h:34
@ MISSING_OPENING_TAG_ERROR
Definition errors.h:19
@ ERB_MULTIPLE_BLOCKS_IN_TAG_ERROR
Definition errors.h:27
@ RENDER_LAYOUT_WITHOUT_BLOCK_ERROR
Definition errors.h:47
void error_free(ERROR_T *error, hb_allocator_T *allocator)
Definition errors.c:1676
UNCLOSED_OPEN_TAG_ERROR_T * unclosed_open_tag_error_init(token_T *tag_name, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:594
VOID_ELEMENT_CLOSING_TAG_ERROR_T * void_element_closing_tag_error_init(token_T *tag_name, hb_string_T expected, hb_string_T found, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:227
void append_missing_erb_end_tag_error(hb_string_T keyword, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:404
STRICT_LOCALS_SPLAT_ARGUMENT_ERROR_T * strict_locals_splat_argument_error_init(hb_string_T name, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:1140
void append_unclosed_element_error(token_T *opening_tag, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:304
void append_render_conflicting_partial_error(hb_string_T positional_partial, hb_string_T keyword_partial, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:991
size_t error_sizeof(void)
Definition errors.c:21
CONDITIONAL_ELEMENT_CONDITION_MISMATCH_ERROR_T * conditional_element_condition_mismatch_error_init(hb_string_T tag_name, hb_string_T open_condition, size_t open_line, size_t open_column, hb_string_T close_condition, size_t close_line, size_t close_column, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:469
MISSING_ATTRIBUTE_VALUE_ERROR_T * missing_attribute_value_error_init(hb_string_T attribute_name, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:693
void append_invalid_comment_closing_tag_error(token_T *closing_tag, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:549
void append_erb_multiple_blocks_in_tag_error(position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:420
hb_string_T error_human_type(ERROR_T *error)
Definition errors.c:1365
MISSING_OPENING_TAG_ERROR_T * missing_opening_tag_error_init(token_T *closing_tag, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:115
void error_init(ERROR_T *error, error_type_T type, position_T start, position_T end)
Definition errors.c:25
void append_unclosed_quote_error(token_T *opening_quote, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:689
UNEXPECTED_TOKEN_ERROR_T * unexpected_token_error_init(token_type_T expected_type, token_T *found, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:76
MALFORMED_ERB_CLOSING_TAG_ERROR_T * malformed_erb_closing_tag_error_init(token_T *opening_tag, token_T *closing_tag, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:759
void error_pretty_print_array(const char *name, hb_array_T *array, size_t indent, size_t relative_indent, bool last_property, hb_buffer_T *buffer)
Definition errors.c:1724
RENDER_CONFLICTING_PARTIAL_ERROR_T * render_conflicting_partial_error_init(hb_string_T positional_partial, hb_string_T keyword_partial, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:958
hb_string_T error_type_to_string(ERROR_T *error)
Definition errors.c:1319
void append_missing_opening_tag_error(token_T *closing_tag, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:144
void append_erb_case_with_conditions_error(position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:436
void append_render_missing_locals_error(hb_string_T partial, hb_string_T keywords, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:938
STRICT_LOCALS_BLOCK_ARGUMENT_ERROR_T * strict_locals_block_argument_error_init(hb_string_T name, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:1109
void append_unexpected_token_error(token_type_T expected_type, token_T *found, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:111
void append_render_ambiguous_locals_error(hb_string_T partial, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:896
void append_void_element_closing_tag_error(token_T *tag_name, hb_string_T expected, hb_string_T found, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:271
DOT_NOTATION_CASING_ERROR_T * dot_notation_casing_error_init(token_T *segment, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:1261
void append_erb_control_flow_scope_error(hb_string_T keyword, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:373
void append_timeout_error(size_t timeout_ms, position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:1315
INVALID_COMMENT_CLOSING_TAG_ERROR_T * invalid_comment_closing_tag_error_init(token_T *closing_tag, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:520
void append_render_no_arguments_error(position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:954
TIMEOUT_ERROR_T * timeout_error_init(size_t timeout_ms, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:1292
RENDER_INVALID_AS_OPTION_ERROR_T * render_invalid_as_option_error_init(hb_string_T as_value, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:995
RENDER_OBJECT_AND_COLLECTION_ERROR_T * render_object_and_collection_error_init(position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:1026
CONDITIONAL_ELEMENT_MULTIPLE_TAGS_ERROR_T * conditional_element_multiple_tags_error_init(size_t line, size_t column, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:440
RUBY_PARSE_ERROR_T * ruby_parse_error_init(hb_string_T error_message, hb_string_T diagnostic_id, hb_string_T level, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:308
void append_strict_locals_duplicate_declaration_error(position_T start, position_T end, hb_allocator_T *allocator, hb_array_T **errors)
Definition errors.c:1214
OMITTED_CLOSING_TAG_ERROR_T * omitted_closing_tag_error_init(token_T *opening_tag, position_T insertion_point, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:553
VOID_ELEMENT_CONTENT_ERROR_T * void_element_content_error_init(token_T *tag_name, hb_string_T helper_name, hb_string_T content_type, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:1218
UNCLOSED_ELEMENT_ERROR_T * unclosed_element_error_init(token_T *opening_tag, position_T start, position_T end, hb_allocator_T *allocator)
Definition errors.c:275
ERROR_T base
Definition errors.h:140
size_t open_column
Definition errors.h:144
hb_string_T close_condition
Definition errors.h:145
size_t open_line
Definition errors.h:143
size_t close_line
Definition errors.h:146
size_t close_column
Definition errors.h:147
hb_string_T open_condition
Definition errors.h:142
hb_string_T tag_name
Definition errors.h:141
size_t column
Definition errors.h:136
ERROR_T base
Definition errors.h:134
size_t line
Definition errors.h:135
Definition errors.h:273
token_T * segment
Definition errors.h:275
ERROR_T base
Definition errors.h:274
Definition errors.h:128
ERROR_T base
Definition errors.h:129
Definition errors.h:113
hb_string_T keyword
Definition errors.h:115
ERROR_T base
Definition errors.h:114
Definition errors.h:123
ERROR_T base
Definition errors.h:124
Definition errors.h:58
error_type_T type
Definition errors.h:59
location_T location
Definition errors.h:60
hb_string_T message
Definition errors.h:61
token_T * closing_tag
Definition errors.h:152
ERROR_T base
Definition errors.h:151
Definition errors.h:186
ERROR_T base
Definition errors.h:187
token_T * opening_tag
Definition errors.h:188
token_T * closing_tag
Definition errors.h:189
Definition errors.h:176
hb_string_T attribute_name
Definition errors.h:178
ERROR_T base
Definition errors.h:177
Definition errors.h:83
ERROR_T base
Definition errors.h:84
token_T * opening_tag
Definition errors.h:85
Definition errors.h:118
hb_string_T keyword
Definition errors.h:120
ERROR_T base
Definition errors.h:119
Definition errors.h:78
token_T * closing_tag
Definition errors.h:80
ERROR_T base
Definition errors.h:79
Definition errors.h:197
size_t nested_tag_line
Definition errors.h:200
size_t nested_tag_column
Definition errors.h:201
ERROR_T base
Definition errors.h:198
token_T * opening_tag
Definition errors.h:199
Definition errors.h:155
ERROR_T base
Definition errors.h:156
position_T insertion_point
Definition errors.h:158
token_T * opening_tag
Definition errors.h:157
Definition errors.h:204
ERROR_T base
Definition errors.h:205
hb_string_T partial
Definition errors.h:206
Definition errors.h:220
hb_string_T keyword_partial
Definition errors.h:223
ERROR_T base
Definition errors.h:221
hb_string_T positional_partial
Definition errors.h:222
Definition errors.h:226
ERROR_T base
Definition errors.h:227
hb_string_T as_value
Definition errors.h:228
hb_string_T layout
Definition errors.h:238
ERROR_T base
Definition errors.h:237
Definition errors.h:209
hb_string_T partial
Definition errors.h:211
hb_string_T keywords
Definition errors.h:212
ERROR_T base
Definition errors.h:210
Definition errors.h:215
ERROR_T base
Definition errors.h:216
ERROR_T base
Definition errors.h:232
Definition errors.h:106
ERROR_T base
Definition errors.h:107
hb_string_T level
Definition errors.h:110
hb_string_T error_message
Definition errors.h:108
hb_string_T diagnostic_id
Definition errors.h:109
Definition errors.h:192
ERROR_T base
Definition errors.h:193
hb_string_T name
Definition errors.h:248
ERROR_T base
Definition errors.h:247
ERROR_T base
Definition errors.h:262
ERROR_T base
Definition errors.h:257
hb_string_T rest
Definition errors.h:258
hb_string_T name
Definition errors.h:243
ERROR_T base
Definition errors.h:242
hb_string_T name
Definition errors.h:253
ERROR_T base
Definition errors.h:252
Definition errors.h:88
token_T * opening_tag
Definition errors.h:90
token_T * closing_tag
Definition errors.h:91
ERROR_T base
Definition errors.h:89
Definition errors.h:278
ERROR_T base
Definition errors.h:279
size_t timeout_ms
Definition errors.h:280
Definition errors.h:166
token_T * tag_name
Definition errors.h:168
ERROR_T base
Definition errors.h:167
Definition errors.h:101
ERROR_T base
Definition errors.h:102
token_T * opening_tag
Definition errors.h:103
Definition errors.h:181
token_T * opening_tag
Definition errors.h:183
ERROR_T base
Definition errors.h:182
Definition errors.h:161
ERROR_T base
Definition errors.h:162
token_T * tag_name
Definition errors.h:163
Definition errors.h:171
token_T * opening_quote
Definition errors.h:173
ERROR_T base
Definition errors.h:172
Definition errors.h:65
hb_string_T expected
Definition errors.h:68
ERROR_T base
Definition errors.h:66
hb_string_T found
Definition errors.h:69
hb_string_T description
Definition errors.h:67
Definition errors.h:72
token_T * found
Definition errors.h:75
ERROR_T base
Definition errors.h:73
token_type_T expected_type
Definition errors.h:74
Definition errors.h:94
ERROR_T base
Definition errors.h:95
token_T * tag_name
Definition errors.h:96
hb_string_T expected
Definition errors.h:97
hb_string_T found
Definition errors.h:98
Definition errors.h:266
hb_string_T content_type
Definition errors.h:270
token_T * tag_name
Definition errors.h:268
ERROR_T base
Definition errors.h:267
hb_string_T helper_name
Definition errors.h:269