1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! AST extraction and code structure analysis.
//!
//! This module provides tree-sitter based code analysis for extracting
//! functions, classes, imports, and generating code structure maps.
//!
//! # Main API
//!
//! - [`code_structure`] - Extract summaries of all functions and classes in a project
//! - [`extract_file`] - Extract full AST info from a single source file
//! - [`file_tree`] - Generate a file tree structure
//!
//! # Example
//!
//! ```no_run
//! use go_brrr::ast::{code_structure, extract_file};
//!
//! // Get project structure summary
//! let structure = code_structure("./src", Some("python"), 100)?;
//! println!("Found {} functions", structure.functions.len());
//!
//! // Get detailed info from a single file (None = no base path restriction)
//! let module = extract_file("./src/main.py", None)?;
//! for func in module.functions {
//! println!("Function: {} at line {}", func.name, func.line_number);
//! }
//!
//! // With base path validation for security
//! let restricted = extract_file("./src/main.py", Some("./src"))?;
//! # Ok::<(), go_brrr::error::BrrrError>(())
//! ```
// Re-exports for the crate's public API (used by lib.rs)
pub use ;
pub use ;
pub use file_tree;
pub use ;