Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T03:03:55.009Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

tree_sitter.rs

28 lines · 815 B · rust
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
Served at tenant.openagents/omega Member data and write actions are omitted.