Skip to repository content28 lines · 815 B · rust
tenant.openagents/omega
No repository description is available.
OpenAgents Git authority 2026-07-28T02:01:08.702Z Public web read
NIP-34 coordinate
30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omegaMaintainersHidden in public view
References2 branches · 1 tag
Read-only clone
git clone https://openagents.com/git/tenant.openagents/omega.gitBrowse files
tree_sitter.rs
1pub fn count_tree_sitter_errors<'a>(nodes: impl Iterator<Item = tree_sitter::Node<'a>>) -> usize {
2 let mut total_count: usize = 0;
3 for node in nodes {
4 let mut cursor = node.walk();
5 'node: loop {
6 let current = cursor.node();
7 if current.is_error() || current.is_missing() {
8 total_count += 1;
9 }
10 if current.has_error() && cursor.goto_first_child() {
11 continue;
12 }
13 if cursor.goto_next_sibling() {
14 continue;
15 }
16 loop {
17 if !cursor.goto_parent() {
18 break 'node;
19 }
20 if cursor.goto_next_sibling() {
21 continue;
22 }
23 }
24 }
25 }
26 total_count
27}
28