Expand description
§codegraph-kotlin
Kotlin parser for CodeGraph - extracts code entities and relationships from Kotlin source files.
§Features
- Parse Kotlin source files (.kt, .kts)
- Extract functions, classes, interfaces, objects, and data classes
- Track relationships (calls, imports, inheritance, implementations)
- Full integration with codegraph-parser-api
§Quick Start
use codegraph_kotlin::KotlinParser;
use codegraph_parser_api::CodeParser;
use codegraph::CodeGraph;
use std::path::Path;
let mut graph = CodeGraph::in_memory()?;
let parser = KotlinParser::new();
let file_info = parser.parse_file(Path::new("Main.kt"), &mut graph)?;
println!("Parsed {} functions", file_info.functions.len());Structs§
- File
Info - Information about a successfully parsed file
- Kotlin
Parser - Kotlin language parser implementing the CodeParser trait
- Parser
Config - Configuration for parser behavior
- Parser
Metrics - Metrics collected during parsing
- Project
Info - Aggregate information about a parsed project
Enums§
- Parser
Error - Errors that can occur during parsing
Traits§
- Code
Parser - Core trait that all language parsers must implement