What Programming Languages Does CRG Support? Complete Language Coverage Guide
Code Review Graph (CRG) supports 50+ programming languages out-of-the-box, including Python, JavaScript, TypeScript, Go, Rust, Java, C/C++, C#, Ruby, PHP, Swift, Kotlin, and infrastructure languages like Terraform, SQL, and Ansible.
Understanding CRG's language coverage helps you evaluate whether it fits your codebase. The project ships with a comprehensive built-in parser that uses Tree-sitter where available and falls back to custom extractors for languages without a Tree-sitter grammar. This dual approach ensures broad compatibility without additional configuration.
Complete List of CRG Supported Languages
CRG organizes its language support into logical categories based on use case and syntax family.
General-Purpose and Scripting Languages
These form the core of CRG's coverage:
- Python — full AST parsing with import resolution
- JavaScript and TypeScript (including TSX) — complete JSX/TSX support
- Go, Rust, Java, C, C++, C#, VB.NET — systems and enterprise languages
- Ruby, Kotlin, Swift, PHP, Scala — modern application development
- Solidity, Dart, R, Perl, Lua, Luau — specialized domains
- Objective-C, Elixir, Zig, PowerShell, Julia, ReScript, GDScript
Shell and Command Languages
Multiple shell dialects are recognized:
- bash, zsh, sh, ksh, dash, ash
Infrastructure and Data Languages
CRG parses infrastructure-as-code and data definitions:
- Nix — functional package management
- Verilog, SystemVerilog — hardware description
- SQL — database schemas and queries
- Terraform/OpenTofu (
.tffiles); generic.hclfiles are recognized as file nodes
Configuration and Component Frameworks
Modern frontend and automation formats:
- Ansible playbooks, roles, and tasks
- Vue SFC (Single File Components)
- Svelte SFC
- Astro files (parsed through the TypeScript parser)
Notebook and Special Formats
- Jupyter/Databricks notebooks (
.ipynb) - Perl XS files (
.xs) for C extension bindings
How to Check CRG Language Support
Command Line Verification
Use the built-in CLI to list all supported languages:
# Show the built-in language set
code-review-graph info --languages
Typical output:
Supported languages:
python, javascript, typescript, tsx, go, rust, java,
c, cpp, csharp, vbnet, ruby, kotlin, swift, php,
scala, solidity, dart, r, perl, lua, luau, objectivec,
bash, zsh, sh, ksh, dash, ash, elixir, zig, powershell,
julia, rescript, gdscript, nix, verilog, systemverilog,
sql, terraform, hcl, ansible, vue, svelte, astro,
ipynb, xs
Programmatic Access
Query language support directly in Python:
from code_review_graph.parser import CodeParser
parser = CodeParser()
print(sorted(parser.supported_languages))
This returns the complete ordered list matching the documentation in docs/FEATURES.md.
Where Language Support Is Defined
CRG's language coverage is implemented across several key files according to the tirth8205/code-review-graph source code:
| File | Purpose |
|---|---|
code_review_graph/parser.py |
Core parser; defines supported_languages and extraction logic |
code_review_graph/scoped_resolver.py |
Language-specific scoped resolution for PHP, Rust, and C# |
| docs/FEATURES.md | Human-readable language overview and changelog |
| README.md | High-level language coverage summary for users |
The CodeParser class in parser.py serves as the central registry. Language-specific symbol resolution—critical for accurate code review graphs—receives specialized handling in scoped_resolver.py for languages with complex module systems.
Adding Custom Language Support
While CRG covers 50+ languages natively, the parser architecture accommodates extension. The Tree-sitter foundation means any language with a Tree-sitter grammar can potentially be integrated. For languages without Tree-sitter support, the custom extractor pattern in parser.py provides a fallback mechanism.
Summary
- CRG supports 50+ programming languages without configuration
- Coverage spans general-purpose languages, shells, infrastructure-as-code, notebooks, and specialized formats
- Core implementation lives in
code_review_graph/parser.pywith scoped resolution incode_review_graph/scoped_resolver.py - Verify support via
code-review-graph info --languagesor theCodeParser.supported_languagesproperty - Tree-sitter powers most parsing with custom extractors for edge cases
Frequently Asked Questions
Does CRG support TypeScript JSX (TSX) files?
Yes. CRG parses TSX natively alongside standard TypeScript. The parser recognizes tsx as a distinct language entry and handles JSX syntax within TypeScript contexts, according to the language list in code_review_graph/parser.py.
Can CRG analyze Jupyter notebooks?
Yes. CRG treats .ipynb files as first-class sources, extracting code cells for graph construction. This support is built-in and requires no external conversion tools.
What infrastructure languages does CRG support?
CRG parses Terraform/OpenTofu (.tf), generic HCL files, Ansible configurations, Nix expressions, and SQL. These are recognized alongside programming languages in the core parser, making CRG suitable for DevOps and platform engineering codebases.
How does CRG handle languages without Tree-sitter grammars?
CRG falls back to custom extractors defined in code_review_graph/parser.py. This hybrid approach ensures languages like Perl XS or legacy shell dialects receive basic file-node recognition even without full AST parsing.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →