summaryrefslogtreecommitdiffhomepage
path: root/cpp.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-10-31 18:10:58 +0100
committerRoland Reichwein <mail@reichwein.it>2020-10-31 18:10:58 +0100
commit8256280b348b4b53fff35c9101ced0a8dfb2c58e (patch)
treee745b79e98c853cf1891372e8b2a926a5d81fff5 /cpp.h
parentce77838c4f32b9dc237f0c4b17d1f1e1741254d4 (diff)
CPP::translate() (WIP), documentation, bugfixing
Diffstat (limited to 'cpp.h')
-rw-r--r--cpp.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/cpp.h b/cpp.h
index 3d82751..6db7146 100644
--- a/cpp.h
+++ b/cpp.h
@@ -33,13 +33,15 @@ public:
std::vector<uint8_t> getCode();
std::vector<uint8_t> getData();
- typedef std::unordered_map<std::string, std::function<void()>> map_type;
-
private:
- std::string m_code; // input / start
- std::vector<Token> m_charTokens; // result of phase 3
+ typedef std::unordered_map<std::string, std::function<void(fs::path&, index_t)>> map_type;
+
+ std::string m_code; // input from compile()
+ std::vector<Token> m_tokens; // result of phase 7.a
std::vector<Gram::TreeNode> m_nodes; // result of phase 7.b
void traverse(index_t node_id, map_type& map, fs::path parent_path = "/");
+
+ CPP::map_type map_translation_unit;
};