17 lines
362 B
C
17 lines
362 B
C
#ifndef ERRORS_H
|
|
#define ERRORS_H
|
|
|
|
typedef enum
|
|
{
|
|
ERROR_BASE = 1, // Start at 1 to avoid exit(0) for errors
|
|
ERROR_UNKNOWN_TOKEN,
|
|
ERROR_NUMBER_TOO_BIG,
|
|
ERROR_PARSING,
|
|
ERROR_TOKEN_POSITION,
|
|
ERROR_VAR_DIFF,
|
|
ERROR_SENTINEL,
|
|
} program_error;
|
|
|
|
int stop_errors(program_error err, token *tokens, char *input, const char *format, ...);
|
|
|
|
#endif |