diff options
| author | Amlal <amlalelmahrouss@icloud.com> | 2026-04-02 08:20:03 +0200 |
|---|---|---|
| committer | Amlal <amlalelmahrouss@icloud.com> | 2026-04-02 08:20:03 +0200 |
| commit | b95628ad1a1bcccfd283db23e2db915e87665068 (patch) | |
| tree | 155d5eeca986266fa58829ac19d925c850520c91 /src/CompilerKit | |
| parent | 1ef8cd30c6abce5be95d36e4fe33b3089bbb0faa (diff) | |
[CHORE] src: Code-base improvements, CITATION.cff improvements.
Diffstat (limited to 'src/CompilerKit')
| -rw-r--r-- | src/CompilerKit/src/CodeGenerator+AssemblyFactory.cpp | 16 | ||||
| -rw-r--r-- | src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cpp b/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cpp index a7c1832..6224c3e 100644 --- a/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cpp +++ b/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cpp @@ -18,24 +18,24 @@ namespace CompilerKit { ///! @brief Compile for specific format (ELF, PEF, AE) -Int32 AssemblyFactory::Compile(STLString sourceFile, const Int32& arch) { - if (sourceFile.length() == 0) return NECTAR_UNIMPLEMENTED; +Int32 AssemblyFactory::Compile(STLString source_file, const Int32& arch) { + if (source_file.length() == 0) return NECTAR_UNIMPLEMENTED; if (!this->fMounted) return NECTAR_UNIMPLEMENTED; if (arch != this->fMounted->Arch()) return NECTAR_INVALID_ARCH; - if (!std::filesystem::is_regular_file(sourceFile)) return NECTAR_UNIMPLEMENTED; + if (!std::filesystem::is_regular_file(source_file)) return NECTAR_UNIMPLEMENTED; - auto compiledUnit = sourceFile + ".ignore"; + auto compiled_unit = source_file + ".ignore"; try { - std::filesystem::copy(sourceFile, compiledUnit); - auto ret = this->fMounted->CompileToFormat(compiledUnit, arch); + std::filesystem::copy(source_file, compiled_unit); + auto ret = this->fMounted->CompileToFormat(compiled_unit, arch); - std::filesystem::remove(compiledUnit); + std::filesystem::remove(compiled_unit); return ret; } catch (...) { - std::filesystem::remove(compiledUnit); + std::filesystem::remove(compiled_unit); } return NECTAR_INVALID_DATA; diff --git a/src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp b/src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp index 742575b..939823e 100644 --- a/src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp +++ b/src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp @@ -33,8 +33,8 @@ static std::filesystem::path nectar_expand_home(const std::filesystem::path& inp if (!raw.empty() && raw[0] == '~') { const char* home = std::getenv("HOME"); - if (!home) home = std::getenv("USERPROFILE"); + if (!home) home = std::getenv("USERPROFILE"); if (!home) throw std::runtime_error("Home directory not found in environment variables"); return std::filesystem::path(home) / raw.substr(1); |
