From 71c7fd62f8b5257b82cf32b0f747fcf313fcc617 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 6 Nov 2020 18:20:34 +0100 Subject: Prepare Token/Node handling --- cpp.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'cpp.h') diff --git a/cpp.h b/cpp.h index 95289fc..ce4a516 100644 --- a/cpp.h +++ b/cpp.h @@ -3,6 +3,9 @@ #include "grammer.h" #include "minicc.h" +#include +#include +#include #include struct CPPContext { @@ -43,8 +46,6 @@ private: std::vector m_tokens; // result of phase 7.a std::vector m_nodes; // result of phase 7.b - 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 @@ -52,7 +53,9 @@ private: std::string typeOfChild(int32_t child_id) const; bool childTypesOfNodeMatch(index_t, const std::vector& pattern) const; ///< returns true iff specified type list matches; "" -> don't care - void trTranslationUnit(index_t node_id); - void trDeclaration(index_t node_id); + std::deque> mValues; + void getValueOfToken(index_t index); + void getValueOfNode(index_t index); + void visitRecursive(index_t node_id); }; -- cgit v1.2.3