Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "codebank"
version = "0.3.1"
version = "0.4.0"
edition = "2024"
description = """
A powerful code documentation generator that creates structured markdown documentation from your codebase.
Supports multiple languages including Rust, Python, TypeScript, and C with intelligent parsing and formatting.
Supports multiple languages including Rust, Python, TypeScript, C, and Go with intelligent parsing and formatting.
Features test code filtering, summary generation, and customizable documentation strategies.
"""
authors = ["Tyr Chen <tyr.chen@gmail.com>"]
Expand Down Expand Up @@ -41,6 +41,7 @@ tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tree-sitter = "0.23"
tree-sitter-cpp = "0.23"
tree-sitter-go = "0.23"
tree-sitter-python = "0.23"
tree-sitter-rust = "0.23"
tree-sitter-typescript = "0.23"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ CodeBank is a powerful code analysis and documentation tool that parses source c
- Python (fully supported with function, class, and module parsing)
- TypeScript/JavaScript (fully supported with function, class, interface, and export parsing)
- C (TODO)
- Go (fully supported with package, function, struct, interface, and method parsing)

- **Code Structure Analysis**:
- Parses functions, modules, structs/classes, traits/interfaces
Expand Down
11 changes: 9 additions & 2 deletions examples/parser.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
use std::path::Path;

use anyhow::Result;
use codebank::{CppParser, LanguageParser, PythonParser, RustParser, TypeScriptParser};
use codebank::{CppParser, GoParser, LanguageParser, PythonParser, RustParser, TypeScriptParser};

fn main() -> Result<()> {
let mut rust_parser = RustParser::try_new()?;
let mut python_parser = PythonParser::try_new()?;
let mut cpp_parser = CppParser::try_new()?;
let mut ts_parser = TypeScriptParser::try_new()?;

let mut go_parser = GoParser::try_new()?;
let data = python_parser
.parse_file(Path::new("fixtures/sample.py"))
.unwrap();
Expand All @@ -32,5 +32,12 @@ fn main() -> Result<()> {
.unwrap();

println!("Rust:\n{:#?}", data);

let data = go_parser
.parse_file(Path::new("fixtures/sample.go"))
.unwrap();

println!("Go:\n{:#?}", data);

Ok(())
}
Loading