peeker 1.2.0

A library and CLI tool for extracting code structure using Tree-sitter
Documentation
//! # Peeker
//!
//! A library for extracting code structure from source files using tree-sitter.
//!
//! ## Example
//!
//! ```rust
//! use peeker::{parse_file, CodeStructure};
//!
//! let source = r#"
//!     pub fn hello() {
//!         println!("Hello, world!");
//!     }
//! "#;
//!
//! let structure = parse_file(source, "rs").unwrap();
//! assert_eq!(structure.functions.len(), 1);
//! assert_eq!(structure.functions[0].name, "hello");
//! ```
//!
//! ## Supported Languages
//!
//! - Rust (`.rs`)
//! - Python (`.py`)
//! - TypeScript (`.ts`, `.tsx`)
//! - JavaScript (`.js`, `.jsx`)
//! - Go (`.go`)
//! - Java (`.java`)
//! - C (`.c`, `.h`)
//! - C++ (`.cpp`, `.cc`, `.cxx`, `.hpp`, `.hxx`)

pub mod languages;
pub mod parser;

// Re-export the main types and functions at the crate root for convenience
pub use languages::{LanguageConfig, get_language_config};
pub use parser::{
    CodeStructure, EnumDef, FieldDef, FunctionDef, Import, StructDef, TraitDef, parse_file,
};