diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-20 09:19:44 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-20 09:19:44 -0500 |
| commit | 274936aa8c14c09239f771bce5b5cc5b6ae507a2 (patch) | |
| tree | 6c16ac05bb73c7aea0bb4a69f5bc77c2f6ca2d77 /dev/CompilerKit/src/Frontend | |
| parent | 3cc0546417ed38c69a5ba0af1d7fd4c47af1401f (diff) | |
| parent | 56db5137ddd10f476b9820944b47ab72c6f8e019 (diff) | |
Merge pull request #25 from nekernel-org/dev
first set of patches to stable.
Diffstat (limited to 'dev/CompilerKit/src/Frontend')
| -rw-r--r-- | dev/CompilerKit/src/Frontend/CPlusPlusCompilerAMD64.cc | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/dev/CompilerKit/src/Frontend/CPlusPlusCompilerAMD64.cc b/dev/CompilerKit/src/Frontend/CPlusPlusCompilerAMD64.cc index 7c761f4..a13aa0e 100644 --- a/dev/CompilerKit/src/Frontend/CPlusPlusCompilerAMD64.cc +++ b/dev/CompilerKit/src/Frontend/CPlusPlusCompilerAMD64.cc @@ -90,14 +90,6 @@ struct CompilerState final { CompilerKit::STLString fLastError{}; }; -/// @brief prints an error into stdout. -/// @param reason the reason of the error. -/// @param file where does it originate from? -void print_error(const CompilerKit::STLString& reason, - const CompilerKit::STLString& file) noexcept { - kPrintErr << kRed << "Error in " << file << ": " << reason << kWhite << std::endl; -} - static CompilerState kState; static Int32 kOnClassScope = 0; @@ -180,7 +172,7 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendCPlusPlusAMD64::Compile( CompilerKit::STLString text, CompilerKit::STLString file) { CompilerKit::SyntaxLeafList::SyntaxLeaf syntax_tree; - if (text.length() < 1) return syntax_tree; + if (text.empty()) return syntax_tree; std::size_t index = 0UL; std::vector<std::pair<CompilerKit::CompilerKeyword, std::size_t>> keywords_list; @@ -755,8 +747,8 @@ class AssemblyCPlusPlusInterfaceAMD64 final CK_ASSEMBLY_INTERFACE { CompilerKit::STLString line_source; - out_fp << "#bits 64\n"; - out_fp << "#org " << kOrigin << "\n\n"; + out_fp << "%bits 64\n"; + out_fp << "%org " << kOrigin << "\n\n"; while (std::getline(src_fp, line_source)) { out_fp << kFrontend->Compile(line_source, src).fUserValue; |
