From 7258fbf7c8785a3390441bbbac44d78b2e4facbf Mon Sep 17 00:00:00 2001 From: Amlal Date: Fri, 25 Apr 2025 22:58:37 +0200 Subject: dev: stabilizing source code towards an 0.0.1 release. Signed-off-by: Amlal --- dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc') diff --git a/dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc b/dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc index 558a94d..a227f75 100644 --- a/dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc +++ b/dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc @@ -256,7 +256,7 @@ Boolean CompilerFrontendCPlusPlus::Compile(std::string text, const std::string f for (size_t i = 0; i < text.size(); i++) { if (isalnum(text[i])) { Detail::print_error("syntax error: " + text, file); - return false; + return NO; } } } @@ -371,7 +371,6 @@ Boolean CompilerFrontendCPlusPlus::Compile(std::string text, const std::string f ++indexFnName; if (ch == '\t') break; - if (ch == ' ') break; } @@ -383,7 +382,7 @@ Boolean CompilerFrontendCPlusPlus::Compile(std::string text, const std::string f } if (text.ends_with(";") && text.find("return") == std::string::npos) - goto LC_write_assembly; + goto lc_write_assembly; else if (text.size() <= indexFnName) Detail::print_error("Invalid function name: " + fnName, file); @@ -408,7 +407,7 @@ Boolean CompilerFrontendCPlusPlus::Compile(std::string text, const std::string f break; - LC_write_assembly: + lc_write_assembly: auto it = std::find_if(kOriginMap.begin(), kOriginMap.end(), [&fnName](std::pair pair) -> bool { return fnName == pair.first; -- cgit v1.2.3