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

scanner More...

Go to the source code of this file.

Data Structures

struct  Scanner_
 

Typedefs

typedef struct Scanner_ Scanner
 

Functions

int scanner_error (Scanner *scan, const char *main, const char *explain, const loc_t loc, const uint error_code)
 
ANN int scanner_secondary (Scanner *scan, const char *main, const loc_t loc)
 

Detailed Description

scanner

Definition in file scanner.h.

Typedef Documentation

◆ Scanner

typedef struct Scanner_ Scanner

Function Documentation

◆ scanner_error()

int scanner_error ( Scanner * scan,
const char * main,
const char * explain,
const loc_t loc,
const uint error_code )

Definition at line 70 of file scanner.c.

71 {
72 const PPState *ppstate = (PPState*)vector_back(&scan->pp->state);
73 const m_str filename = get_filename(scan, ppstate);
74 gwlog_error(main, explain, filename, loc, error_code);
75 secondary(scan);
76 return 0;
77}
void gwlog_error(const char *main, const char *explain, const char *filename, const loc_t loc, const uint error_code)
Definition gwlog.c:115
int main(int argc, char **argv)
Definition main.c:4
static ANN char * get_filename(Scanner *scan, const PPState *ppstate)
Definition scanner.c:44
static ANN void secondary(Scanner *scan)
Definition scanner.c:62
Definition pp.h:14
struct Vector_ state
Definition pp.h:27
struct PP_ * pp
Definition scanner.h:10

◆ scanner_secondary()

ANN int scanner_secondary ( Scanner * scan,
const char * main,
const loc_t loc )

Definition at line 79 of file scanner.c.

79 {
80 const PPState *ppstate = (PPState*)vector_back(&scan->pp->state);
81 const m_str filename = get_filename(scan, ppstate);
82 gwlog_warning(main, filename, loc);
83 return 0;
84}
ANN void gwlog_warning(const char *main, const char *filename, const loc_t loc)
Definition gwlog.c:146