ACSE 2.0.2
Advanced Compiler System for Education (basic documentation)
Loading...
Searching...
No Matches
errors.h
Go to the documentation of this file.
1
3
4#ifndef ERRORS_H
5#define ERRORS_H
6
7#include <stddef.h>
8
19typedef struct {
20 char *file;
21 int row;
23
25static const t_fileLocation nullFileLocation = {NULL, -1};
26
28extern int numErrors;
29
35void emitError(t_fileLocation loc, const char *fmt, ...);
36
39void fatalError(const char *fmt, ...) __attribute__((noreturn));
40
45#endif
char * file
The name of the file.
Definition errors.h:20
int row
The zero-based index of a line in the file.
Definition errors.h:21
void emitError(t_fileLocation loc, const char *fmt,...)
int numErrors
The number of errors logged by emitError up to now.
void fatalError(const char *fmt,...) __attribute__((noreturn))
Structure that represents a location in a file.
Definition errors.h:19