mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2025-12-06 06:58:46 +00:00
.
This commit is contained in:
parent
6eef89d067
commit
6fcbe63c9f
3 changed files with 1 additions and 11 deletions
BIN
.cache/clangd/index/parser.c.2B232C44BA60FD9D.idx
Normal file
BIN
.cache/clangd/index/parser.c.2B232C44BA60FD9D.idx
Normal file
Binary file not shown.
BIN
.cache/clangd/index/parser.h.31A79418023DF33E.idx
Normal file
BIN
.cache/clangd/index/parser.h.31A79418023DF33E.idx
Normal file
Binary file not shown.
|
|
@ -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_;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue