diff options
Diffstat (limited to 'src/bootstrap/errors.c')
-rw-r--r-- | src/bootstrap/errors.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bootstrap/errors.c b/src/bootstrap/errors.c index fcb629a..87752e6 100644 --- a/src/bootstrap/errors.c +++ b/src/bootstrap/errors.c | |||
@@ -7,6 +7,10 @@ typedef enum ErrorType { | |||
7 | typedef enum ErrorValue { | 7 | typedef enum ErrorValue { |
8 | ERR_UNKNOWN = 0, | 8 | ERR_UNKNOWN = 0, |
9 | ERR_UNMATCHED_STRING, | 9 | ERR_UNMATCHED_STRING, |
10 | ERR_UNBALANCED_PAREN, | ||
11 | ERR_NOT_IMPLEMENTED, | ||
12 | ERR_EOF_REACHED, | ||
13 | ERR_UNKNOWN_TOKEN, | ||
10 | } ErrorValue; | 14 | } ErrorValue; |
11 | 15 | ||
12 | typedef struct Error { | 16 | typedef struct Error { |
@@ -19,6 +23,10 @@ typedef struct Error { | |||
19 | static const char* error_msgs[] = { | 23 | static const char* error_msgs[] = { |
20 | [ERR_UNKNOWN] = "error: something unexpected happened", | 24 | [ERR_UNKNOWN] = "error: something unexpected happened", |
21 | [ERR_UNMATCHED_STRING] = "error: unmatched string delimiter", | 25 | [ERR_UNMATCHED_STRING] = "error: unmatched string delimiter", |
26 | [ERR_UNBALANCED_PAREN] = "error: unbalanced parentheses", | ||
27 | [ERR_NOT_IMPLEMENTED] = "error: not implemented", | ||
28 | [ERR_EOF_REACHED] = "error: EOF reached", | ||
29 | [ERR_UNKNOWN_TOKEN] = "error: unknown token", | ||
22 | }; | 30 | }; |
23 | 31 | ||
24 | #define ERR_MAX_NUMBER 16 | 32 | #define ERR_MAX_NUMBER 16 |