summaryrefslogtreecommitdiffhomepage
path: root/dev/LibCompiler/Detail
diff options
context:
space:
mode:
authorAmlal <amlal@nekernel.org>2025-04-26 08:56:59 +0200
committerAmlal <amlal@nekernel.org>2025-04-26 08:56:59 +0200
commitc791c2de8bdcd89035dd004b73d05217e40e179c (patch)
treeacfb69b173218dbc42f69ef0c0ab9070f88a3411 /dev/LibCompiler/Detail
parent7258fbf7c8785a3390441bbbac44d78b2e4facbf (diff)
dev: codebase has been improved in terms of cli and consistency.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/LibCompiler/Detail')
-rw-r--r--dev/LibCompiler/Detail/ClUtils.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/dev/LibCompiler/Detail/ClUtils.h b/dev/LibCompiler/Detail/ClUtils.h
index f871d4d..1f31be7 100644
--- a/dev/LibCompiler/Detail/ClUtils.h
+++ b/dev/LibCompiler/Detail/ClUtils.h
@@ -7,6 +7,7 @@
#pragma once
#include <LibCompiler/AssemblyInterface.h>
+#include <LibCompiler/ErrorID.h>
#include <LibCompiler/Parser.h>
#define kZero64Section ".zero64"
@@ -34,13 +35,9 @@ namespace Detail {
inline void print_error(std::string reason, std::string file) noexcept {
if (reason[0] == '\n') reason.erase(0, 1);
- kStdErr << kRed << "[ asm ] " << kWhite
- << ((file == "LibCompiler") ? "InternalErrorException: "
- : ("FileException{ " + file + " }: "))
- << kBlank << std::endl;
- kStdErr << kRed << "[ asm ] " << kWhite << reason << kBlank << std::endl;
+ kStdErr << kRed << "drv: " << kWhite << reason << kBlank << std::endl;
- if (kAcceptableErrors > kErrorLimit) std::exit(3);
+ if (kAcceptableErrors > kErrorLimit) std::exit(LIBCOMPILER_EXEC_ERROR);
++kAcceptableErrors;
}
@@ -48,10 +45,6 @@ inline void print_error(std::string reason, std::string file) noexcept {
inline void print_warning(std::string reason, std::string file) noexcept {
if (reason[0] == '\n') reason.erase(0, 1);
- if (!file.empty()) {
- kStdOut << kYellow << "[ asm ] " << kWhite << file << kBlank << std::endl;
- }
-
- kStdOut << kYellow << "[ asm ] " << kWhite << reason << kBlank << std::endl;
+ kStdOut << kYellow << "drv: " << kWhite << reason << kBlank << std::endl;
}
} // namespace Detail \ No newline at end of file