diff options
Diffstat (limited to 'dev/LibCompiler/ErrorOr.h')
| -rw-r--r-- | dev/LibCompiler/ErrorOr.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dev/LibCompiler/ErrorOr.h b/dev/LibCompiler/ErrorOr.h index ca93dd2..77015b1 100644 --- a/dev/LibCompiler/ErrorOr.h +++ b/dev/LibCompiler/ErrorOr.h @@ -10,6 +10,7 @@ #pragma once #include <LibCompiler/Defines.h> +#include <LibCompiler/ErrorID.h> #include <LibCompiler/Ref.h> namespace LibCompiler { @@ -33,6 +34,10 @@ class ErrorOr final { Ref<T> Leak() { return mRef; } + Int32 Error() { return mId; } + + BOOL HasError() { return mId != LIBCOMPILER_SUCCESS; } + operator bool() { return mRef; } private: |
