My Project
Loading...
Searching...
No Matches
gwlog.h File Reference

Go to the source code of this file.

Data Structures

struct  pos_t
 
struct  loc_t_
 

Typedefs

typedef struct pos_t pos_t
 
typedef struct loc_t_ loc_t
 
typedef void(* gwlog_error_function_t) (const char *, const char *, const char *, const loc_t, const uint, const enum libprettyerr_errtype)
 
typedef void(* gwlog_warning_function_t) (const char *main, const char *filename, const loc_t loc)
 

Functions

ANN void pos_ini (pos_t *)
 
void gwion_parser_set_default_pos (const pos_t)
 
void gwlog_error (const char *main, const char *explain, const char *filename, const loc_t loc, const uint error_code)
 
ANN void gwlog_warning (const char *main, const char *filename, const loc_t loc)
 
ANN void gwlog_related (const char *main, const char *filename, const loc_t loc)
 
ANN void gwlog_hint (const char *main, const char *filename, const loc_t loc)
 
ANN void gwlog_set_func (gwlog_error_function_t error, gwlog_warning_function_t warning, gwlog_warning_function_t info, gwlog_warning_function_t hint)
 

Typedef Documentation

◆ gwlog_error_function_t

typedef void(* gwlog_error_function_t) (const char *, const char *, const char *, const loc_t, const uint, const enum libprettyerr_errtype)

Definition at line 28 of file gwlog.h.

◆ gwlog_warning_function_t

typedef void(* gwlog_warning_function_t) (const char *main, const char *filename, const loc_t loc)

Definition at line 30 of file gwlog.h.

◆ loc_t

ANEW const Type_Decl Exp const loc_t

Definition at line 348 of file absyn.h.

◆ pos_t

typedef struct pos_t pos_t

Function Documentation

◆ gwion_parser_set_default_pos()

void gwion_parser_set_default_pos ( const pos_t pos)

Definition at line 7 of file gwlog.c.

7 {
8 default_pos = pos;
9}
static pos_t default_pos
Definition gwlog.c:5

◆ gwlog_error()

void gwlog_error ( const char * main,
const char * explain,
const char * filename,
const loc_t loc,
const uint error_code )

Definition at line 115 of file gwlog.c.

116 {
117 _error(main, explain, filename, loc, error_code, PERR_ERROR);
118}
static gwlog_error_function_t _error
Definition gwlog.c:25
int main(int argc, char **argv)
Definition main.c:4

◆ gwlog_hint()

ANN void gwlog_hint ( const char * main,
const char * filename,
const loc_t loc )

Definition at line 160 of file gwlog.c.

161 {
162 _hint(main, filename, loc);
163}
static gwlog_warning_function_t _hint
Definition gwlog.c:28

◆ gwlog_related()

ANN void gwlog_related ( const char * main,
const char * filename,
const loc_t loc )

Definition at line 155 of file gwlog.c.

156 {
157 _related(main, filename, loc);
158}
static gwlog_warning_function_t _related
Definition gwlog.c:27

◆ gwlog_set_func()

Definition at line 30 of file gwlog.c.

33 {
34 _error = error;
35 _warning = warning;
36 _related = related;
37 _hint = hint;
38}
static gwlog_warning_function_t _warning
Definition gwlog.c:26

◆ gwlog_warning()

ANN void gwlog_warning ( const char * main,
const char * filename,
const loc_t loc )

Definition at line 146 of file gwlog.c.

147 {
148 _warning(main, filename, loc);
149}

◆ pos_ini()

ANN void pos_ini ( pos_t * pos)

Definition at line 11 of file gwlog.c.

11{ *pos = default_pos; }