Herb C Reference
Loading...
Searching...
No Matches
errors.h File Reference
#include "array.h"
#include "buffer.h"
#include "errors.h"
#include "location.h"
#include "position.h"
#include "token.h"

Go to the source code of this file.

Data Structures

struct  ERROR_STRUCT
 
struct  UNEXPECTED_ERROR_T
 
struct  UNEXPECTED_TOKEN_ERROR_T
 
struct  MISSING_OPENING_TAG_ERROR_T
 
struct  MISSING_CLOSING_TAG_ERROR_T
 
struct  TAG_NAMES_MISMATCH_ERROR_T
 
struct  QUOTES_MISMATCH_ERROR_T
 
struct  VOID_ELEMENT_CLOSING_TAG_ERROR_T
 
struct  UNCLOSED_ELEMENT_ERROR_T
 
struct  RUBY_PARSE_ERROR_T
 

Typedefs

typedef struct ERROR_STRUCT ERROR_T
 

Enumerations

enum  error_type_T {
  UNEXPECTED_ERROR , UNEXPECTED_TOKEN_ERROR , MISSING_OPENING_TAG_ERROR , MISSING_CLOSING_TAG_ERROR ,
  TAG_NAMES_MISMATCH_ERROR , QUOTES_MISMATCH_ERROR , VOID_ELEMENT_CLOSING_TAG_ERROR , UNCLOSED_ELEMENT_ERROR ,
  RUBY_PARSE_ERROR
}
 

Functions

UNEXPECTED_ERROR_Tunexpected_error_init (const char *description, const char *expected, const char *found, position_T *start, position_T *end)
 
void append_unexpected_error (const char *description, const char *expected, const char *found, position_T *start, position_T *end, array_T *errors)
 
UNEXPECTED_TOKEN_ERROR_Tunexpected_token_error_init (token_type_T expected_type, token_T *found, position_T *start, position_T *end)
 
void append_unexpected_token_error (token_type_T expected_type, token_T *found, position_T *start, position_T *end, array_T *errors)
 
MISSING_OPENING_TAG_ERROR_Tmissing_opening_tag_error_init (token_T *closing_tag, position_T *start, position_T *end)
 
void append_missing_opening_tag_error (token_T *closing_tag, position_T *start, position_T *end, array_T *errors)
 
MISSING_CLOSING_TAG_ERROR_Tmissing_closing_tag_error_init (token_T *opening_tag, position_T *start, position_T *end)
 
void append_missing_closing_tag_error (token_T *opening_tag, position_T *start, position_T *end, array_T *errors)
 
TAG_NAMES_MISMATCH_ERROR_Ttag_names_mismatch_error_init (token_T *opening_tag, token_T *closing_tag, position_T *start, position_T *end)
 
void append_tag_names_mismatch_error (token_T *opening_tag, token_T *closing_tag, position_T *start, position_T *end, array_T *errors)
 
QUOTES_MISMATCH_ERROR_Tquotes_mismatch_error_init (token_T *opening_quote, token_T *closing_quote, position_T *start, position_T *end)
 
void append_quotes_mismatch_error (token_T *opening_quote, token_T *closing_quote, position_T *start, position_T *end, array_T *errors)
 
VOID_ELEMENT_CLOSING_TAG_ERROR_Tvoid_element_closing_tag_error_init (token_T *tag_name, const char *expected, const char *found, position_T *start, position_T *end)
 
void append_void_element_closing_tag_error (token_T *tag_name, const char *expected, const char *found, position_T *start, position_T *end, array_T *errors)
 
UNCLOSED_ELEMENT_ERROR_Tunclosed_element_error_init (token_T *opening_tag, position_T *start, position_T *end)
 
void append_unclosed_element_error (token_T *opening_tag, position_T *start, position_T *end, array_T *errors)
 
RUBY_PARSE_ERROR_Truby_parse_error_init (const char *error_message, const char *diagnostic_id, const char *level, position_T *start, position_T *end)
 
void append_ruby_parse_error (const char *error_message, const char *diagnostic_id, const char *level, position_T *start, position_T *end, array_T *errors)
 
void error_init (ERROR_T *error, error_type_T type, position_T *start, position_T *end)
 
size_t error_sizeof (void)
 
error_type_T error_type (ERROR_T *error)
 
char * error_message (ERROR_T *error)
 
const char * error_type_to_string (ERROR_T *error)
 
const char * error_human_type (ERROR_T *error)
 
void error_free (ERROR_T *error)
 
void error_pretty_print (ERROR_T *error, size_t indent, size_t relative_indent, buffer_T *buffer)
 
void error_pretty_print_array (const char *name, array_T *array, size_t indent, size_t relative_indent, bool last_property, buffer_T *buffer)
 

Typedef Documentation

◆ ERROR_T

typedef struct ERROR_STRUCT ERROR_T

