This commit is contained in:
ProgramSnail 2023-07-16 21:00:26 +03:00
parent 6eef89d067
commit 6fcbe63c9f
3 changed files with 1 additions and 11 deletions

Binary file not shown.

Binary file not shown.

View file

@ -13,16 +13,7 @@ class ParseTree {
public: public:
class Node { class Node {
public: public:
Node() : uninitialized_(true) { Node(const TSNode& node, const std::string* source) : node_(node), source_(source) {}
for (unsigned int& i : node_.context) {
i = 0;
}
node_.id = nullptr;
node_.tree = nullptr;
source_ = nullptr;
};
Node(const TSNode& node, const std::string* source) : uninitialized_(false), node_(node), source_(source) {}
std::string GetType() { std::string GetType() {
return ts_node_type(node_); return ts_node_type(node_);
@ -103,7 +94,6 @@ public:
return Node(ts_node_next_named_sibling(node_), source_); return Node(ts_node_next_named_sibling(node_), source_);
} }
private: private:
bool uninitialized_;
TSNode node_; TSNode node_;
const std::string* source_; const std::string* source_;
}; };