Skip to main content

arbor_core/
lib.rs

1//! Arbor Core - AST parsing and code analysis
2//!
3//! This crate provides the foundational parsing capabilities for Arbor.
4//! It uses Tree-sitter to parse source files into ASTs and extract
5//! meaningful code entities like functions, classes, and their relationships.
6//!
7//! # Example
8//!
9//! ```no_run
10//! use arbor_core::{parse_file, CodeNode};
11//! use std::path::Path;
12//!
13//! let nodes = parse_file(Path::new("src/main.rs")).unwrap();
14//! for node in nodes {
15//!     println!("{}: {} (line {})", node.kind, node.name, node.line_start);
16//! }
17//! ```
18
19pub mod error;
20pub mod fallback_parser;
21pub mod languages;
22pub mod node;
23pub mod parser;
24pub mod parser_v2;
25
26pub use error::{ParseError, Result};
27pub use languages::LanguageParser;
28pub use node::{CodeNode, NodeKind, Visibility};
29pub use parser::{detect_language, parse_file, parse_source};
30pub use parser_v2::{ArborParser, ParseResult, RelationType, SymbolRelation};