summaryrefslogtreecommitdiffhomepage
path: root/dev/LibCompiler/src/CCompiler64x0.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-01-09 13:12:48 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-01-09 13:12:48 +0100
commitac2debcd00dd78ad77f58d0c448862b76619ea61 (patch)
tree7a3b4201b7c60febcd08cdb99e97aa426302535c /dev/LibCompiler/src/CCompiler64x0.cc
parent4b0be5c40cab48a256f68c1e41b6af3d93512c61 (diff)
ADD: Minor improvements and refactors.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/LibCompiler/src/CCompiler64x0.cc')
-rw-r--r--dev/LibCompiler/src/CCompiler64x0.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/dev/LibCompiler/src/CCompiler64x0.cc b/dev/LibCompiler/src/CCompiler64x0.cc
index 23bd11a..fee8f08 100644
--- a/dev/LibCompiler/src/CCompiler64x0.cc
+++ b/dev/LibCompiler/src/CCompiler64x0.cc
@@ -50,7 +50,7 @@
/////////////////////////////////////
-namespace Details
+namespace Detail
{
// \brief Register map structure, used to keep track of each variable's registers.
struct CompilerRegisterMap final
@@ -87,14 +87,14 @@ namespace Details
std::string fLastError;
bool fVerbose;
};
-} // namespace Details
+} // namespace Detail
-static Details::CompilerState kState;
+static Detail::CompilerState kState;
static SizeType kErrorLimit = 100;
static std::string kIfFunction = "";
static Int32 kAcceptableErrors = 0;
-namespace Details
+namespace Detail
{
/// @brief prints an error into stdout.
/// @param reason the reason of the error.
@@ -106,7 +106,7 @@ namespace Details
std::string fName;
std::string fValue;
};
-} // namespace Details
+} // namespace Detail
/////////////////////////////////////////////////////////////////////////////////////////
@@ -159,11 +159,11 @@ public:
};
static CompilerFrontend64x0* kCompilerFrontend = nullptr;
-static std::vector<Details::CompilerType> kCompilerVariables;
+static std::vector<Detail::CompilerType> kCompilerVariables;
static std::vector<std::string> kCompilerFunctions;
-static std::vector<Details::CompilerType> kCompilerTypes;
+static std::vector<Detail::CompilerType> kCompilerTypes;
-namespace Details
+namespace Detail
{
union number_cast final {
public:
@@ -191,7 +191,7 @@ namespace Details
float _Raw;
};
-} // namespace Details
+} // namespace Detail
/////////////////////////////////////////////////////////////////////////////////////////
@@ -223,7 +223,7 @@ bool CompilerFrontend64x0::Compile(std::string text_, const std::string file)
auto gen = uuids::uuid_random_generator{generator};
uuids::uuid out = gen();
- Details::number_cast time_off = (UInt64)out.as_bytes().data();
+ Detail::number_cast time_off = (UInt64)out.as_bytes().data();
if (!typeFound)
{
@@ -402,7 +402,7 @@ bool CompilerFrontend64x0::Compile(std::string text_, const std::string file)
if (text[text_index] == '=' && kInStruct)
{
- Details::print_error("assignement of value in struct " + text,
+ Detail::print_error("assignement of value in struct " + text,
file);
continue;
}
@@ -565,7 +565,7 @@ bool CompilerFrontend64x0::Compile(std::string text_, const std::string file)
auto var_to_find =
std::find_if(kCompilerVariables.cbegin(), kCompilerVariables.cend(),
- [&](Details::CompilerType type) {
+ [&](Detail::CompilerType type) {
return type.fName.find(substr) != std::string::npos;
});
@@ -1360,7 +1360,7 @@ public:
}
else
{
- Details::print_error(err, src.data());
+ Detail::print_error(err, src.data());
}
}
@@ -1567,7 +1567,7 @@ LIBCOMPILER_MODULE(ZkaOSCompilerCLang64x0)
std::string err = "Unknown command: ";
err += argv[index];
- Details::print_error(err, "cc");
+ Detail::print_error(err, "cc");
continue;
}
@@ -1580,7 +1580,7 @@ LIBCOMPILER_MODULE(ZkaOSCompilerCLang64x0)
{
if (kState.fVerbose)
{
- Details::print_error(srcFile + " is not a valid C source.\n", "cc");
+ Detail::print_error(srcFile + " is not a valid C source.\n", "cc");
}
return 1;