about summary refs log tree commit diff
path: root/users/tazjin/rlox/src/bytecode/errors.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-01-17T20·03+0300
committertazjin <mail@tazj.in>2021-01-17T21·17+0000
commit7fb93fb49008491184a7d55ccd43db846452dce0 (patch)
treee07383f72d95ee2cfc150811a99af7caef87bb55 /users/tazjin/rlox/src/bytecode/errors.rs
parentb1d0e22b1f5fe907ba3d48931e5a38b9a75b0dcf (diff)
feat(tazjin/rlox): Bootstrap VM for Lox bytecode r/2127
Change-Id: I479e20bf2087e5c4aa20e31b364c57ed0d961bcf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2416
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'users/tazjin/rlox/src/bytecode/errors.rs')
-rw-r--r--users/tazjin/rlox/src/bytecode/errors.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/users/tazjin/rlox/src/bytecode/errors.rs b/users/tazjin/rlox/src/bytecode/errors.rs
new file mode 100644
index 000000000000..89ab1867a4e6
--- /dev/null
+++ b/users/tazjin/rlox/src/bytecode/errors.rs
@@ -0,0 +1,13 @@
+#[derive(Debug)]
+pub enum ErrorKind {
+    // CompileError,
+    // RuntimeError,
+    InternalError(&'static str),
+}
+
+#[derive(Debug)]
+pub struct Error {
+    pub kind: ErrorKind,
+}
+
+pub type LoxResult<T> = Result<T, Error>;