diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-11-01 22:26:56 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-11-01 22:26:56 +0100 |
commit | 62aafc5c9273cb0b7a91bf2e4dee1ac2d3658bb3 (patch) | |
tree | 4c3e2943b48260c173733ffa1199bc09c907f131 /cpp.h | |
parent | e0d6dac4b103a557b37f4850fe76dacf87df7cb9 (diff) |
translate() translation-unit and declaration (WIP)
Diffstat (limited to 'cpp.h')
-rw-r--r-- | cpp.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -19,8 +19,6 @@ public: CPP(); ~CPP(); - std::string valueOfNode(index_t node_index, const std::vector<Gram::TreeNode>& Tree); - // phases of translation, according to standard void source_charset_map(); // phase 1 void backslash_escape(); // phase 2 @@ -47,6 +45,14 @@ private: CPPContext m_cpp_context; + std::string valueOfNode(index_t node_index) const; + std::string typeOfNode(index_t node_index) const; + std::string locationOfNode(index_t node_index) const; ///< Empty if no location available + void compileError(index_t node_id, const std::string& msg) const; + std::string typeOfChild(int32_t child_id) const; + bool childTypesOfNodeMatch(index_t, const std::vector<std::string>& pattern) const; ///< returns true iff specified type list matches; "" -> don't care + void trTranslationUnit(index_t node_id); + void trDeclaration(index_t node_id); }; |