summaryrefslogtreecommitdiffhomepage
path: root/dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc
diff options
context:
space:
mode:
authorAmlal <amlal@nekernel.org>2025-04-25 22:58:37 +0200
committerAmlal <amlal@nekernel.org>2025-04-25 22:58:37 +0200
commit7258fbf7c8785a3390441bbbac44d78b2e4facbf (patch)
treec0e533bd5ef95d07cf7810c6d8cf0f511b92de74 /dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc
parentf6b400b80efc64b918c03352e93ec9de4e2369a1 (diff)
dev: stabilizing source code towards an 0.0.1 release.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc')
-rw-r--r--dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc7
1 files changed, 3 insertions, 4 deletions
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<std::string, std::uintptr_t> pair) -> bool {
return fnName == pair.first;