summaryrefslogtreecommitdiffhomepage
path: root/CompilerDriver/ccplus.cc
diff options
context:
space:
mode:
Diffstat (limited to 'CompilerDriver/ccplus.cc')
-rw-r--r--CompilerDriver/ccplus.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/CompilerDriver/ccplus.cc b/CompilerDriver/ccplus.cc
index fc8ab3a..bf6df0b 100644
--- a/CompilerDriver/ccplus.cc
+++ b/CompilerDriver/ccplus.cc
@@ -49,13 +49,27 @@ namespace detail
struct CompilerRegisterMap
{
std::string fName;
- std::string fRegister;
+ std::string fReg;
+ };
+
+ // \brief Offset based struct/class
+ struct CompilerStructMap
+ {
+ std::string fName;
+ std::string fReg;
+
+ // offset counter
+ std::size_t fOffsetsCnt;
+
+ // offset array
+ std::vector<std::pair<Int32, std::string>> fOffsets;
};
struct CompilerState
{
std::vector<ParserKit::SyntaxLeafList> fSyntaxTreeList;
std::vector<CompilerRegisterMap> kStackFrame;
+ std::vector<CompilerStructMap> kStructMap;
ParserKit::SyntaxLeafList* fSyntaxTree{ nullptr };
std::unique_ptr<std::ofstream> fOutputAssembly;
std::string fLastFile;