diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-20 10:22:10 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-20 10:22:10 +0200 |
| commit | 6e4dc53ed58dc0bb1d0cbfc69c400eade10f9d9b (patch) | |
| tree | 2d31a1749ba8c9e3a5301e43d27a0bb441a3c885 /Sources | |
| parent | 6b1a8aa54a333b1dfe10364467046035ca96d33a (diff) | |
MHR-4: win64: assume usage of mingw on windows (makefile)
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Sources')
| -rw-r--r-- | Sources/coff2ae.cc | 2 | ||||
| -rw-r--r-- | Sources/elf2ae.cc | 19 | ||||
| -rw-r--r-- | Sources/ppc-cc.cc | 17 |
3 files changed, 27 insertions, 11 deletions
diff --git a/Sources/coff2ae.cc b/Sources/coff2ae.cc index 1021fed..51f63c9 100644 --- a/Sources/coff2ae.cc +++ b/Sources/coff2ae.cc @@ -19,4 +19,4 @@ ///////////////////////////////////////////////////////////////////////////////////////// -MPCC_MODULE(NewOSCOFFToAE) { return 0; }
\ No newline at end of file +MPCC_MODULE(NewOSCOFFToAE) { return 0; } diff --git a/Sources/elf2ae.cc b/Sources/elf2ae.cc index ab9b265..77568dc 100644 --- a/Sources/elf2ae.cc +++ b/Sources/elf2ae.cc @@ -2,4 +2,21 @@ Copyright Mahrouss Logic -------------------------------------------- */
\ No newline at end of file +------------------------------------------- */ + +#include <Headers/ParserKit.hpp> +#include <Headers/StdKit/AE.hpp> +#include <Headers/StdKit/PEF.hpp> +#include <filesystem> +#include <fstream> +#include <iostream> +#include <memory> +#include <vector> + +///////////////////////////////////////////////////////////////////////////////////////// + +/// @brief COFF 2 AE entrypoint, the program/module starts here. + +///////////////////////////////////////////////////////////////////////////////////////// + +MPCC_MODULE(NewOSELFToAE) { return 0; } diff --git a/Sources/ppc-cc.cc b/Sources/ppc-cc.cc index bb38439..a410213 100644 --- a/Sources/ppc-cc.cc +++ b/Sources/ppc-cc.cc @@ -37,7 +37,7 @@ ///////////////////// -// ANSI ESCAPE CODES +/// ANSI ESCAPE CODES ///////////////////// @@ -47,7 +47,7 @@ ///////////////////////////////////// -// INTERNAL STUFF OF THE C COMPILER +/// INTERNAL STRUCT OF THE C COMPILER ///////////////////////////////////// @@ -61,16 +61,16 @@ struct CompilerRegisterMap final { // \brief Map for C structs // \author amlel struct CompilerStructMap final { - // 'my_foo' + /// 'struct::my_foo' std::string fName; - // if instance: stores a valid register. + /// if instance: stores a valid register. std::string fReg; - // offset count + /// offset count std::size_t fOffsetsCnt; - // offset array. + /// offset array. std::vector<std::pair<Int32, std::string>> fOffsets; }; @@ -95,9 +95,8 @@ namespace detail { void print_error(std::string reason, std::string file) noexcept { if (reason[0] == '\n') reason.erase(0, 1); - if (file.find(".pp") != std::string::npos) { + if (file.find(".pp") != std::string::npos) file.erase(file.find(".pp"), 3); - } if (kState.fLastFile != file) { std::cout << kRed << "[ cc ] " << kWhite @@ -395,7 +394,7 @@ bool CompilerBackendCLang::Compile(const std::string &text, const char *file) { if (textBuffer.find("typedef ") != std::string::npos) continue; if (textBuffer[text_index] == '=' && kInStruct) { - detail::print_error("assignement of value in struct " + textBuffer, + detail::print_error("assignement of value inside a struct " + textBuffer, file); continue; } |