Enumeration Type Documentation

◆ error_type_T

Enumerator
UNEXPECTED_ERROR 
UNEXPECTED_TOKEN_ERROR 
MISSING_OPENING_TAG_ERROR 
MISSING_CLOSING_TAG_ERROR 
TAG_NAMES_MISMATCH_ERROR 
QUOTES_MISMATCH_ERROR 
VOID_ELEMENT_CLOSING_TAG_ERROR 
UNCLOSED_ELEMENT_ERROR 
RUBY_PARSE_ERROR 

Function Documentation

◆ unexpected_error_init()

UNEXPECTED_ERROR_T * unexpected_error_init ( const char *  description,
const char *  expected,
const char *  found,
position_T start,
position_T end 
)

◆ append_unexpected_error()

void append_unexpected_error ( const char *  description,
const char *  expected,
const char *  found,
position_T start,
position_T end,
array_T errors 
)

◆ unexpected_token_error_init()

UNEXPECTED_TOKEN_ERROR_T * unexpected_token_error_init ( token_type_T  expected_type,
token_T found,
position_T start,
position_T end 
)

◆ append_unexpected_token_error()

void append_unexpected_token_error ( token_type_T  expected_type,
token_T found,
position_T start,
position_T end,
array_T errors 
)

◆ missing_opening_tag_error_init()

MISSING_OPENING_TAG_ERROR_T * missing_opening_tag_error_init ( token_T closing_tag,
position_T start,
position_T end 
)

◆ append_missing_opening_tag_error()

void append_missing_opening_tag_error ( token_T closing_tag,
position_T start,
position_T end,
array_T errors 
)

◆ missing_closing_tag_error_init()

MISSING_CLOSING_TAG_ERROR_T * missing_closing_tag_error_init ( token_T opening_tag,
position_T start,
position_T end 
)

◆ append_missing_closing_tag_error()

void append_missing_closing_tag_error ( token_T opening_tag,
position_T start,
position_T end,
array_T errors 
)

◆ tag_names_mismatch_error_init()

TAG_NAMES_MISMATCH_ERROR_T * tag_names_mismatch_error_init ( token_T opening_tag,
token_T closing_tag,
position_T start,
position_T end 
)

◆ append_tag_names_mismatch_error()

void append_tag_names_mismatch_error ( token_T opening_tag,
token_T closing_tag,
position_T start,
position_T end,
array_T errors 
)

◆ quotes_mismatch_error_init()

QUOTES_MISMATCH_ERROR_T * quotes_mismatch_error_init ( token_T opening_quote,
token_T closing_quote,
position_T start,
position_T end 
)

◆ append_quotes_mismatch_error()

void append_quotes_mismatch_error ( token_T opening_quote,
token_T closing_quote,
position_T start,
position_T end,
array_T errors 
)

◆ void_element_closing_tag_error_init()

VOID_ELEMENT_CLOSING_TAG_ERROR_T * void_element_closing_tag_error_init ( token_T tag_name,
const char *  expected,
const char *  found,
position_T start,
position_T end 
)

◆ append_void_element_closing_tag_error()

void append_void_element_closing_tag_error ( token_T tag_name,
const char *  expected,
const char *  found,
position_T start,
position_T end,
array_T errors 
)

◆ unclosed_element_error_init()

UNCLOSED_ELEMENT_ERROR_T * unclosed_element_error_init ( token_T opening_tag,
position_T start,
position_T end 
)

◆ append_unclosed_element_error()

void append_unclosed_element_error ( token_T opening_tag,
position_T start,
position_T end,
array_T errors 
)

◆ ruby_parse_error_init()

RUBY_PARSE_ERROR_T * ruby_parse_error_init ( const char *  error_message,
const char *  diagnostic_id,
const char *  level,
position_T start,
position_T end 
)

◆ append_ruby_parse_error()

void append_ruby_parse_error ( const char *  error_message,
const char *  diagnostic_id,
const char *  level,
position_T start,
position_T end,
array_T errors 
)

◆ error_init()

void error_init ( ERROR_T error,
error_type_T  type,
position_T start,
position_T end 
)

◆ error_sizeof()

size_t error_sizeof ( void  )

◆ error_type()

error_type_T error_type ( ERROR_T error)

◆ error_message()

char * error_message ( ERROR_T error)

◆ error_type_to_string()

const char * error_type_to_string ( ERROR_T error)

◆ error_human_type()

const char * error_human_type ( ERROR_T error)

◆ error_free()

void error_free ( ERROR_T error)

◆ error_pretty_print()

void error_pretty_print ( ERROR_T error,
size_t  indent,
size_t  relative_indent,
buffer_T buffer 
)

◆ error_pretty_print_array()

void error_pretty_print_array ( const char *  name,
array_T array,
size_t  indent,
size_t  relative_indent,
bool  last_property,
buffer_T buffer 
)