aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode/errors.h
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-10-22 12:05:41 +0200
committerBad Diode <bd@badd10de.dev>2021-10-22 12:05:41 +0200
commitd9474f1d7c0c6674179fd0f27cd1c084c8227ed5 (patch)
tree9ccad3b53388795e7cc03353f1860a0eddec593e /src/bytecode/errors.h
parentab7d7c155fb1bec5eed8f97462fbb656ea27dbb5 (diff)
downloadbdl-d9474f1d7c0c6674179fd0f27cd1c084c8227ed5.tar.gz
bdl-d9474f1d7c0c6674179fd0f27cd1c084c8227ed5.zip
Add interpretation function for VM
Diffstat (limited to 'src/bytecode/errors.h')
-rw-r--r--src/bytecode/errors.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bytecode/errors.h b/src/bytecode/errors.h
index 7916f4a..c54d1f4 100644
--- a/src/bytecode/errors.h
+++ b/src/bytecode/errors.h
@@ -2,6 +2,7 @@
2#define BDL_ERRORS_H 2#define BDL_ERRORS_H
3 3
4typedef enum ErrorType { 4typedef enum ErrorType {
5 ERR_TYPE_OK,
5 ERR_TYPE_LEXER, 6 ERR_TYPE_LEXER,
6 ERR_TYPE_PARSER, 7 ERR_TYPE_PARSER,
7 ERR_TYPE_RUNTIME, 8 ERR_TYPE_RUNTIME,
@@ -22,6 +23,10 @@ typedef enum ErrorValue {
22 ERR_TOO_MANY_ARGS, 23 ERR_TOO_MANY_ARGS,
23 ERR_WRONG_ARG_TYPE, 24 ERR_WRONG_ARG_TYPE,
24 ERR_DIVISION_BY_ZERO, 25 ERR_DIVISION_BY_ZERO,
26
27 // Bytecode interpreter.
28 ERR_PC_OOB,
29 ERR_EMPTY_CHUNK,
25} ErrorValue; 30} ErrorValue;
26 31
27typedef struct Error { 32typedef struct Error {