mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-07 07:28:44 +00:00
typeclasses can have required methods and required functions
This commit is contained in:
parent
562541087e
commit
4882d458f8
11 changed files with 113 additions and 43 deletions
|
|
@ -71,6 +71,7 @@ public:
|
|||
Node NthChild(size_t n) {
|
||||
return Node(ts_node_child(node_, n), source_);
|
||||
}
|
||||
|
||||
size_t ChildCount() {
|
||||
return ts_node_child_count(node_);
|
||||
}
|
||||
|
|
@ -86,6 +87,14 @@ public:
|
|||
return Node(ts_node_child_by_field_name(node_, name.c_str(), name.size()), source_);
|
||||
}
|
||||
|
||||
Node PreviousSibling() {
|
||||
return Node(ts_node_prev_sibling(node_), source_);
|
||||
}
|
||||
|
||||
Node PreviousNamedSibling() {
|
||||
return Node(ts_node_prev_named_sibling(node_), source_);
|
||||
}
|
||||
|
||||
Node NextSibling() {
|
||||
return Node(ts_node_next_sibling(node_), source_);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue