2021-10-31 15:06:48 +01:00
|
|
|
#include <hex/pattern_language/log_console.hpp>
|
|
|
|
|
2022-02-27 23:25:39 +01:00
|
|
|
#include <hex/pattern_language/ast/ast_node.hpp>
|
2021-10-31 15:06:48 +01:00
|
|
|
|
|
|
|
namespace hex::pl {
|
|
|
|
|
2022-01-24 20:53:17 +01:00
|
|
|
[[noreturn]] void LogConsole::abortEvaluation(const std::string &message, const ASTNode *node) {
|
2022-01-30 15:18:45 +01:00
|
|
|
if (node == nullptr)
|
2022-02-11 16:53:01 +01:00
|
|
|
throw PatternLanguageError(0, "Evaluator: " + message);
|
2022-01-30 15:18:45 +01:00
|
|
|
else
|
2022-02-11 16:53:01 +01:00
|
|
|
throw PatternLanguageError(node->getLineNumber(), "Evaluator: " + message);
|
2021-10-31 15:06:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|