sync/include/sync/types.h

42 lines
650 B
C

// Kyler Olsen
// ZINC Bootstrap compiler
// Shared Types Header
// June 2025
#ifndef SYNC_TYPES_H
#define SYNC_TYPES_H
#include <stddef.h>
typedef struct {
const char *message;
int code;
} GeneralError;
typedef struct {
const char *filename;
size_t line;
size_t column;
size_t length;
size_t lines;
} FileInfo;
typedef enum {
SYNC_LEXICAL_ERROR,
SYNC_SYNTACTICAL_ERROR,
SYNC_SEMANTICAL_ERROR
} SyncErrorType;
typedef struct {
SyncErrorType type;
const char *message;
FileInfo file_info;
} SyncError;
typedef enum {
SYNC_ERROR,
SYNC_RESULT,
} SyncResultType;
#endif // SYNC_TYPES_H