summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/lib94/lib94.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/lib94/lib94.hpp b/include/lib94/lib94.hpp
index 3ca0c7b..eeb53ec 100644
--- a/include/lib94/lib94.hpp
+++ b/include/lib94/lib94.hpp
@@ -59,7 +59,12 @@ namespace lib94 {
std::string instruction_to_string(const instruction &instr);
- std::variant<warrior *, std::string> compile_warrior(std::string source);
+ struct compiler_exception : public std::exception {
+ unsigned line_number;
+ std::string message;
+ };
+
+ warrior *compile_warrior(std::string source);
bool save_warrior(const warrior &w, const std::filesystem::path &to);
std::optional<warrior *> load_warrior(const std::filesystem::path &from);