Turn C++ code into LLM-digestible JSON – because AI deserves X-ray vision for code! Powered by Clang AST dissection, Bazel/Docker industrial pipelines, and JSON that pleases both machines and humans.
- C++ AST → JSON: Surgical precision with Clang's parsing scalpel
- Bazel Builds: Industrial-grade compilation with dependency isolation
- Docker in One Shot: No dependency hell – just warp-speed deployment
- Pre-built Binaries: For rebels who hate compiling from source
- Docker (recommended)
- Linux (Windows warriors: WSL2 required)
./astroparse-linux-amd64 your_code.cpp Init docker container for build
./docker.sh initEnter the build env
./docker.shBuild the code
./scripts/build.shGen compile_commands.json
./scripts/update_compile_commands.shGet AST json file
./bazel-bin/astroparse/astroparse /AstroParse/parse/util.cc#include <iostream>
class SpaceShip {
public:
void launch() { std::cout << "3...2...1...Ignition!\n"; }
}; {
"AST": {
"type": "TranslationUnitDecl",
"children": [
{
"type": "ClassDecl",
"name": "SpaceShip",
"methods": [
{
"type": "CXXMethodDecl",
"name": "launch",
"body": "CompoundStmt"
}
]
}
]
}
} [Your C++ Code] → Clang Frontend → AST → Custom Traverser → JSON Serializer → [Feed to LLMs/Tools]
- Fork This Repo: Clone your personal universe branch
- Code Style: Follow
.clang-format– follow Google style - Tests: All PRs must pass
./scripts/test.sh
MIT License – Details at LICENSE
Crafted with ❤️ and Clang by Seel.Xu
“Any sufficiently advanced code parser is indistinguishable from magic.” – Arthur C. Clarke (remixed)