diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-11-07 19:23:50 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-11-07 19:23:50 +0100 |
commit | e7d51fff32ea247fd35b56fc7cf5ce06df5dc6bf (patch) | |
tree | 0874ecc0471ff8896a821ac150895fa4c7865f09 /cpp.h | |
parent | f0f7a8f7fd237d1f8e2bab2bfb2cb4442e1a692f (diff) |
Implemented first expressions (add)
Diffstat (limited to 'cpp.h')
-rw-r--r-- | cpp.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -51,9 +51,13 @@ private: 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 + bool childTypesOfNodeMatch(index_t index, const std::vector<std::string>& pattern) const; ///< returns true iff specified type list matches; "" -> don't care + bool childTypesOfChildMatch(index_t index, index_t child_index, const std::vector<std::string>& pattern) const; ///< returns true iff specified type list matches in specified child; "" -> don't care std::deque<std::shared_ptr<std::any>> mValues; // values stack during phase 7.c + std::shared_ptr<std::any> getValue(index_t node_id, index_t child_id); + std::string getType(index_t node_id, index_t child_index); + std::string ruleString(index_t node_id); std::unordered_map<std::string, std::function<std::shared_ptr<std::any>(index_t)>> getNodeEvalMap(); std::unordered_map<std::string, std::function<std::shared_ptr<std::any>(index_t)>> node_eval_map; |