KCC - Kayte C Compiler
1.10.0
A C compiler implementation with preprocessor, lexer, parser, and code generator
Loading...
Searching...
No Matches
include
error.h
1
#ifndef ERROR_H
2
#define ERROR_H
3
4
#include <stdio.h>
5
#include <stdlib.h>
6
#include <stdarg.h>
7
#include <stdbool.h>
8
9
typedef
enum
{
10
ERROR_LEXICAL,
11
ERROR_SYNTAX,
12
ERROR_SEMANTIC,
13
ERROR_INTERNAL,
14
ERROR_FATAL
15
} ErrorType;
16
17
// Error reporting functions
18
void
error_report(ErrorType type,
int
line,
int
column,
const
char
*format, ...);
19
void
error_syntax(
int
line,
int
column,
const
char
*format, ...);
20
void
error_semantic(
int
line,
int
column,
const
char
*format, ...);
21
void
error_fatal(
const
char
*format, ...);
22
23
// Error state management
24
void
error_init(
void
);
25
int
error_count(
void
);
26
bool
error_has_errors(
void
);
27
void
error_reset(
void
);
28
29
30
#endif
// ERROR_H
Generated by
1.14.0