summaryrefslogtreecommitdiffhomepage
path: root/dev/LibCompiler/src/CCompiler64x0.cc
diff options
context:
space:
mode:
authorAmlal <amlal.elmahrouss@icloud.com>2025-01-27 02:11:12 +0100
committerAmlal <amlal.elmahrouss@icloud.com>2025-01-27 02:11:12 +0100
commit2fd3475239d4258ca4407ffb2c0720d90d711d6c (patch)
treef56bbe4a03196ff41d197a617c263dbb13658ef4 /dev/LibCompiler/src/CCompiler64x0.cc
parent2b2ac6e8c5dd2b3234b74d38833066dcd483267b (diff)
ADD: `dbg` C++ debugger program.
META: Ran format command with correct C++ extensions. Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/LibCompiler/src/CCompiler64x0.cc')
-rw-r--r--dev/LibCompiler/src/CCompiler64x0.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/dev/LibCompiler/src/CCompiler64x0.cc b/dev/LibCompiler/src/CCompiler64x0.cc
index e224fbb..61e862f 100644
--- a/dev/LibCompiler/src/CCompiler64x0.cc
+++ b/dev/LibCompiler/src/CCompiler64x0.cc
@@ -79,13 +79,13 @@ namespace Detail
struct CompilerState final
{
std::vector<LibCompiler::SyntaxLeafList> fSyntaxTreeList;
- std::vector<CompilerRegisterMap> kStackFrame;
- std::vector<CompilerStructMap> kStructMap;
+ std::vector<CompilerRegisterMap> kStackFrame;
+ std::vector<CompilerStructMap> kStructMap;
LibCompiler::SyntaxLeafList* fSyntaxTree{nullptr};
- std::unique_ptr<std::ofstream> fOutputAssembly;
- std::string fLastFile;
- std::string fLastError;
- bool fVerbose;
+ std::unique_ptr<std::ofstream> fOutputAssembly;
+ std::string fLastFile;
+ std::string fLastError;
+ bool fVerbose;
};
} // namespace Detail
@@ -131,14 +131,14 @@ static std::string kRegisterPrefix = kAsmRegisterPrefix;
/////////////////////////////////////////
-static std::vector<std::string> kFileList;
-static LibCompiler::AssemblyFactory kFactory;
-static bool kInStruct = false;
-static bool kOnWhileLoop = false;
-static bool kOnForLoop = false;
-static bool kInBraces = false;
-static bool kIfFound = false;
-static size_t kBracesCount = 0UL;
+static std::vector<std::string> kFileList;
+static LibCompiler::AssemblyFactory kFactory;
+static bool kInStruct = false;
+static bool kOnWhileLoop = false;
+static bool kOnForLoop = false;
+static bool kInBraces = false;
+static bool kIfFound = false;
+static size_t kBracesCount = 0UL;
/* @brief C compiler backend for C */
class CompilerFrontend64x0 final : public LibCompiler::ICompilerFrontend
@@ -403,7 +403,7 @@ bool CompilerFrontend64x0::Compile(std::string text_, const std::string file)
if (text[text_index] == '=' && kInStruct)
{
Detail::print_error("assignement of value in struct " + text,
- file);
+ file);
continue;
}