Supported Languages Coverage
Relevant source files
The following files were used as context for generating this wiki page:
Arbor utilizes a multi-layered parsing architecture to transform source code from various programming languages into a unified semantic dependency graph. The core engine, arbor-core, leverages Tree-sitter to perform high-performance Abstract Syntax Tree (AST) analysis. This process identifies critical code entities such as functions, classes, and structs, while also mapping their relationships through calls, imports, and inheritance.
The project currently supports 10 primary languages, providing varying degrees of coverage for symbols and relationship extraction. This coverage enables advanced features like Blast Radius Detection and Model Context Protocol (MCP) integration for AI-driven code navigation.
Sources: crates/arbor-core/README.md, README.md:14-25, crates/arbor-core/src/parser_v2.rs:8-15
Language Support Matrix
Arbor categorizes its language support based on the entities extracted and the maturity of the parser implementation. The following table details the current status and specific coverage for each supported ecosystem.
| Language | Status | Parser Entities / Coverage |
|---|---|---|
| Rust | ✅ | Functions, Structs, Traits, Impls, Macros |
| TypeScript | ✅ | Classes, Interfaces, Types, Imports, JSX |
| JavaScript | ✅ | Functions, Classes, Variables, Imports |
| Python | ✅ | Classes, Functions, Imports, Decorators |
| Go | ✅ | Structs, Interfaces, Functions, Methods |
| Java | ✅ | Classes, Interfaces, Methods, Fields, Constructors |
| C | ✅ | Structs, Functions, Enums, Typedefs |
| C++ | ✅ | Classes, Namespaces, Templates, Structs |
| C# | ✅ | Classes, Methods, Properties, Interfaces, Structs |
| Dart | ✅ | Classes, Mixins, Widgets, Methods |
Sources: README.md:139-152, crates/arbor-core/README.md:16-24, CHANGELOG.md:58-65
Parsing Architecture
The system employs a dual-parser strategy. The primary engine, ArborParser (implemented in parser_v2.rs), uses pre-compiled Tree-sitter queries for high-performance symbol and relation extraction. A legacy path in parser.rs provides a fallback for languages like Dart where query syntax compatibility might vary across Tree-sitter versions.
Data Flow for Language Analysis
The following diagram illustrates how source files are processed by the ArborParser to generate code nodes and relations.
The diagram shows the transition from raw source code to structured CodeNode and SymbolRelation objects stored within the global graph.
Sources: crates/arbor-core/src/parser_v2.rs:55-70, crates/arbor-core/src/parser.rs:32-60
Detailed Language Implementations
C# Coverage
Introduced in v1.0.0, the C# parser uses tree-sitter-c-sharp to extract comprehensive Object-Oriented structures.
- Symbols: Methods, classes, interfaces, structs, constructors, and properties.
- Relationships: Captured via
usingdirectives for imports andinvocation_expressionfor calls.
Sources: CHANGELOG.md:58-60, crates/arbor-core/src/parser_v2.rs:555-585
Python Coverage
The Python parser handles specific ecosystem nuances such as package initialization.
- Special Handling: Empty
__init__.pyfiles are treated as valid module indicators and parsed without errors to avoid false warnings. - Entities: Functions, classes, and decorators are statically analyzed.
- Limitations: Dynamic dispatch results in reduced confidence scores.
Sources: README.md:154, crates/arbor-core/src/parser.rs:43-52, crates/arbor-core/src/parser_v2.rs:475-502
Rust Coverage
Rust support is deep, covering the core traits and implementation blocks necessary for systems programming analysis.
- Symbols:
function_item,struct_item,enum_item, andtrait_item. - Relationships:
use_declarationfor imports;field_expressionandcall_expressionfor function calls.
Sources: crates/arbor-core/src/parser_v2.rs:445-472, crates/arbor-core/README.md:18
TypeScript & JavaScript Coverage
Web ecosystem support includes modern syntax and JSX.
- Symbols: Class declarations, method definitions, interface declarations, and type aliases.
- Relationships: Explicit tracking of
import_statementandcall_expression(including member expressions likeobj.method()).
Sources: crates/arbor-core/src/parser_v2.rs:410-442, README.md:141-142
Extraction Logic and Relation Types
When parsing supported languages, Arbor identifies specific types of edges between nodes to build a Control Flow Graph (CFG) and perform Data Flow Analysis (DFA).
Relation Types
| Relation | Description |
|---|---|
| Calls | Function or method invoking another symbol. |
| Imports | A module or file referencing another module. |
| Extends | Class inheritance (OO languages). |
| Implements | Class or type satisfying an interface/trait. |
| FlowsTo | Control flow edges for logic tracing. |
| DataDependency | Data flow edges tracking variable/state dependency. |
Sources: crates/arbor-core/src/parser_v2.rs:34-45, CHANGELOG.md:62-63
Symbol Resolution Process
The sequence diagram details how Tree-sitter AST nodes are resolved into global symbols across file boundaries using the SymbolTable.
Sources: crates/arbor-core/src/parser_v2.rs:163-200, PR_DESCRIPTION.md:29-31
Language Detection and Error Handling
Arbor detects languages based on file extensions through the detect_language function.
// From crates/arbor-core/src/parser.rs:88-92
pub fn detect_language(path: &Path) -> Option<Box<dyn LanguageParser>> {
let extension = path.extension()?.to_str()?;
get_parser(extension)
}
If a file extension is not recognized, the system returns an UnsupportedLanguage error. For supported languages, if the source is empty, it typically results in an EmptyFile error, with the exception of Python's __init__.py files which are allowed for package structure.
Sources: crates/arbor-core/src/parser.rs:41-55, crates/arbor-core/src/parser_v2.rs:125-135
Conclusion
Arbor provides comprehensive coverage for the most common modern programming languages, enabling structural certainty in impact analysis. By utilizing Tree-sitter queries across its ArborParser implementation, the project ensures that functions, classes, and their complex relationships are accurately represented in a local-first semantic graph. This coverage serves as the foundation for both the interactive GUI and the MCP-based AI integration.
Sources: README.md:158-160, crates/arbor-core/README.md:8-12