From e0d6dac4b103a557b37f4850fe76dacf87df7cb9 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 1 Nov 2020 16:26:22 +0100 Subject: Update cppbnf.cpp --- cpp.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'cpp.h') diff --git a/cpp.h b/cpp.h index 6db7146..3be03e2 100644 --- a/cpp.h +++ b/cpp.h @@ -5,6 +5,13 @@ #include +struct CPPContext { + // global variable declarations + // global variable definitions + // functions declarations + // functions definitions +}; + class CPP { public: @@ -34,14 +41,12 @@ public: std::vector getData(); private: - typedef std::unordered_map> map_type; - std::string m_code; // input from compile() std::vector m_tokens; // result of phase 7.a std::vector 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; + CPPContext m_cpp_context; + + void trTranslationUnit(index_t node_id); }; -- cgit v1.2.3